Xamarin iOS SIGABRT Crash

1

I have a Xamarin iOS app that keep crashing, crash report below.

I can't make heads or tails of what the problem is or where it's happening. It seems like it could be a json issue maybe? Any help would be great.

Exception Type:  SIGABRT
Exception Codes: #0 at 0x23464c84
Crashed Thread:  7

Thread 0:
0   libsystem_kernel.dylib               0x23450c24 mach_msg_trap + 20
1   CoreFoundation                       0x23793355 __CFRunLoopServiceMachPort + 134
2   CoreFoundation                       0x237916dd __CFRunLoopRun + 1034
3   CoreFoundation                       0x236e4bf9 CFRunLoopRunSpecific + 518
4   CoreFoundation                       0x236e49e5 CFRunLoopRunInMode + 106
5   GraphicsServices                     0x24930ac9 GSEventRunModal + 158
6   UIKit                                0x27974ba1 UIApplicationMain + 142
7   IntooligenceMobileiOS                0x0020630c wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 270
8   IntooligenceMobileiOS                0x0019c434 MonoTouch_UIKit_UIApplication_Main_string___intptr_intptr + 50
9   IntooligenceMobileiOS                0x0019c3f4 MonoTouch_UIKit_UIApplication_Main_string___string_string + 202
10  IntooligenceMobileiOS                0x000b7680 Intooligence_Mobile_iOS_Application_Main_string__ + 46
11  IntooligenceMobileiOS                0x0046ee54 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 254
12  IntooligenceMobileiOS                0x00ad3ff7 mono_jit_runtime_invoke (mini-runtime.c:2323)
13  IntooligenceMobileiOS                0x00b24855 mono_runtime_invoke (object.c:2783)
14  IntooligenceMobileiOS                0x00b27f17 mono_runtime_exec_main (object.c:4040)
15  IntooligenceMobileiOS                0x00b89528 xamarin_main (monotouch-main.m:404)
16  IntooligenceMobileiOS                0x00a4afd1 main (main.armv7.m:59)
17  ???                                  0x23393873 0x0 + 0

Thread 1:
0   libsystem_kernel.dylib               0x23466320 kevent_qos + 24
1   libdispatch.dylib                    0x2335ddf7 _dispatch_mgr_thread$VARIANT$mp + 36

Thread 2:
0   libsystem_kernel.dylib               0x23450c74 semaphore_wait_trap + 8
1   IntooligenceMobileiOS                0x00afc2ab finalizer_thread (gc.c:1096)
2   IntooligenceMobileiOS                0x00b3ff47 start_wrapper (threads.c:723)
3   IntooligenceMobileiOS                0x00b59889 inner_start_thread (mono-threads-posix.c:97)
4   IntooligenceMobileiOS                0x00b72cb7 GC_start_routine (pthread_support.c:1502)
5   libsystem_pthread.dylib              0x2350985b _pthread_body + 136
6   libsystem_pthread.dylib              0x235097cf _pthread_start + 108
7   libsystem_pthread.dylib              0x23507724 thread_start + 6

Thread 3:
0   libsystem_kernel.dylib               0x234649c0 __psynch_cvwait + 24
1   libsystem_pthread.dylib              0x23509c99 pthread_cond_wait + 38
2   IntooligenceMobileiOS                0x00b3a9fb worker_thread (threadpool-ms.c:501)
3   IntooligenceMobileiOS                0x00b3ff47 start_wrapper (threads.c:723)
4   IntooligenceMobileiOS                0x00b59889 inner_start_thread (mono-threads-posix.c:97)
5   IntooligenceMobileiOS                0x00b72cb7 GC_start_routine (pthread_support.c:1502)
6   libsystem_pthread.dylib              0x2350985b _pthread_body + 136
7   libsystem_pthread.dylib              0x235097cf _pthread_start + 108
8   libsystem_pthread.dylib              0x23507724 thread_start + 6

Thread 4:
0   libsystem_kernel.dylib               0x234649c0 __psynch_cvwait + 24
1   libsystem_pthread.dylib              0x23509c99 pthread_cond_wait + 38
2   IntooligenceMobileiOS                0x00b3a9fb worker_thread (threadpool-ms.c:501)
3   IntooligenceMobileiOS                0x00b3ff47 start_wrapper (threads.c:723)
4   IntooligenceMobileiOS                0x00b59889 inner_start_thread (mono-threads-posix.c:97)
5   IntooligenceMobileiOS                0x00b72cb7 GC_start_routine (pthread_support.c:1502)
6   libsystem_pthread.dylib              0x2350985b _pthread_body + 136
7   libsystem_pthread.dylib              0x235097cf _pthread_start + 108
8   libsystem_pthread.dylib              0x23507724 thread_start + 6

