Bug 233 - "Attempting to JIT compile method" when hooking SqliteConnection.Update event on device (not simulator)
Summary: "Attempting to JIT compile method" when hooking SqliteConnection.Update event...
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 4.x
Hardware: Macintosh Mac OS
: --- blocker
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2011-08-08 16:47 UTC by zachbarth
Modified: 2011-09-15 22:41 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
2nd try, supports removing events using null (165.50 KB, application/octet-stream)
2011-09-15 19:45 UTC, Sebastien Pouliot
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description zachbarth 2011-08-08 16:47:12 UTC
A MonoTouch application, running on a physical iOS device, throws an ExecutionEngineException when attempting to add a hook to the Update event on a Mono.Data.Sqlite.SqliteConnection object. This does not repro in the simulator, as the simulator is not bound by the AOT-only limitation.


Callstack:

Unhandled Exception: System.ExecutionEngineException: Attempting to JIT compile method '(wrapper native-to-managed) Mono.Data.Sqlite.SqliteConnection:UpdateCallback (intptr,int,intptr,intptr,long)' while running with --aot-only.
  
at (wrapper managed-to-native) Mono.Data.Sqlite.UnsafeNativeMethods:sqlite3_update_hook (intptr,Mono.Data.Sqlite.SQLiteUpdateCallback,intptr)
at Mono.Data.Sqlite.SQLite3.SetUpdateHook (Mono.Data.Sqlite.SQLiteUpdateCallback func) [0x00000] in <filename unknown>:0  
at Mono.Data.Sqlite.SqliteConnection.add_Update (Mono.Data.Sqlite.SQLiteUpdateEventHandler value) [0x00000] in <filename unknown>:0 
...


Sample Code:

Mono.Data.Sqlite.SqliteConnection sqlConnection = new Mono.Data.Sqlite.SqliteConnection("Data Source=:memory:");
sqlConnection.Open();
sqlConnection.Update += (sender, e) => {};


MonoTouch Version: 

