【问题标题】:Monotouch sqlite crash when inserting a lot of rows插入大量行时 Monotouch sqlite 崩溃
【发布时间】:2013-06-10 09:44:47
【问题描述】:

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

堆栈跟踪:

at (wrapper managed-to-native) Mono.Data.Sqlite.UnsafeNativeMethods.sqlite3_prepare (intptr,intptr,int,intptr&,intptr&) 在 Mono.Data.Sqlite.SQLite3.Prepare (Mono.Data.Sqlite.SqliteConnection,string,Mono.Data.Sqlite.SqliteStatement,uint,string&) [0x00044] 在 /Developer/MonoTouch/Source/mono/mcs/class/ Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLite3.cs:268 在 Mono.Data.Sqlite.SqliteCommand.BuildNextCommand () [0x00019] 在 /Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLiteCommand.cs:230 在 Mono.Data.Sqlite.SqliteCommand.GetStatement (int) [0x0000b] 在 /Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLiteCommand.cs:264 在 (wrapper remoting-invoke-with-check) Mono.Data.Sqlite.SqliteCommand.GetStatement (int) 在 Mono.Data.Sqlite.SqliteDataReader.NextResult () [0x000cc] 在 /Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLiteDataReader.cs:896 在 Mono.Data.Sqlite.SqliteDataReader..ctor (Mono.Data.Sqlite.SqliteCommand,System.Data.CommandBehavior) [0x00051] 在 /Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono .Data.Sqlite_2.0/SQLiteDataReader.cs:89 在 (wrapper remoting-invoke-with-check) 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 在 System.Data.Common.DbCommand.ExecuteReader (System.Data.CommandBehavior) [0x00000] 在 /Developer/MonoTouch/Source/mono/mcs/class/System.Data/System.Data.Common/DbCommand.cs:128 在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader (System.Data.CommandBehavior) [0x00000] 在 /Developer/MonoTouch/Source/mono/mcs/class/System.Data/System.Data.Common/ DbCommand.cs:145 在 System.Data.Common.DbDataAdapter.Fill (System.Data.DataTable,System.Data.IDbCommand,System.Data.CommandBehavior) [0x00022] 在 /Developer/MonoTouch/Source/mono/mcs/class/System.Data/ System.Data.Common/DbDataAdapter.cs:297 在 System.Data.Common.DbDataAdapter.Fill (System.Data.DataTable) [0x00011] 在 /Developer/MonoTouch/Source/mono/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs:273 在 (wrapper remoting-invoke-with-check) 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,string,string) [0x000e8]。 CS:26 在 /Sviluppo/Librerie/Gestione Dati/PL.Dati.Mobile/Comune/ConnessioneDB.cs:206 中的 PL.Dati.ConnessioneDB.EseguiSelezione(字符串)[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] 在 /Sviluppo/Librerie/Gestione Dati/PL.Dati.Mobile/Comune/ConnessioneDB.cs:860 中的 PL.Dati.ConnessioneDB.EseguiInserimentoTabellaDati (string,PL.Dati.TabellaDati,string[]) [0x0004d] 在 /Sviluppo/Librerie/Gestione Dati/PL.Dati.Mobile/Comune/ConnessioneDB.cs:828 中的 PL.Dati.ConnessioneDB.EseguiInserimentoTabellaDati (string,PL.Dati.TabellaDati) [0x00000] 在 iSell.Core.GestioneTrasmissioni.ElaboraFileDati (PL.Dati.ConnessioneDB,string,string) [0x00295] 在 /Sviluppo/Procedure/iSell/Comune/Gestione/GestioneTrasmissioni.cs:681 在 iSell.Core.GestioneTrasmissioni.ElaboraDatiDownload (bool) [0x002a0] 在 /Sviluppo/Procedure/iSell/Comune/Gestione/GestioneTrasmissioni.cs:888 在 iSell.Core.GestioneTrasmissioni.ElaboraCartellaDownload (bool,string,string) [0x0007b] in /Sviluppo/Procedure/iSell/Comune/Gestione/GestioneTrasmissioni.cs:416 在 iSell.Core.GestioneTrasmissioni.ElaboraCartellaDownload (bool) [0x00000] 在 /Sviluppo/Procedure/iSell/Comune/Gestione/GestioneTrasmissioni.cs:392 在 iSell.Core.GestoreInterfacciaTrasmissioni.RichiestaElaborazioneComando (string,object,object) [0x000c5] 在 /Sviluppo/Procedure/iSell/Comune/Interfacce/Client/GestoreInterfacciaTrasmissioni.cs:69 在 iSell.Core.RicevitoreComandi.RichiediElaborazioneComando () [0x00036] 在 /Sviluppo/Procedure/iSell/Comune/EngineDati/RicevitoreComandi.cs:97 在 iSell.Core.RicevitoreComandi.RichiediElaborazioneComando(对象)[0x00007] 在 /Sviluppo/Procedure/iSell/Comune/EngineDati/RicevitoreComandi.cs:111 在 iSell.Core.GestoreInterfacciaVisualizzazioneSorgenteDati.NotificaChiusuraInterfaccia (iSell.Core.GestioneInterfacce/TipiChiusuraInterfaccia) [0x00012] 在 /Sviluppo/Procedure/iSell/Comune/Interfacce/Interazione utente/GestoreInterfacciaVisualizzazioneSorgenteDati.cs:54 在 iSell.OS.ViewControllerStandard.ChiudiInterfaccia (iSell.Core.GestioneInterfacce/TipiChiusuraInterfaccia) [0x0009e] 在 /Sviluppo/Procedure/iSell/Versioni/iSelliOS/iOS/Interfaccie/Classi ausiliarie/ViewControllerStandard.cs:319 在 iSell.OS.ViewControllerStandard.ChiudiInterfaccia () [0x000a1] 在 /Sviluppo/Procedure/iSell/Versioni/iSelliOS/iOS/Interfaccie/Classi ausiliarie/ViewControllerStandard.cs:277 在 iSell.OS.ViewControllerStandard.Handle_GestoreInterfacciaStandardhandleRichiestaChiusuraInterfaccia () [0x00000] 在 /Sviluppo/Procedure/iSell/Versioni/iSelliOS/iOS/Interfaccie/Classi ausiliarie/ViewControllerStandard.cs:62 在 iSell.Core.GestoreInterfacciaStandard.ChiudiInterfaccia () [0x0000b] 在 /Sviluppo/Procedure/iSell/Comune/Interfacce/Client/GestoreInterfacciaStandard.cs:77 在 iSell.Core.GestoreInterfacciaVisualizzazioneSorgenteDati.Handle_SorgenteDatiInVisualizzazionehandleIndiceElementoDatiCorrenteInSezioneModificato (PL.Dati.SorgenteDati,PL.Dati.IndiceElementoDati) [0x0004b] 在 /Sviluppo/Procedure/iSell/Comune/Interfacce/Interazione utente/GestoreInterface 在(包装器委托调用).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] 在 iSell.OS.SorgenteTableViewStandard.RowSelected (MonoTouch.UIKit.UITableView,MonoTouch.Foundation.NSIndexPath) [0x00000] 在 /Sviluppo/Procedure/iSell/Versioni/iSelliOS/iOS/Interfaccie/Classi ausiliarie/SorgenteTableViewStandard.cs:298 at (wrapper runtime-invoke) .runtime_invoke_void__this_object_object (object,intptr,intptr,intptr) 在(包装器托管到本机)MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) 在 MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x0004c] 在 /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38 在 MonoTouch.UIKit.UIApplication.Main (string[]) [0x00000] 在 /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:43 在 /Sviluppo/Procedure/iSell/Versioni/iSelliOS/Main.cs:13 中的 iSell.OS.Application.Main (string[]) [0x00000] at (wrapper runtime-invoke) .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。这通常表明 单声道运行时或本机库之一中的致命错误

由您的应用程序使用。

有人可以帮我吗?

【问题讨论】:

  • 你的代码是什么样的?如果不知道自己在做什么,就很难确定任何事情。
  • 你解决过这个问题吗?我也有同样的问题。

标签: sqlite xamarin.ios


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-24
    • 2013-01-09
    • 1970-01-01
    • 1970-01-01
    • 2020-05-04
    相关资源
    最近更新 更多