Thread 5:
0   libsystem_kernel.dylib               0x23450c24 mach_msg_trap + 20
1   CoreFoundation                       0x23793355 __CFRunLoopServiceMachPort + 134
2   CoreFoundation                       0x237916dd __CFRunLoopRun + 1034
3   CoreFoundation                       0x236e4bf9 CFRunLoopRunSpecific + 518
4   CoreFoundation                       0x236e49e5 CFRunLoopRunInMode + 106
5   CFNetwork                            0x23d2781f +[NSURLConnection(Loader) _resourceLoadLoop:] + 484
6   Foundation                           0x23fe9165 __NSThread__start__ + 1146
7   libsystem_pthread.dylib              0x2350985b _pthread_body + 136
8   libsystem_pthread.dylib              0x235097cf _pthread_start + 108
9   libsystem_pthread.dylib              0x23507724 thread_start + 6

Thread 6:
0   libsystem_kernel.dylib               0x23464f14 __select + 20
1   libsystem_pthread.dylib              0x2350985b _pthread_body + 136
2   libsystem_pthread.dylib              0x235097cf _pthread_start + 108
3   libsystem_pthread.dylib              0x23507724 thread_start + 6

Thread 7 Crashed:
0   libsystem_kernel.dylib               0x23464c84 __pthread_kill + 8
1   libsystem_pthread.dylib              0x2350a733 pthread_kill + 60
2   libsystem_c.dylib                    0x233fb0ad abort + 106
3   IntooligenceMobileiOS                0x00b68efd GC_add_to_heap (alloc.c:840)
4   IntooligenceMobileiOS                0x00b69119 GC_expand_hp_inner (alloc.c:994)
5   IntooligenceMobileiOS                0x00b6928d GC_collect_or_expand (alloc.c:1070)
6   IntooligenceMobileiOS                0x00b6943f GC_allocobj (alloc.c:1125)
7   IntooligenceMobileiOS                0x00b6dadb GC_generic_malloc_inner (malloc.c:136)
8   IntooligenceMobileiOS                0x00b6dc73 GC_generic_malloc (malloc.c:192)
9   IntooligenceMobileiOS                0x00b6dd7d GC_malloc_atomic (malloc.c:270)
10  IntooligenceMobileiOS                0x00ae2953 mono_gc_alloc_string (boehm-gc.c:680)
11  IntooligenceMobileiOS                0x00314700 wrapper_managed_to_native_string_FastAllocateString_int + 90
12  IntooligenceMobileiOS                0x00314960 string_CtorCharArrayStartLength_char___int_int + 86
13  IntooligenceMobileiOS                0x0031b060 string_CreateString_char___int_int + 50
14  IntooligenceMobileiOS                0x00312190 wrapper_managed_to_managed_string__ctor_char___int_int + 50
15  IntooligenceMobileiOS                0x003ea500 System_NumberFormatter_FormatDecimal_int_System_Globalization_NumberFormatInfo + 142
16  IntooligenceMobileiOS                0x003e9d64 System_NumberFormatter_IntegerToString_string_System_IFormatProvider + 222
17  IntooligenceMobileiOS                0x003e993c System_NumberFormatter_NumberToString_string_long_System_IFormatProvider + 94
18  IntooligenceMobileiOS                0x002bf160 System_Number_FormatInt64_long_string_System_Globalization_NumberFormatInfo + 50
19  IntooligenceMobileiOS                0x002adcb4 ut_2706 + 82
20  IntooligenceMobileiOS                0x008d11ec Newtonsoft_Json_JsonConvert_ToString_long + 90
21  IntooligenceMobileiOS                0x008dd3fc Newtonsoft_Json_JsonTextWriter_WriteValue_long + 50
22  IntooligenceMobileiOS                0x008f8ce8 Newtonsoft_Json_Linq_JValue_WriteTo_Newtonsoft_Json_JsonWriter_Newtonsoft_Json_JsonConverter__ + 522
23  IntooligenceMobileiOS                0x008f5a00 Newtonsoft_Json_Linq_JProperty_WriteTo_Newtonsoft_Json_JsonWriter_Newtonsoft_Json_JsonConverter__ + 90
24  IntooligenceMobileiOS                0x008f34cc Newtonsoft_Json_Linq_JObject_WriteTo_Newtonsoft_Json_JsonWriter_Newtonsoft_Json_JsonConverter__ + 94
25  IntooligenceMobileiOS                0x008e53f0 Newtonsoft_Json_Linq_JToken_ToString_Newtonsoft_Json_Formatting_Newtonsoft_Json_JsonConverter__ + 234
26  IntooligenceMobileiOS                0x008e52f8 Newtonsoft_Json_Linq_JToken_ToString + 58
27  IntooligenceMobileiOS                0x0081d098 Intooligence_Mobile_Core_Sync_SyncAdapter_ProcessSyncResponse_string + 2722
28  IntooligenceMobileiOS                0x0081b390 Intooligence_Mobile_Core_Sync_SyncAdapter_DoSync_int_bool + 638
29  IntooligenceMobileiOS                0x0081a938 Intooligence_Mobile_Core_Sync_SyncAdapter_SyncSynchronously_bool + 706
30  IntooligenceMobileiOS                0x0085b254 Intooligence_Mobile_Core_Sync_SyncAdapter__BeginSyncc__AnonStorey0__m__0 + 30
31  IntooligenceMobileiOS                0x00346620 System_Threading_Tasks_Task_InnerInvoke + 98
32  IntooligenceMobileiOS                0x00345e2c System_Threading_Tasks_Task_Execute + 90
33  IntooligenceMobileiOS                0x003465b0 System_Threading_Tasks_Task_ExecutionContextCallback_object + 98
34  IntooligenceMobileiOS                0x0034f930 System_Threading_ExecutionContext_RunInternal_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool + 490
35  IntooligenceMobileiOS                0x0034f738 System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool + 50
36  IntooligenceMobileiOS                0x00346514 System_Threading_Tasks_Task_ExecuteWithThreadLocal_System_Threading_Tasks_Task_ + 354
37  IntooligenceMobileiOS                0x00346328 System_Threading_Tasks_Task_ExecuteEntry_bool + 230
38  IntooligenceMobileiOS                0x003461cc System_Threading_Tasks_Task_System_Threading_IThreadPoolWorkItem_ExecuteWorkItem + 30
39  IntooligenceMobileiOS                0x00353250 System_Threading_ThreadPoolWorkQueue_Dispatch + 554
40  IntooligenceMobileiOS                0x003549fc System_Threading__ThreadPoolWaitCallback_PerformWaitCallback + 18
41  IntooligenceMobileiOS                0x0046ee54 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 254
42  IntooligenceMobileiOS                0x00ad3ff7 mono_jit_runtime_invoke (mini-runtime.c:2323)
43  IntooligenceMobileiOS                0x00b24855 mono_runtime_invoke (object.c:2783)
44  IntooligenceMobileiOS                0x00b3a913 worker_thread (threadpool-ms.c:623)
45  IntooligenceMobileiOS                0x00b3ff47 start_wrapper (threads.c:723)
46  IntooligenceMobileiOS                0x00b59889 inner_start_thread (mono-threads-posix.c:97)
47  IntooligenceMobileiOS                0x00b72cb7 GC_start_routine (pthread_support.c:1502)
48  libsystem_pthread.dylib              0x2350985b _pthread_body + 136
49  libsystem_pthread.dylib              0x235097cf _pthread_start + 108
50  libsystem_pthread.dylib              0x23507724 thread_start + 6