4.0.4.1
Comment 1 Sebastien Pouliot 2011-08-08 17:11:23 UTC
I can duplicate the issue.
Comment 2 Sebastien Pouliot 2011-08-08 17:18:58 UTC
This happens with, or without, using the linker. Full stack trace from device:


Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: Key existed, the password is:
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: [0x3e4a148c:] EXCEPTION handling: System.NotImplementedException: Derived classes must implement it
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: "<unnamed thread>" tid=0x0x3e4a148c this=0x0xf66748 thread handle 0x103 state : not waiting owns ()
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at System.Reflection.Assembly.GetReferencedAssemblies () <0x00018>
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at Mono.Data.Sqlite.SqliteFunction..cctor () <0x00153>
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at Mono.Data.Sqlite.SQLite3.Open (string,Mono.Data.Sqlite.SQLiteOpenFlagsEnum,int,bool) <0x001eb>
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at Mono.Data.Sqlite.SqliteConnection.Open () <0x00577>
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at Keychain.AppDelegate.FinishedLaunching (MonoTouch.UIKit.UIApplication,MonoTouch.Foundation.NSDictionary) [0x0016d] in /Users/sebastienpouliot/git/monotouch-samples/Keychain/Keychain/Main.cs:81
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at MonoTouch.UIKit.UIApplication.Main (string[],string,string) <0x000cf>
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at MonoTouch.UIKit.UIApplication.Main (string[]) <0x00023>
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at Keychain.Application.Main (string[]) [0x00000] in /Users/sebastienpouliot/git/monotouch-samples/Keychain/Keychain/Main.cs:20
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: [0x3e4a148c:] EXCEPTION handling: System.ExecutionEngineException: Attempting to JIT compile method '(wrapper native-to-managed) Mono.Data.Sqlite.SqliteConnection:UpdateCallback (intptr,int,intptr,intptr,long)' while running with --aot-only.
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: "<unnamed thread>" tid=0x0x3e4a148c this=0x0xf66748 thread handle 0x103 state : not waiting owns ()
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at (wrapper managed-to-native) Mono.Data.Sqlite.UnsafeNativeMethods.sqlite3_update_hook (intptr,Mono.Data.Sqlite.SQLiteUpdateCallback,intptr) <0xffffffff>
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at Mono.Data.Sqlite.SQLite3.SetUpdateHook (Mono.Data.Sqlite.SQLiteUpdateCallback) <0x0003f>
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at Mono.Data.Sqlite.SqliteConnection.add_Update (Mono.Data.Sqlite.SQLiteUpdateEventHandler) <0x00093>
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at Keychain.AppDelegate.FinishedLaunching (MonoTouch.UIKit.UIApplication,MonoTouch.Foundation.NSDictionary) [0x00174] in /Users/sebastienpouliot/git/monotouch-samples/Keychain/Keychain/Main.cs:82
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at MonoTouch.UIKit.UIApplication.Main (string[],string,string) <0x000cf>
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at MonoTouch.UIKit.UIApplication.Main (string[]) <0x00023>
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at Keychain.Application.Main (string[]) [0x00000] in /Users/sebastienpouliot/git/monotouch-samples/Keychain/Keychain/Main.cs:20
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: Unhandled Exception: System.ExecutionEngineException: Attempting to JIT compile method '(wrapper native-to-managed) Mono.Data.Sqlite.SqliteConnection:UpdateCallback (intptr,int,intptr,intptr,long)' while running with --aot-only.
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at (wrapper managed-to-native) Mono.Data.Sqlite.UnsafeNativeMethods:sqlite3_update_hook (intptr,Mono.Data.Sqlite.SQLiteUpdateCallback,intptr)
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at Mono.Data.Sqlite.SQLite3.SetUpdateHook (Mono.Data.Sqlite.SQLiteUpdateCallback func) [0x00000] in <filename unknown>:0
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at Mono.Data.Sqlite.SqliteConnection.add_Update (Mono.Data.Sqlite.SQLiteUpdateEventHandler value) [0x00000] in <filename unknown>:0
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at Keychain.AppDelegate.FinishedLaunching (MonoTouch.UIKit.UIApplication app, MonoTouch.Foundation.NSDictionary options) [0x00174] in /Users/sebastienpouliot/git/monotouch-samples/Keychain/Keychain/Main.cs:82
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00000] in <filename unknown>:0
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at MonoTouc
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: h.UIKit.UIApplication.Main (System.String[] args) [0x00000] in <filename unknown>:0
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at Keychain.Application.Main (System.String[] args) [0x00000] in /Users/sebastienpouliot/git/monotouch-samples/Keychain/Keychain/Main.cs:20
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: [ERROR] FATAL UNHANDLED EXCEPTION: System.ExecutionEngineException: Attempting to JIT compile method '(wrapper native-to-managed) Mono.Data.Sqlite.SqliteConnection:UpdateCallback (intptr,int,intptr,intptr,long)' while running with --aot-only.
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at (wrapper managed-to-native) Mono.Data.Sqlite.UnsafeNativeMethods:sqlite3_update_hook (intptr,Mono.Data.Sqlite.SQLiteUpdateCallback,intptr)
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at Mono.Data.Sqlite.SQLite3.SetUpdateHook (Mono.Data.Sqlite.SQLiteUpdateCallback func) [0x00000] in <filename unknown>:0
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at Mono.Data.Sqlite.SqliteConnection.add_Update (Mono.Data.Sqlite.SQLiteUpdateEventHandler value) [0x00000] in <filename unknown>:0
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at Keychain.AppDelegate.FinishedLaunching (MonoTouch.UIKit.UIApplication app, MonoTouch.Foundation.NSDictionary options) [0x00174] in /Users/sebastienpouliot/git/monotouch-samples/Keychain/Keychain/Main.cs:82
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00000] in <filename unknown>:0
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at MonoTouch.UIKit.UIApplication.Main (System.String[] args) [0x00000] in <filename unknown>:0
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>:   at Keychain.Application.Main (System.String[] args) [0x00000] in /Users/sebastienpouliot/git/monotouch-samples/Keychain/Keychain/Main.cs:20
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: Terminating runtime due to unhandled exception
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: Stacktrace:
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: Native stacktrace:
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	0   Keychain                            0x0052ebb8 mono_handle_native_sigsegv + 412
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	1   Keychain                            0x00556ae0 sigabrt_signal_handler + 148
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	2   libsystem_c.dylib                   0x32c9b72f _sigtramp + 42
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	3   libsystem_c.dylib                   0x32c903bb pthread_kill + 58
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	4   libsystem_c.dylib                   0x32c88bff abort + 78
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	5   Keychain                            0x00675154 monoeg_g_logv + 248
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	6   Keychain                            0x006751e8 monoeg_assertion_message + 44
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	7   Keychain                            0x0050f624 mono_thread_abort + 224
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	8   Keychain                            0x0052df58 mono_handle_exception_internal + 2436
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	9   Keychain                            0x0052e840 mono_handle_exception + 108
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	10  Keychain                            0x00554ae4 mono_arm_throw_exception + 324
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	11  Keychain                            0x004acffc throw_exception + 48
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	12  Keychain                            0x0051260c mono_jit_compile_method + 136
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	13  Keychain                            0x005fe410 mono_compile_method + 84
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	14  Keychain                            0x005c1d34 mono_delegate_to_ftnptr + 436
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	15  Keychain                            0x004728a0 wrapper_managed_to_native_object___icall_wrapper_mono_delegate_to_ftnptr_object + 60
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	16  Keychain                            0x00056de4 Mono_Data_Sqlite_SqliteConnection_add_Update_Mono_Data_Sqlite_SQLiteUpdateEventHandler + 148
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	17  Keychain                            0x000b49d4 Keychain_AppDelegate_FinishedLaunching_MonoTouch_UIKit_UIApplication_MonoTouch_Foundation_NSDictionary + 3144
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	18  Keychain                            0x00470778 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	19  Keychain                            0x005136dc mono_jit_runtime_invoke + 2800
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	20  Keychain                            0x00604820 mono_runtime_invoke + 140
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	21  Keychain                            0x00693ecc monotouch_trampoline + 2840
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	22  UIKit                               0x3372f821 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 772
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	23  UIKit                               0x33729b65 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 272
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	24  UIKit                               0x336fe7d7 -[UIApplication handleEvent:withNewEvent:] + 1114
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	25  UIKit                               0x336fe215 -[UIApplication sendEvent:] + 44
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	26  UIKit                               0x336fdc53 _UIApplicationHandleEvent + 5090
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	27  GraphicsServices                    0x336f1e77 PurpleEventCallback + 666
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	28  CoreFoundation                      0x34b37a97 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	29  CoreFoundation                      0x34b3983f __CFRunLoopDoSource1 + 166
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	30  CoreFoundation                      0x34b3a60d __CFRunLoopRun + 520
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	31  CoreFoundation                      0x34acaec3 CFRunLoopRunSpecific + 230
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	32  CoreFoundation                      0x34acadcb CFRunLoopRunInMode + 58
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	33  UIKit                               0x33728d49 -[UIApplication _run] + 372
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	34  UIKit                               0x33726807 UIApplicationMain + 670
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	35  Keychain                            0x0023f590 wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 240
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	36  Keychain                            0x00226f4c MonoTouch_UIKit_UIApplication_Main_string__ + 36
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	37  Keychain                            0x000b53ac Keychain_Application_Main_string__ + 128
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	38  Keychain                            0x00470778 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	39  Keychain                            0x005136dc mono_jit_runtime_invoke + 2800
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	40  Keychain                            0x00604820 mono_runtime_invoke + 140
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	41  Keychain                            0x006077d0 mono_runtime_exec_main + 784
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	42  Keychain                            0x00606834 mono_runtime_run_main + 1048
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	43  Keychain                            0x0051bd3c mono_jit_exec + 216
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	44  Keychain                            0x0050de7c main + 4976
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: 	45  Keychain                            0x00002ab8 start + 40
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: Debug info from gdb:
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: =================================================================
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: Got a SIGABRT while executing native code. This usually indicates
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: a fatal error in the mono runtime or one of the native libraries
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: used by your application.
Aug  8 17:18:02 unknown UIKitApplication:keychain[0xe2a2][1810] <Notice>: =================================================================
Comment 3 Sebastien Pouliot 2011-08-08 20:59:17 UTC
I missed the 'wrapper native-to-managed', that's native code calling back into managed code and afaik that needs a [MonoPInvokeCallback] attribute to work under iOS (to give the required hint to the AOT compiler). However this looks like it happens inside SQLite assembly, so it may not be easy to fix from user code.
Comment 4 Sebastien Pouliot 2011-08-08 21:44:18 UTC
It's not easy to fix inside SQLite either since the callbacks (there are many beside this one) must be static.
http://docs.go-mono.com/MonoTouch.MonoPInvokeCallbackAttribute
Comment 5 Sebastien Pouliot 2011-08-09 08:09:48 UTC
Known limitation: http://ios.xamarin.com/Documentation/Limitations#Reverse_Callbacks

