[Mono-bugs] [Bug 696025] New: App crash in sqlite dll on performing an Update statement

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed May 25 12:06:05 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=696025

https://bugzilla.novell.com/show_bug.cgi?id=696025#c0


           Summary: App crash in sqlite dll on performing an Update
                    statement
    Classification: Mono
           Product: MonoTouch
           Version: unspecified
          Platform: iPad
        OS/Version: Apple iOS 4.2
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Runtime
        AssignedTo: frego at novell.com
        ReportedBy: andrew.hough at ieg4.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Opera/9.80 (Macintosh; Intel Mac OS X 10.6.7; U; en)
Presto/2.8.131 Version/11.11

Hi,

I have a method that does the following 

public void ExecuteSQLWithNoResults(
    string sqlStatement)
{

// Method Variables 

    SqliteCommand command = new SqliteCommand();

    SqliteConnection connection = new SqliteConnection(this.ConnectionString);

    SqliteTransaction transaction = null;

// Method Code 

// Set the command 

try
{
    connection.Open();
    command.Connection = connection;
    transaction = connection.BeginTransaction();
    command.Transaction = transaction;
    command.CommandText = sqlStatement;
}
catch( SqliteException ex )
{
    connection.Close();
    // Throw the user friendly exception 
    throw new Exception("Could not build database command.", ex);

}    

// Execute the command
try
{
    command.ExecuteNonQuery();
    command.Transaction.Commit();
}
catch( SqliteException ex )
{
    command.Transaction.Rollback();
    // Throw the user friendly exception 
    throw new Exception("Could not execute database command.", ex);
}
finally
{
    connection.Close();
}

}

The problem is that it occupationally crashes the application back to the os
with the following stack dump.

Stacktrace:

  at (wrapper managed-to-native)
Mono.Data.Sqlite.UnsafeNativeMethods.sqlite3_prepare
(intptr,intptr,int,intptr&,intptr&) <IL 0x0002a, 0xffffffff>
  at Mono.Data.Sqlite.SQLite3.Prepare
(Mono.Data.Sqlite.SqliteConnection,string,Mono.Data.Sqlite.SqliteStatement,uint,string&)
[0x00044] in
/Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLite3.cs:258
  at Mono.Data.Sqlite.SqliteCommand.BuildNextCommand () [0x00019] in
/Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLiteCommand.cs:230
  at Mono.Data.Sqlite.SqliteCommand.GetStatement (int) [0x0000b] in
/Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLiteCommand.cs:264
  at (wrapper remoting-invoke-with-check)
Mono.Data.Sqlite.SqliteCommand.GetStatement (int) <IL 0x00039, 0xffffffff>
  at Mono.Data.Sqlite.SqliteDataReader.NextResult () [0x000cc] in
/Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLiteDataReader.cs:891
  at Mono.Data.Sqlite.SqliteDataReader..ctor
(Mono.Data.Sqlite.SqliteCommand,System.Data.CommandBehavior) [0x00051] in
/Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLiteDataReader.cs:89
  at (wrapper remoting-invoke-with-check)
Mono.Data.Sqlite.SqliteDataReader..ctor
(Mono.Data.Sqlite.SqliteCommand,System.Data.CommandBehavior) <IL 0x00021,
0xffffffff>
  at Mono.Data.Sqlite.SqliteCommand.ExecuteReader (System.Data.CommandBehavior)
[0x00006] in
/Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLiteCommand.cs:539
  at Mono.Data.Sqlite.SqliteCommand.ExecuteNonQuery () [0x00000] in
/Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLiteCommand.cs:568
  at IEG4.HousingPoint.iPad.DataAccessLayer.SQLiteDAL.ExecuteSQLWithNoResults
(string) [0x00053] in
/Users/andyhough/Documents/monotouch/gibbensr-multipledetailviews-45ad521ba980/IEG4.HousingPoint.iPad.DataAccessLayer/SQLiteDAL.cs:175
  at IEG4.HousingPoint.iPad.DataAccessLayer.LookupValueDAL.UpdateLookUpValue
(int,int,string,string,int,string,string,string,string) [0x00052] in
/Users/andyhough/Documents/monotouch/gibbensr-multipledetailviews-45ad521ba980/IEG4.HousingPoint.iPad.DataAccessLayer/LookupValueDAL.cs:337
  at IEG4.HousingPoint.iPad.Integration.Integration.UpdateLookUpValues
(string,string) [0x002a3] in
/Users/andyhough/Documents/monotouch/gibbensr-multipledetailviews-45ad521ba980/IEG4.HousingPoint.iPad.Integration/Integration.cs:454
  at IEG4.HousingPoint.iPad.Integration.Integration.UpdateLookUpData ()
[0x00010] in
/Users/andyhough/Documents/monotouch/gibbensr-multipledetailviews-45ad521ba980/IEG4.HousingPoint.iPad.Integration/Integration.cs:28
  at MultipleDetailViews.RootViewController/TableDelegate.RowSelected
(MonoTouch.UIKit.UITableView,MonoTouch.Foundation.NSIndexPath) [0x00040] in
/Users/andyhough/Documents/monotouch/gibbensr-multipledetailviews-45ad521ba980/MultipleDetailViews/RootViewController.cs:156
  at (wrapper runtime-invoke)
<Module>.runtime_invoke_void__this___object_object
(object,intptr,intptr,intptr) <IL 0x0005a, 0xffffffff>
  at (wrapper managed-to-native)
MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr)
<IL 0x0009f, 0xffffffff>
  at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x00038] in
/Users/plasma/Source/iphone/monotouch/UIKit/UIApplication.cs:26
  at MonoTouch.UIKit.UIApplication.Main (string[]) [0x00000] in
/Users/plasma/Source/iphone/monotouch/UIKit/UIApplication.cs:31
  at MultipleDetailViews.Application.Main (string[]) [0x00000] in
/Users/andyhough/Documents/monotouch/gibbensr-multipledetailviews-45ad521ba980/MultipleDetailViews/Main.cs:14
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object
(object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff>

Native stacktrace:

    0   MultipleDetailViews                 0x000d1965
mono_handle_native_sigsegv + 343
    1   MultipleDetailViews                 0x0000ffb4
mono_sigsegv_signal_handler + 322
    2   libSystem.B.dylib                   0x931b545b _sigtramp + 43
    3   ???                                 0xffffffff 0x0 + 4294967295
    4   libsqlite3.dylib                    0x03564111 sqlite3DbStrNDup + 33
    5   libsqlite3.dylib                    0x0356a493 sqlite3VdbeChangeP4 +
163
    6   libsqlite3.dylib                    0x0356ac96 sqlite3VdbeAddOp4 + 54
    7   libsqlite3.dylib                    0x035786ed sqlite3ExprCodeTarget +
1613
    8   libsqlite3.dylib                    0x0357a777 sqlite3ExprCode + 23
    9   libsqlite3.dylib                    0x0358fee9 sqlite3Update + 2809
    10  libsqlite3.dylib                    0x03595edc sqlite3Parser + 13724
    11  libsqlite3.dylib                    0x035974de sqlite3RunParser + 398
    12  libsqlite3.dylib                    0x03597a50 sqlite3Prepare + 256
    13  libsqlite3.dylib                    0x03597ed7 sqlite3LockAndPrepare +
151
    14  ???                                 0x0d8d7e67 0x0 + 227376743
    15  ???                                 0x0d8d718c 0x0 + 227373452
    16  ???                                 0x0d8d6cc7 0x0 + 227372231
    17  ???                                 0x0d8d69fa 0x0 + 227371514
    18  ???                                 0x0d8d697a 0x0 + 227371386
    19  ???                                 0x0d8d635a 0x0 + 227369818
    20  ???                                 0x0d8d5eac 0x0 + 227368620
    21  ???                                 0x0d8d5d46 0x0 + 227368262
    22  ???                                 0x0d8d5156 0x0 + 227365206
    23  ???                                 0x0d8d4ff8 0x0 + 227364856
    24  ???                                 0x0dfa0751 0x0 + 234489681
    25  ???                                 0x0dfeeabe 0x0 + 234810046
    26  ???                                 0x0dfa32b2 0x0 + 234500786
    27  ???                                 0x0defb942 0x0 + 233814338
    28  ???                                 0x0defb1f0 0x0 + 233812464
    29  ???                                 0x0defb88b 0x0 + 233814155
    30  MultipleDetailViews                 0x0000fd6f mono_jit_runtime_invoke
+ 1332
    31  MultipleDetailViews                 0x001ee239 mono_runtime_invoke +
137
    32  MultipleDetailViews                 0x0029e9ab monotouch_trampoline +
2527
    33  UIKit                               0x01c7f794 -[UITableView
_selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1140
    34  UIKit                               0x01c75d50 -[UITableView
_userSelectRowAtPendingSelectionIndexPath:] + 219
    35  Foundation                          0x0137d7f6 __NSFireDelayedPerform +
441
    36  CoreFoundation                      0x00e20fe3
__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 19
    37  CoreFoundation                      0x00e22594 __CFRunLoopDoTimer +
1220
    38  CoreFoundation                      0x00d7ecc9 __CFRunLoopRun + 1817
    39  CoreFoundation                      0x00d7e240 CFRunLoopRunSpecific +
208
    40  CoreFoundation                      0x00d7e161 CFRunLoopRunInMode + 97
    41  GraphicsServices                    0x03ede268 GSEventRunModal + 217
    42  GraphicsServices                    0x03ede32d GSEventRun + 115
    43  UIKit                               0x01c1842e UIApplicationMain + 1160
    44  ???                                 0x07faa14b 0x0 + 133865803
    45  ???                                 0x07fa9f1c 0x0 + 133865244
    46  ???                                 0x07fa951c 0x0 + 133862684
    47  ???                                 0x07fa9374 0x0 + 133862260
    48  ???                                 0x07fa94c6 0x0 + 133862598
    49  MultipleDetailViews                 0x0000fd6f mono_jit_runtime_invoke
+ 1332
    50  MultipleDetailViews                 0x001ee239 mono_runtime_invoke +
137
    51  MultipleDetailViews                 0x001f0920 mono_runtime_exec_main +
669
    52  MultipleDetailViews                 0x001efd0a mono_runtime_run_main +
843
    53  MultipleDetailViews                 0x000a3c62 mono_jit_exec + 200
    54  MultipleDetailViews                 0x002a25eb main + 3838
    55  MultipleDetailViews                 0x000030c9 _start + 208
    56  MultipleDetailViews                 0x00002ff8 start + 40

Debug info from gdb:

/tmp/mono-gdb-commands.JxfChi:1: Error in sourced command file:
unable to debug self

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================





Reproducible: Always

Steps to Reproduce:
1.
2.
3.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list