Thread 8:
0   libsystem_kernel.dylib               0x234649c0 __psynch_cvwait + 24
1   libsystem_pthread.dylib              0x23509cd9 pthread_cond_timedwait + 42
2   IntooligenceMobileiOS                0x00b43d83 _wapi_handle_timedwait_signal_handle (handles.c:1514)
3   IntooligenceMobileiOS                0x00b4e32d wapi_WaitForSingleObjectEx (wait.c:196)
4   IntooligenceMobileiOS                0x00b3cd0d ves_icall_System_Threading_WaitHandle_WaitOne_internal (threads.c:1447)
5   IntooligenceMobileiOS                0x003d1bf8 wrapper_managed_to_native_System_Threading_WaitHandle_WaitOne_internal_System_Threading_WaitHandle_intptr_int_bool + 126
6   IntooligenceMobileiOS                0x003d1f24 System_Threading_WaitHandle_WaitOne_int_bool + 142
7   IntooligenceMobileiOS                0x003d1fc0 System_Threading_WaitHandle_WaitOne_int + 50
8   IntooligenceMobileiOS                0x003d15a4 System_Threading_Timer_Scheduler_SchedulerThread + 2090
9   IntooligenceMobileiOS                0x00350b20 System_Threading_ThreadHelper_ThreadStart_Context_object + 206
10  IntooligenceMobileiOS                0x0034f930 System_Threading_ExecutionContext_RunInternal_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool + 490
11  IntooligenceMobileiOS                0x0034f738 System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool + 50
12  IntooligenceMobileiOS                0x0034f6b8 System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object + 98
13  IntooligenceMobileiOS                0x00350c74 System_Threading_ThreadHelper_ThreadStart + 62
14  IntooligenceMobileiOS                0x0046ee54 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 254
15  IntooligenceMobileiOS                0x00ad3ff7 mono_jit_runtime_invoke (mini-runtime.c:2323)
16  IntooligenceMobileiOS                0x00b24855 mono_runtime_invoke (object.c:2783)
17  IntooligenceMobileiOS                0x00b3ffbb start_wrapper (threads.c:729)
18  IntooligenceMobileiOS                0x00b59889 inner_start_thread (mono-threads-posix.c:97)
19  IntooligenceMobileiOS                0x00b72cb7 GC_start_routine (pthread_support.c:1502)
20  libsystem_pthread.dylib              0x2350985b _pthread_body + 136
21  libsystem_pthread.dylib              0x235097cf _pthread_start + 108
22  libsystem_pthread.dylib              0x23507724 thread_start + 6