I've opened #238 to track this MonoTouch enhancement (this will link both bug entries).

*** This bug has been marked as a duplicate of bug 238 ***
Comment 6 Sebastien Pouliot 2011-08-15 09:44:06 UTC
It does not look like the limitation from bug #238 will be removed soon.

Re-opening the bug so we can fix the SQLite code to workaround the limitation.
Comment 7 zachbarth 2011-09-01 18:13:42 UTC
Is there any ETA on when this will be fixed? This issue is currently blocking us.
Comment 8 Sebastien Pouliot 2011-09-15 19:45:33 UTC
Created attachment 393 [details]
2nd try, supports removing events using null
Comment 9 Sebastien Pouliot 2011-09-15 19:49:28 UTC
Thanks for your test case. The new version (in comment #8) work with the event removal. Let me know if there are other issues (or if it works).
Comment 10 zachbarth 2011-09-15 20:09:43 UTC
This appears to fully work. Thanks!
Comment 11 Sebastien Pouliot 2011-09-15 20:14:28 UTC
Great! I'll start pushing my changes across our GIT branches. Keep this assembly until newer releases are available :-)
Comment 12 Sebastien Pouliot 2011-09-15 22:41:33 UTC
Fix was committed in 'master', 'mono-2-10', 'mobile-master' and 'monotouch-4.2' and will be part of future MonoTouch 4.2.x and 4.x releases.

Thanks again for testing the fixes and please re-open the bug if you find other issues related to those events.