sqlite - 插入大量行时Monotouch sqlite崩溃

标签 sqlite xamarin.ios

我有一个使用xamarin iOS构建的应用程序。该数据库是sqlite。在模拟器和设备中,应用程序开始处理数据后,都会出现SIGSEGV错误。

堆栈跟踪:

在(包装器托管到本地)Mono.Data.Sqlite.UnsafeNativeMethods.sqlite3_prepare(intptr,intptr,int,intptr&,intptr&)
在/ Developer / MonoTouch / Source / mono / mcs / class /中的Mono.Data.Sqlite.SQLite3.Prepare(Mono.Data.Sqlite.SqliteConnection,string,Mono.Data.Sqlite.SqliteStatement,uint,string&)[0x00044] Mono.Data.Sqlite / Mono.Data.Sqlite_2.0 / SQLite3.cs:268
在/Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLiteCommand.cs:230中的Mono.Data.Sqlite.SqliteCommand.BuildNextCommand()[0x00019]
在/Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLiteCommand.cs:264中的Mono.Data.Sqlite.SqliteCommand.GetStatement(int)[0x0000b]
在(包装器远程调用检查)Mono.Data.Sqlite.SqliteCommand.GetStatement(int)
在/Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLiteDataReader.cs:896中的Mono.Data.Sqlite.SqliteDataReader.NextResult()[0x000cc]
在/Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono中的Mono.Data.Sqlite.SqliteDataReader..ctor(Mono.Data.Sqlite.SqliteCommand,System.Data.CommandBehavior)[0x00051]处.Data.Sqlite_2.0 / SQLiteDataReader.cs:89
在(包装器远程调用检查)Mono.Data.Sqlite.SqliteDataReader..ctor(Mono.Data.Sqlite.SqliteCommand,System.Data.CommandBehavior)
在/Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLiteCommand中的Mono.Data.Sqlite.SqliteCommand.ExecuteReader(System.Data.CommandBehavior)[0x00006]中。 cs:539
在/Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLiteCommand中的Mono.Data.Sqlite.SqliteCommand.ExecuteDbDataReader(System.Data.CommandBehavior)[0x00000]处。 cs:527
在/Developer/MonoTouch/Source/mono/mcs/class/System.Data/System.Data.Common/DbCommand.cs:128中的System.Data.Common.DbCommand.ExecuteReader(System.Data.CommandBehavior)[0x00000]中
在/Developer/MonoTouch/Source/mono/mcs/class/System.Data/System.Data.Common/中的System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(System.Data.CommandBehavior)[0x00000]中DbCommand.cs:145
在/Developer/MonoTouch/Source/mono/mcs/class/System.Data/中的System.Data.Common.DbDataAdapter.Fill(System.Data.DataTable,System.Data.IDbCommand,System.Data.CommandBehavior)[0x00022]中System.Data.Common / DbDataAdapter.cs:297
在/Developer/MonoTouch/Source/mono/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs:273中的System.Data.Common.DbDataAdapter.Fill(System.Data.DataTable)[0x00011]
在(包装器远程调用检查)System.Data.Common.DbDataAdapter.Fill(System.Data.DataTable)
在/ Sviluppo / Librerie / Gestione Dati / PL.Dati.Mobile / Versioni / iOS / PL.Dati.iOS / TabellaDatiiOS中的PL.Dati.TabellaDati.ctor(PL.Dati.ConnessioneDB,字符串,字符串)[0x000e8]中。 cs:26
在/ Sviluppo / Librerie / Gestione Dati / PL.Dati.Mobile / Comune / ConnessioneDB.cs:206中的PL.Dati.ConnessioneDB.EseguiSelezione(string)[0x00000]中
在/ Sviluppo / Librerie / Gestione Dati / PL.Dati.Mobile / Comune / ConnessioneDB.cs:192中的PL.Dati.ConnessioneDB.EseguiSelezione(string,string,string,bool,int,string [])[0x00137]中
在/ Sviluppo / Librerie / Gestione Dati / PL.Dati.Mobile / Comune / ConnessioneDB.cs:125中的PL.Dati.ConnessioneDB.EseguiSelezione(string,string,string,int)[0x00000]中
在PL.Dati.ConnessioneDB.EseguiInserimentoTabellaDati(string,PL.Dati.TabellaDati,string [])[0x0004d]在/ Sviluppo / Librerie / Gestione Dati / PL.Dati.Mobile / Comune / ConnessioneDB.cs:860中
在/ Sviluppo / Librerie / Gestione Dati / PL.Dati.Mobile / Comune / ConnessioneDB.cs:828中的PL.Dati.ConnessioneDB.EseguiInserimentoTabellaDati(字符串,PL.Dati.TabellaDati)[0x00000]中
在/Sviluppo/Procedure/iSell/Comune/Gestione/GestioneTrasmissioni.cs:681中的iSell.Core.GestioneTrasmissioni.ElaboraFileDati(PL.Dati.ConnessioneDB,string,string)[0x00295]
在/Sviluppo/Procedure/iSell/Comune/Gestione/GestioneTrasmissioni.cs:888中的iSell.Core.GestioneTrasmissioni.ElaboraDatiDownload(bool)[0x002a0]
在iSell.Core.GestioneTrasmissioni.ElaboraCartellaDownload(bool,string,string)[0x0007b]在/Sviluppo/Procedure/iSell/Comune/Gestione/GestioneTrasmissioni.cs:416中
在iSell.Core.GestioneTrasmissioni.ElaboraCartella下载(布尔)[0x00000]在/Sviluppo/Procedure/iSell/Comune/Gestione/GestioneTrasmissioni.cs:392中
在/Sviluppo/Procedure/iSell/Comune/Interfacce/Client/GestoreInterfacciaTrasmissioni.cs:69中的iSell.Core.GestoreInterfacciaTrasmissioni.RichiestaElaborazioneComando(字符串,对象,对象)[0x000c5]中
在/Sviluppo/Procedure/iSell/Comune/EngineDati/RicevitoreComandi.cs:97中的iSell.Core.RicevitoreComandi.RichiediElaborazioneComando()[0x00036]
在/Sviluppo/Procedure/iSell/Comune/EngineDati/RicevitoreComandi.cs:111中的iSell.Core.RicevitoreComandi.RichiediElaborazioneComando(对象)[0x00007]
在/ Sviluppo / Procedure / iSell / Comune / Interfacce / InterazioneStentia / Gestore中的iSell.Core.GestoreInterfacciaVisualizzaziazioneSorgenteDati.NotificaChiusuraInterfaccia(iSell.Core.GestioneInterfacce / TipiChiusuraInterfaccia)[0x00012]中:
在/ Sviluppo / Procedure / iSell / Versioni / iSelliOS / iOS / Interfaccie / Classi ausiliarie / ViewControllerStandard.cs:319中的iSell.OS.ViewControllerStandard.ChiudiInterfaccia(iSell.Core.GestioneInterfacce / TipiChiusuraInterfaccia)[0x0009e]
在/ Sviluppo / Procedure / iSell / Versioni / iSelliOS / iOS / Interfaccie / Classi ausiliarie / ViewControllerStandard.cs:277中的iSell.OS.ViewControllerStandard.ChiudiInterfaccia()[0x000a1]
在/ Sviluppo / Procedure / iSell / Versioni / iSelliOS / iOS / Interfaccie / Classi ausiliarie / ViewControllerStandard.cs:62中的iSell.OS.ViewControllerStandard.Handle_GestoreInterfacciaStandardhandleRichiestaChiusuraInterfaccia()[0x00000]
在/Sviluppo/Procedure/iSell/Comune/Interfacce/Client/GestoreInterfacciaStandard.cs:77中的iSell.Core.GestoreInterfacciaStandard.ChiudiInterfaccia()[0x0000b]
在iSell.Core.GestoreInterfacciaVisualizzazioneSorgenteDati.Handle_SorgenteDatiInVisualizzazionehandleIndiceElementoDatiCorrenteInSezioneModificato(PL.Dati.SorgenteDati,PL.Dati.IndiceElementoDatieenteAceeenteAce / Es / SureupInterone / AcureS / SureupInterone / AcureS //
在(包装委托调用).invoke_void_thisSorgenteDati_IndiceElementoDati(PL.Dati.SorgenteDati,PL.Dati.IndiceElementoDati)
在/ Sviluppo / Librerie / Gestione Dati / PL.Dati.Mobile / Comune / SorgenteDati.cs:145中的PL.Dati.SorgenteDati.HandleIndiceElementoDatiCorrenteInSezioneModificato(PL.Dati.SezioneSorgenteDati,int)[0x00026]
在/ Sviluppo / Librerie / Gestione Dati / PL.Dati.Mobile / Comune / SezioneSorgenteDati.cs:143中的PL.Dati.SezioneSorgenteDati.HandleIndiceElementoDatiCorrenteModificato(PL.Dati.SezioneSorgenteDati,int)[0x0000b]
在/ Sviluppo / Librerie / Gestione Dati / PL.Dati.Mobile / Comune / SezioneSorgenteDati.cs:723中的PL.Dati.SezioneSorgenteDati.ImpostaIndiceElementoDatiCorrente(int,bool)[0x000e2]
在/ Sviluppo / Librerie / Gestione Dati / PL.Dati.Mobile / Comune / SorgenteDati.cs:616中的PL.Dati.SorgenteDati.ImpostaIndiceElementoDatiCorrenteInSezione(int,int,bool)[0x00063]
在/ Sviluppo / Librerie / Gestione Dati / PL.Dati.Mobile / Comune / SorgenteDati.cs:594中的PL.Dati.SorgenteDati.ImpostaIndiceElementoDatiCorrenteInSezione(int,int)[0x00000]
在/ Sviluppo / Procedure / iSell / Versioni / iSelliOS / iOS / Interfaccie / Classi ausiliarie / SorgenteTableViewStandard.cs:298中的iSell.OS.SorgenteTableViewStandard.RowSelected(MonoTouch.UIKit.UITableView,MonoTouch.Foundation.NSIndexPath)[0x00000]
在(包装运行时调用).runtime_invoke_void__this_object_object(object,intptr,intptr,intptr)
在(包装器托管到本地)MonoTouch.UIKit.UIApplication.UIApplicationMain(int,string [],intptr,intptr)
在/Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38中的MonoTouch.UIKit.UIApplication.Main(string [],string,string)[0x0004c]处
在/Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:43中的MonoTouch.UIKit.UIApplication.Main(string [])[0x00000]处
在/Sviluppo/Procedure/iSell/Versioni/iSelliOS/Main.cs:13中的iSell.OS.Application.Main(string [])[0x00000]处
在(包装运行时调用).runtime_invoke_void_object(object,intptr,intptr,intptr)

本机堆栈跟踪:

0   iSell                               0x0007b09c mono_handle_native_sigsegv + 284
1   iSell                               0x00004f38 mono_sigsegv_signal_handler + 248
2   libsystem_c.dylib                   0x9c3ba59b _sigtramp + 43
3   ???                                 0xffffffff 0x0 + 4294967295
4   libsqlite3.dylib                    0x04284f81 sqlite3ExprAlloc + 257
5   libsqlite3.dylib                    0x04284a5b selectExpander + 2859
6   libsqlite3.dylib                    0x042817d8 sqlite3WalkSelect + 104
7   libsqlite3.dylib                    0x04280b0c sqlite3SelectPrep + 76
8   libsqlite3.dylib                    0x0426d448 sqlite3Select + 424
9   libsqlite3.dylib                    0x04261cdd yy_reduce + 8301
10  libsqlite3.dylib                    0x0425f535 sqlite3Parser + 245
11  libsqlite3.dylib                    0x042264ac sqlite3RunParser + 396
12  libsqlite3.dylib                    0x042a50fa sqlite3Prepare + 634
13  libsqlite3.dylib                    0x0422564e sqlite3LockAndPrepare + 270
14  libsqlite3.dylib                    0x04225205 sqlite3_prepare + 53
15  ???                                 0x19ef1687 0x0 + 435099271
16  ???                                 0x19ef0960 0x0 + 435095904
17  ???                                 0x19ef0455 0x0 + 435094613
18  ???                                 0x19ef0164 0x0 + 435093860
19  ???                                 0x19ef00e4 0x0 + 435093732
20  ???                                 0x19eefaa4 0x0 + 435092132
21  ???                                 0x19eef5f2 0x0 + 435090930
22  ???                                 0x19eef468 0x0 + 435090536
23  ???                                 0x19eee884 0x0 + 435087492
24  ???                                 0x19ef8ea8 0x0 + 435130024
25  ???                                 0x19ef8e63 0x0 + 435129955
26  ???                                 0x19ef8e10 0x0 + 435129872
27  ???                                 0x19ef8cab 0x0 + 435129515
28  ???                                 0x19ef8946 0x0 + 435128646
29  ???                                 0x19ef8864 0x0 + 435128420
30  ???                                 0x19ef7c40 0x0 + 435125312
31  ???                                 0x19ef76c4 0x0 + 435123908
32  ???                                 0x1a1c9c04 0x0 + 438082564
33  ???                                 0x1a1c9770 0x0 + 438081392
34  ???                                 0x1cb20058 0x0 + 481427544
35  ???                                 0x1cb1fd7c 0x0 + 481426812
36  ???                                 0x1c8c6610 0x0 + 478963216
37  ???                                 0x19e990e8 0x0 + 434737384
38  ???                                 0x19e9470c 0x0 + 434718476
39  ???                                 0x19e94494 0x0 + 434717844
40  ???                                 0x1c7dcd8c 0x0 + 478006668
41  ???                                 0x1c7dc8d8 0x0 + 478005464
42  ???                                 0x1c7dc7c8 0x0 + 478005192
43  ???                                 0x1c7dc6a8 0x0 + 478004904
44  ???                                 0x1c7db70b 0x0 + 478000907
45  ???                                 0x1c7dd755 0x0 + 478009173
46  ???                                 0x1c7dd4cf 0x0 + 478008527
47  ???                                 0x1c7dd46e 0x0 + 478008430
48  ???                                 0x1c7dd413 0x0 + 478008339
49  ???                                 0x1a1ef511 0x0 + 438236433
50  ???                                 0x1a1eef87 0x0 + 438235015
51  ???                                 0x1a1eeea6 0x0 + 438234790
52  ???                                 0x1a1eedcc 0x0 + 438234572
53  ???                                 0x1a1ee91c 0x0 + 438233372
54  ???                                 0x1a1ee740 0x0 + 438232896
55  ???                                 0x1a1ee34c 0x0 + 438231884
56  ???                                 0x1a1ee6dd 0x0 + 438232797
57  iSell                               0x00009282 mono_jit_runtime_invoke + 722
58  iSell                               0x00152a8e mono_runtime_invoke + 126
59  iSell                               0x00200ff6 monotouch_trampoline + 3686
60  UIKit                               0x019fb285 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1194
61  UIKit                               0x019fb4ed -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 201
62  Foundation                          0x00a415b3 __NSFireDelayedPerform + 380
63  CoreFoundation                      0x03e81376 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 22
64  CoreFoundation                      0x03e80e06 __CFRunLoopDoTimer + 534
65  CoreFoundation                      0x03e68a82 __CFRunLoopRun + 1810
66  CoreFoundation                      0x03e67f44 CFRunLoopRunSpecific + 276
67  CoreFoundation                      0x03e67e1b CFRunLoopRunInMode + 123
68  GraphicsServices                    0x04e177e3 GSEventRunModal + 88
69  GraphicsServices                    0x04e17668 GSEventRun + 104
70  UIKit                               0x0194bffc UIApplicationMain + 1211
71  ???                                 0x0edecc8d 0x0 + 249482381
72  ???                                 0x0edec790 0x0 + 249481104
73  ???                                 0x0edec56c 0x0 + 249480556
74  ???                                 0x0edec3a4 0x0 + 249480100
75  ???                                 0x0edec516 0x0 + 249480470
76  iSell                               0x00009282 mono_jit_runtime_invoke + 722
77  iSell                               0x00152a8e mono_runtime_invoke + 126
78  iSell                               0x00156db4 mono_runtime_exec_main + 420
79  iSell                               0x00157125 mono_runtime_run_main + 725
80  iSell                               0x000641d5 mono_jit_exec + 149
81  iSell                               0x001f63a4 main + 1988
82  iSell                               0x00002be5 start + 53
83  ???                                 0x00000004 0x0 + 4


================================================== ===============
执行本机代码时得到了SIGSEGV。这通常表明
Mono运行时或本机库之一中的致命错误

由您的应用程序使用。

有人能帮我吗?

最佳答案

垃圾收集器很可能是一个问题。
确保处置并设置SQLCommand和阅读器为空。
看看这个:
http://www.aaronheise.com/2012/12/monotouch-sqlite-sigsegv/#comment-10

关于sqlite - 插入大量行时Monotouch sqlite崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17020991/

相关文章:

python - 在 Python 中从格式错误的 SQLite 中转储数据

Android sqlite 从查询中返回行数

iphone - SQLite ANALYZE 破坏索引

ios - 适用于 Mac 的 Visual Studio 。警告。当前在首选项中选择了 Xcode 10.0,并且与正在使用的 Xamarin.ios 版本不兼容

c# - 如何用 Device.OnPlatform 翻译这个 Padding? (iOS 案例)

sqlite - 调试 MonoTouch 时 iOS 模拟器上的错误 - 仅安装 4.3 时出现 3.2 SDK 错误?

mysql - "UNSIGNED": syntax error: on creating table query when imported to sqlite

java - 在 Java 中从 Oracle 复制到 SQLite

ios - 向 UIScrollViewDelegate 方法添加代码

iphone - 在 MonoTouch 中创建声音效果的单个实例,为什么音频对性能如此不利?