Hi,
Wondering if anyone can help me with this issue. I have no problem running my app in debug mode on device and both debug + release mode on the simulator, however, when running release mode onto iphone 5, the app crashes at launch.
So I checked the compile settings and after playing around for a while, I found that the setting "Enable Optimizations" was causing this issue. Turning this on for Release causes the app to crash every time with the following msg (amongst others in console):
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
And crash report is very non-descript.
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3a971350 __pthread_kill + 8
1 libsystem_c.dylib 0x3a8e7fb2 pthread_kill + 54
2 libsystem_c.dylib 0x3a924366 abort + 90
3 MyApp 0x00be20e2 mono_handle_native_sigsegv (mini-exceptions.c:2380)
4 MyApp 0x00beb250 sigabrt_signal_handler (mini-posix.c:206)
5 libsystem_c.dylib 0x3a8f1d38 _sigtramp + 40
6 libsystem_c.dylib 0x3a8e7fb2 pthread_kill + 54
7 libsystem_c.dylib 0x3a924366 abort + 90
8 MyApp 0x00c4f1d4 monotouch_unhandled_exception_handler (monotouch-glue.m:1588)
9 MyApp 0x00be0288 mono_invoke_unhandled_exception_hook (mini-exceptions.c:2716)
10 MyApp 0x00bf29d2 mono_thread_abort_dummy (mini.c:2728)
11 MyApp 0x00be2bb6 mono_handle_exception_internal + 2146
12 MyApp 0x00be2c82 mono_handle_exception (mini-exceptions.c:1972)
13 MyApp 0x00bcb9a8 mono_arm_throw_exception (exceptions-arm.c:161)
14 MyApp 0x004332b4 throw_exception + 64
15 MyApp 0x00b9a5fe mono_error_raise_exception (mono-error.c:651)
16 MyApp 0x00b8675a ves_icall_get_method_info (icall.c:1719)
17 MyApp 0x003506f0 wrapper_managed_to_native_System_Reflection_MonoMethodInfo_get_method_info_intptr_System_Reflection_MonoMethodInfo_ + 96
18 MyApp 0x00350834 System_Reflection_MonoMethodInfo_GetMethodInfo_intptr + 72
19 MyApp 0x003514c0 System_Reflection_MonoMethod_GetPseudoCustomAttributes + 76
20 MyApp 0x002f10f0 System_MonoCustomAttrs_GetPseudoCustomAttributes_System_Reflection_ICustomAttributeProvider_System_Type + 164
21 MyApp 0x002f1478 System_MonoCustomAttrs_GetCustomAttributesBase_System_Reflection_ICustomAttributeProvider_System_Type_bool + 144
22 MyApp 0x002f1664 System_MonoCustomAttrs_GetCustomAttributes_System_Reflection_ICustomAttributeProvider_System_Type_bool + 132
23 MyApp 0x002f1518 System_MonoCustomAttrs_GetCustomAttribute_System_Reflection_ICustomAttributeProvider_System_Type_bool + 40
24 MyApp 0x002bc490 System_Attribute_GetCustomAttribute_System_Reflection_MemberInfo_System_Type_bool + 52
25 MyApp 0x002bc44c System_Attribute_GetCustomAttribute_System_Reflection_MemberInfo_System_Type + 36
26 MyApp 0x00219b2c MonoTouch_Registrar_OldDynamicRegistrar_RegisterMethods_System_Type (OldDynamicRegistrar.cs:391)
27 MyApp 0x00217e18 MonoTouch_Registrar_OldDynamicRegistrar_GetMethods_System_Type (OldDynamicRegistrar.cs:95)
28 MyApp 0x0021581c MonoTouch_ObjCRuntime_Class_GetMethods_System_Type (Class.cs:97)
29 MyApp 0x00217f54 MonoTouch_Registrar_OldDynamicRegistrar_GetMethodDescription_System_Type_intptr (OldDynamicRegistrar.cs:122)
30 MyApp 0x00216a64 MonoTouch_ObjCRuntime_Runtime_GetMethod_intptr_intptr (Runtime.cs:206)
31 MyApp 0x00274a9c wrapper_native_to_managed_MonoTouch_ObjCRuntime_Runtime_GetMethod_intptr_intptr (/<unknown>:1)
32 MyApp 0x00b68116 native_to_managed_trampoline_MyGolfCaddie_iOS_AppDelegate__ctor (registrar.m:1137)
33 UIKit 0x345e5260 UIApplicationMain + 1032
34 MyApp 0x0026f6d8 wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr (/<unknown>:1)
35 MyApp 0x0021db34 MonoTouch_UIKit_UIApplication_Main_string___string_string (UIApplication.cs:38)
36 MyApp 0x001b70bc MyGolfCaddie_iOS_Application_Main_string__ (/<unknown>:1)
37 MyApp 0x003fc648 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 196
38 MyApp 0x00bf25a4 mono_jit_runtime_invoke (mini.c:6428)
39 MyApp 0x00bf7840 mono_runtime_invoke (object.c:2827)
40 MyApp 0x00bfa4d2 mono_runtime_exec_main (object.c:4054)
41 MyApp 0x00bfa726 mono_runtime_run_main (object.c:3678)
42 MyApp 0x00bc0bea mono_jit_exec (driver.g.c:957)
43 MyApp 0x00c414ac main (main.m:485)
44 MyApp 0x001b7058 start + 36MyApp
Is this a bug with the current release of Xamarin?