Thread 9:
0   libsystem_kernel.dylib               0x23464f14 __select + 20
1   IntooligenceMobileiOS                0x00b37b85 poll_event_wait (threadpool-ms-io-poll.c:152)
2   IntooligenceMobileiOS                0x00b376cb selector_thread (threadpool-ms-io.c:447)
3   IntooligenceMobileiOS                0x00b3ff47 start_wrapper (threads.c:723)
4   IntooligenceMobileiOS                0x00b59889 inner_start_thread (mono-threads-posix.c:97)
5   IntooligenceMobileiOS                0x00b72cb7 GC_start_routine (pthread_support.c:1502)
6   libsystem_pthread.dylib              0x2350985b _pthread_body + 136
7   libsystem_pthread.dylib              0x235097cf _pthread_start + 108
8   libsystem_pthread.dylib              0x23507724 thread_start + 6

Thread 10:
0   libsystem_kernel.dylib               0x234649c0 __psynch_cvwait + 24
1   libsystem_pthread.dylib              0x23509c99 pthread_cond_wait + 38
2   IntooligenceMobileiOS                0x00b3a9fb worker_thread (threadpool-ms.c:501)
3   IntooligenceMobileiOS                0x00b3ff47 start_wrapper (threads.c:723)
4   IntooligenceMobileiOS                0x00b59889 inner_start_thread (mono-threads-posix.c:97)
5   IntooligenceMobileiOS                0x00b72cb7 GC_start_routine (pthread_support.c:1502)
6   libsystem_pthread.dylib              0x2350985b _pthread_body + 136
7   libsystem_pthread.dylib              0x235097cf _pthread_start + 108
8   libsystem_pthread.dylib              0x23507724 thread_start + 6

Thread 11:
0   libsystem_kernel.dylib               0x234649c0 __psynch_cvwait + 24
1   libsystem_pthread.dylib              0x23509c99 pthread_cond_wait + 38
2   IntooligenceMobileiOS                0x00b3a9fb worker_thread (threadpool-ms.c:501)
3   IntooligenceMobileiOS                0x00b3ff47 start_wrapper (threads.c:723)
4   IntooligenceMobileiOS                0x00b59889 inner_start_thread (mono-threads-posix.c:97)
5   IntooligenceMobileiOS                0x00b72cb7 GC_start_routine (pthread_support.c:1502)
6   libsystem_pthread.dylib              0x2350985b _pthread_body + 136
7   libsystem_pthread.dylib              0x235097cf _pthread_start + 108
8   libsystem_pthread.dylib              0x23507724 thread_start + 6

Thread 12:
0   libsystem_kernel.dylib               0x2346588c __workq_kernreturn + 8
1   libsystem_pthread.dylib              0x23507718 start_wqthread + 6

Thread 13:
0   libsystem_kernel.dylib               0x23465024 __semwait_signal + 24
1   IntooligenceMobileiOS                0x00b4f6a5 wapi_SleepEx (wthreads.c:289)
2   IntooligenceMobileiOS                0x00b3a27d monitor_thread (threadpool-ms.c:833)
3   IntooligenceMobileiOS                0x00b3ff47 start_wrapper (threads.c:723)
4   IntooligenceMobileiOS                0x00b59889 inner_start_thread (mono-threads-posix.c:97)
5   IntooligenceMobileiOS                0x00b72cb7 GC_start_routine (pthread_support.c:1502)
6   libsystem_pthread.dylib              0x2350985b _pthread_body + 136
7   libsystem_pthread.dylib              0x235097cf _pthread_start + 108
8   libsystem_pthread.dylib              0x23507724 thread_start + 6

Thread 7 crashed with ARM Thread State:
    pc: 0x23464c84     r7: 0x1f39a14c     sp: 0x1f39a140     r0: 0x00000000 
    r1: 0x00000000     r2: 0x00000000     r3: 0x00000000     r4: 0x00000006 
    r5: 0x1f39b000     r6: 0x00f2cc6c     r8: 0x00f2cb54     r9: 0x3a096908 
   r10: 0x00000001    r11: 0x15e7e000     ip: 0x00000148     lr: 0x2350a733 
  cpsr: 0x00000010 

Link Register Analysis:
  Symbol: pthread_kill + 60
  Description: We have determined that the link register (lr) is very likely to contain the return address of frame #0's calling function, and have inserted it into the crashing thread's backtrace as frame #1 to aid in analysis. This determination was made by applying a heuristic to determine whether the crashing function was likely to have created a new stack frame at the time of the crash.
  Type: 1
c#
ios
debugging
xamarin
crash
asked on Stack Overflow Apr 13, 2016 by Jim • edited Apr 13, 2016 by (unknown user)

3 Answers

1

SIGABRT exceptions are always pretty obfuscated to find out what's really wrong. Thread 7, steps 15-18 give a reasonable amount of intel to find out what's actually happening. It's definitely related to JSON parsing. It has to do with some numeric value in your JSON file that can't be handled/parsed.

Possible causes when reading JSON data:

  • Malformed numeric value in JSON
  • User locale is different than expected (. vs ,). This is quite unlikely, since Json.net does not provide it out of the box. But it could happen if you apply custom converters.

Possible causes when writing JSON data:

  • Check the serialisation rules that you may have applied

Wrapping your code in a try/catch might give you more details about your specific issue. Also check if you have added any custom converters in your JsonSerializerSettings.

answered on Stack Overflow Apr 13, 2016 by Tim Klingeleers • edited Apr 13, 2016 by Tim Klingeleers
0

This is the abort you're hitting: https://github.com/mono/mono/blob/9fd216db06cd8150d5d859aa06fb9f7571d66548/libgc/alloc.c#L840

This looks like the app is reaching some sort of memory limit inside the Boehm Garbage Collector.

My advice would be to switch to the SGen Garbage Collector in your project's iOS Build options, that should solve the problem (since the SGen garbage collector doesn't have this type of memory limit).

answered on Stack Overflow Apr 14, 2016 by Rolf Bjarne Kvinge
0

To get console output for a crash like this on a release version on device:
connect your device to your Mac
open XCode
go to Window -> Devices and Simulators
click Open Console for your device
type your app name in the search window to filter the output

I found the exception that way. The crash log posted in the question didn't help, because it's just the apple main thread crashing.

For us the crash was caused by using a deprecated class, namely UISearchDisplayController, which should be replaced by UISearchController.
It continued to work in iOS12, but not in iOS13. It was deprecated in iOS8 though i think, so fair enough.

You may have to upload the app to App Store Connect and run it via TestFlight to see the logs, not sure.

Also, this is probably irrelevant, but go to your iPhone settings -> privacy -> Analytics -> Share with App Developers and Share iPhone Analytics

answer copied from here (my own):
Xamarin.iOS app crashes on startup on iOS13

answered on Stack Overflow Oct 3, 2019 by sschmidTU

User contributions licensed under CC BY-SA 3.0