Forum Xamarin Xamarin.iOS

App crashes when I restart the app

My app apparently works fine once installed by testflight.

The problem comes when I restart the app or close the task of the app on my iPhone, and I try to open the app again. In this moment, the app crashes and it doesn't open again.

The app appears with the red/orange circle next to the name/title.

My iPhone have the iOS version 13.1

This is my Crash Symbolicated log:

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0

Thread 0 name:
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x0000000183079ec4 __pthread_kill + 8
1   libsystem_pthread.dylib         0x0000000182f95774 pthread_kill$VARIANT$mp + 112 (pthread.c:1456)
2   libsystem_c.dylib               0x0000000182ee9844 abort + 100 (abort.c:110)
3   Ambassador.iOS                  0x000000010440f138 xamarin_initialize.cold.1 + 0
4   Ambassador.iOS                  0x00000001044053ec xamarin_printf + 24908780 (runtime.m:2541)
5   Ambassador.iOS                  0x00000001042c6fe0 mono_invoke_unhandled_exception_hook + 132
6   Ambassador.iOS                  0x000000010425bb94 mono_handle_exception_internal + 5580
7   Ambassador.iOS                  0x000000010425a5bc mono_handle_exception + 56
8   Ambassador.iOS                  0x0000000104250134 mono_arm_throw_exception + 376
9   Ambassador.iOS                  0x000000010306782c throw_exception + 172
10  Ambassador.iOS                  0x0000000102e2936c System_Runtime_ExceptionServices_ExceptionDispatchInfo_Throw + 44
11  Ambassador.iOS                  0x0000000102e2f264 System_Runtime_CompilerServices_AsyncMethodBuilderCore__c__ThrowAsyncb__7_0_object + 84
12  Ambassador.iOS                  0x0000000103a082ec Foundation_NSAsyncSynchronizationContextDispatcher_Apply + 14435052 (NSAction.cs:178)
13  Ambassador.iOS                  0x0000000103029c44 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 260
14  Ambassador.iOS                  0x000000010426debc mono_jit_runtime_invoke + 1100
15  Ambassador.iOS                  0x000000010432a904 mono_runtime_invoke_checked + 148
16  Ambassador.iOS                  0x000000010432e1a0 mono_runtime_invoke + 156
17  Ambassador.iOS                  0x0000000102c951ac native_to_managed_trampoline_17(objc_object*, objc_selector*, _MonoMethod**, unsigned int) + 332204 (registrar.m:843)
18  Ambassador.iOS                  0x0000000102c963e8 -[__MonoMac_NSAsyncSynchronizationContextDispatcher xamarinApplySelector] + 336872 (registrar.m:10891)
19  Foundation                      0x000000018366a24c __NSThreadPerformPerform + 232 (NSThread.m:807)
20  CoreFoundation                  0x00000001831ff7c4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24 (CFRunLoop.c:1922)
21  CoreFoundation                  0x00000001831ff71c __CFRunLoopDoSource0 + 80 (CFRunLoop.c:1956)
22  CoreFoundation                  0x00000001831feeb4 __CFRunLoopDoSources0 + 180 (CFRunLoop.c:1992)
23  CoreFoundation                  0x00000001831fa000 __CFRunLoopRun + 1080 (CFRunLoop.c:2882)
24  CoreFoundation                  0x00000001831f98a0 CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192)
25  GraphicsServices                0x000000018d151328 GSEventRunModal + 104 (GSEvent.c:2246)
26  UIKitCore                       0x00000001872ea740 UIApplicationMain + 1936 (UIApplication.m:4758)
27  Ambassador.iOS                  0x0000000103a5cc90 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 352
28  Ambassador.iOS                  0x00000001039c4c4c UIKit_UIApplication_Main_string___intptr_intptr + 14158924 (UIApplication.cs:86)
29  Ambassador.iOS                  0x00000001039c4bd4 UIKit_UIApplication_Main_string___string_string + 14158804 (UIApplication.cs:66)
30  Ambassador.iOS                  0x0000000102cc3274 Ambassador_iOS_Application_Main_string__ + 520820 (/<unknown>:1)
31  Ambassador.iOS                  0x0000000103029c44 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 260
32  Ambassador.iOS                  0x000000010426debc mono_jit_runtime_invoke + 1100
33  Ambassador.iOS                  0x000000010432a904 mono_runtime_invoke_checked + 148
34  Ambassador.iOS                  0x0000000104330bcc mono_runtime_exec_main_checked + 120
35  Ambassador.iOS                  0x000000010424c088 mono_jit_exec + 376
36  Ambassador.iOS                  0x000000010440c680 xamarin_main + 24938112 (monotouch-main.m:0)
37  Ambassador.iOS                  0x0000000102cc17b8 main + 513976 (main.m:158)
38  libdyld.dylib                   0x0000000183084360 start + 4

Thread 1 name:
Thread 1:
0   libsystem_pthread.dylib         0x0000000182fa1acc start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib         0x0000000182fa1acc start_wqthread + 0

Thread 3:
0   libsystem_pthread.dylib         0x0000000182fa1acc start_wqthread + 0

Thread 4 name:
Thread 4:
0   libsystem_pthread.dylib         0x0000000182fa1acc start_wqthread + 0

Thread 5 name:
Thread 5:
0   libsystem_pthread.dylib         0x0000000182fa1acc start_wqthread + 0

Thread 6 name:
Thread 6:
0   libsystem_kernel.dylib          0x0000000183079c94 __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x0000000182f971e8 _pthread_cond_wait$VARIANT$mp + 684 (pthread_cond.c:591)
2   libc++.1.dylib                  0x00000001830cb7a8 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 24 (__threading_support:287)
3   JavaScriptCore                  0x0000000191fafeec void std::__1::condition_variable_any::wait<std::__1::unique_lock<bmalloc::Mutex> >(std::__1::uni... + 108 (condition_variable:204)
4   JavaScriptCore                  0x0000000191fb38bc bmalloc::Scavenger::threadRunLoop() + 200 (condition_variable:213)
5   JavaScriptCore                  0x0000000191fb35a4 bmalloc::Scavenger::threadEntryPoint(bmalloc::Scavenger*) + 12 (Scavenger.cpp:384)
6   JavaScriptCore                  0x0000000191fb48b0 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, st... + 40 (type_traits:4361)
7   libsystem_pthread.dylib         0x0000000182f9e1d0 _pthread_start + 124 (pthread.c:895)
8   libsystem_pthread.dylib         0x0000000182fa1ae0 thread_start + 8

Thread 7 name:
Thread 7:
0   libsystem_kernel.dylib          0x0000000183058634 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x0000000183057aa0 mach_msg + 72 (mach_msg.c:103)
2   CoreFoundation                  0x00000001831ff04c __CFRunLoopServiceMachPort + 216 (CFRunLoop.c:2575)
3   CoreFoundation                  0x00000001831fa16c __CFRunLoopRun + 1444 (CFRunLoop.c:2931)
4   CoreFoundation                  0x00000001831f98a0 CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192)
5   WebCore                         0x000000018b193b60 RunWebThread(void*) + 612 (WebCoreThread.mm:626)
6   libsystem_pthread.dylib         0x0000000182f9e1d0 _pthread_start + 124 (pthread.c:895)
7   libsystem_pthread.dylib         0x0000000182fa1ae0 thread_start + 8

Thread 8 name:
Thread 8:
0   libsystem_kernel.dylib          0x0000000183079c94 __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x0000000182f971e8 _pthread_cond_wait$VARIANT$mp + 684 (pthread_cond.c:591)
2   Ambassador.iOS                  0x00000001043d17e0 thread_func + 468
3   libsystem_pthread.dylib         0x0000000182f9e1d0 _pthread_start + 124 (pthread.c:895)
4   libsystem_pthread.dylib         0x0000000182fa1ae0 thread_start + 8

Thread 9 name:
Thread 9:
0   libsystem_kernel.dylib          0x0000000183058670 semaphore_wait_trap + 8
1   Ambassador.iOS                  0x00000001042ca25c finalizer_thread + 372
2   Ambassador.iOS                  0x00000001043795cc start_wrapper_internal + 344
3   Ambassador.iOS                  0x0000000104379450 start_wrapper + 88
4   libsystem_pthread.dylib         0x0000000182f9e1d0 _pthread_start + 124 (pthread.c:895)
5   libsystem_pthread.dylib         0x0000000182fa1ae0 thread_start + 8

Thread 10 name:
Thread 10:
0   libsystem_kernel.dylib          0x0000000183058634 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x0000000183057aa0 mach_msg + 72 (mach_msg.c:103)
2   CoreFoundation                  0x00000001831ff04c __CFRunLoopServiceMachPort + 216 (CFRunLoop.c:2575)
3   CoreFoundation                  0x00000001831fa16c __CFRunLoopRun + 1444 (CFRunLoop.c:2931)
4   CoreFoundation                  0x00000001831f98a0 CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192)
5   Foundation                      0x0000000183539824 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 228 (NSRunLoop.m:374)
6   Foundation                      0x0000000183539704 -[NSRunLoop(NSRunLoop) runUntilDate:] + 88 (NSRunLoop.m:421)
7   UIKitCore                       0x0000000187383158 -[UIEventFetcher threadMain] + 152 (UIEventFetcher.m:637)
8   Foundation                      0x000000018366a0c4 __NSThread__start__ + 848 (NSThread.m:724)
9   libsystem_pthread.dylib         0x0000000182f9e1d0 _pthread_start + 124 (pthread.c:895)
10  libsystem_pthread.dylib         0x0000000182fa1ae0 thread_start + 8

Thread 11 name:
Thread 11:
0   libsystem_kernel.dylib          0x0000000183079c94 __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x0000000182f971e8 _pthread_cond_wait$VARIANT$mp + 684 (pthread_cond.c:591)
2   Ambassador.iOS                  0x00000001043e16e8 mono_os_cond_timedwait + 168
3   Ambassador.iOS                  0x00000001043e9cd0 mono_thread_info_sleep + 568
4   Ambassador.iOS                  0x000000010436d7ac monitor_thread + 908
5   Ambassador.iOS                  0x00000001043795cc start_wrapper_internal + 344
6   Ambassador.iOS                  0x0000000104379450 start_wrapper + 88
7   libsystem_pthread.dylib         0x0000000182f9e1d0 _pthread_start + 124 (pthread.c:895)
8   libsystem_pthread.dylib         0x0000000182fa1ae0 thread_start + 8

Thread 12 name:
Thread 12:
0   libsystem_kernel.dylib          0x0000000183058688 semaphore_timedwait_trap + 8
1   Ambassador.iOS                  0x000000010436dd6c worker_thread + 848
2   Ambassador.iOS                  0x00000001043795cc start_wrapper_internal + 344
3   Ambassador.iOS                  0x0000000104379450 start_wrapper + 88
4   libsystem_pthread.dylib         0x0000000182f9e1d0 _pthread_start + 124 (pthread.c:895)
5   libsystem_pthread.dylib         0x0000000182fa1ae0 thread_start + 8

Thread 13 name:
Thread 13:
0   libsystem_kernel.dylib          0x0000000183058688 semaphore_timedwait_trap + 8
1   Ambassador.iOS                  0x000000010436dd6c worker_thread + 848
2   Ambassador.iOS                  0x00000001043795cc start_wrapper_internal + 344
3   Ambassador.iOS                  0x0000000104379450 start_wrapper + 88
4   libsystem_pthread.dylib         0x0000000182f9e1d0 _pthread_start + 124 (pthread.c:895)
5   libsystem_pthread.dylib         0x0000000182fa1ae0 thread_start + 8

Thread 14 name:
Thread 14:
0   libsystem_kernel.dylib          0x0000000183079c94 __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x0000000182f971e8 _pthread_cond_wait$VARIANT$mp + 684 (pthread_cond.c:591)
2   Ambassador.iOS                  0x00000001043e16e8 mono_os_cond_timedwait + 168
3   Ambassador.iOS                  0x0000000104384cc4 mono_w32handle_timedwait_signal_handle + 204
4   Ambassador.iOS                  0x0000000104384b9c mono_w32handle_wait_one + 756
5   Ambassador.iOS                  0x0000000104384dd4 mono_w32handle_wait_multiple + 132
6   Ambassador.iOS                  0x0000000104373d08 ves_icall_System_Threading_WaitHandle_Wait_internal + 152
7   Ambassador.iOS                  0x00000001042ed50c ves_icall_System_Threading_WaitHandle_Wait_internal_raw + 104
8   Ambassador.iOS                  0x0000000102dc145c wrapper_managed_to_native_System_Threading_WaitHandle_Wait_internal_intptr__int_bool_int + 140
9   Ambassador.iOS                  0x0000000102dc0fb4 System_Threading_WaitHandle_WaitOneNative_System_Runtime_InteropServices_SafeHandle_uint_bool_bool + 260
10  Ambassador.iOS                  0x0000000102dc0abc System_Threading_WaitHandle_InternalWaitOne_System_Runtime_InteropServices_SafeHandle_long_bool_bool + 60
11  Ambassador.iOS                  0x0000000102dc0a6c System_Threading_WaitHandle_WaitOne_long_bool + 60
12  Ambassador.iOS                  0x0000000102dc096c System_Threading_WaitHandle_WaitOne_int_bool + 60
13  Ambassador.iOS                  0x0000000102dc0a18 System_Threading_WaitHandle_WaitOne_int + 40
14  Ambassador.iOS                  0x0000000102dc3be4 System_Threading_Timer_Scheduler_SchedulerThread + 212
15  Ambassador.iOS                  0x0000000102dba94c System_Threading_ThreadHelper_ThreadStart_Context_object + 188
16  Ambassador.iOS                  0x0000000102db8770 System_Threading_ExecutionContext_RunInternal_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool + 416
17  Ambassador.iOS                  0x0000000102db857c System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool + 44
18  Ambassador.iOS                  0x0000000102db8500 System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object + 80
19  Ambassador.iOS                  0x0000000102dbaab4 System_Threading_ThreadHelper_ThreadStart + 52
20  Ambassador.iOS                  0x0000000103029c44 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 260
21  Ambassador.iOS                  0x000000010426debc mono_jit_runtime_invoke + 1100
22  Ambassador.iOS                  0x000000010432a904 mono_runtime_invoke_checked + 148
23  Ambassador.iOS                  0x00000001043302a8 mono_runtime_delegate_try_invoke + 168
24  Ambassador.iOS                  0x000000010437968c start_wrapper_internal + 536
25  Ambassador.iOS                  0x0000000104379450 start_wrapper + 88
26  libsystem_pthread.dylib         0x0000000182f9e1d0 _pthread_start + 124 (pthread.c:895)
27  libsystem_pthread.dylib         0x0000000182fa1ae0 thread_start + 8

Thread 15 name:
Thread 15:
0   libsystem_kernel.dylib          0x0000000183058634 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x0000000183057aa0 mach_msg + 72 (mach_msg.c:103)
2   CoreFoundation                  0x00000001831ff04c __CFRunLoopServiceMachPort + 216 (CFRunLoop.c:2575)
3   CoreFoundation                  0x00000001831fa16c __CFRunLoopRun + 1444 (CFRunLoop.c:2931)
4   CoreFoundation                  0x00000001831f98a0 CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192)
5   CFNetwork                       0x00000001864bd034 -[__CoreSchedulingSetRunnable runForever] + 192 (CoreSchedulingSet.mm:1372)
6   Foundation                      0x000000018366a0c4 __NSThread__start__ + 848 (NSThread.m:724)
7   libsystem_pthread.dylib         0x0000000182f9e1d0 _pthread_start + 124 (pthread.c:895)
8   libsystem_pthread.dylib         0x0000000182fa1ae0 thread_start + 8

Thread 16 name:
Thread 16:
0   libsystem_kernel.dylib          0x000000018307a150 __select + 8
1   Ambassador.iOS                  0x00000001043e1e84 mono_poll + 320
2   Ambassador.iOS                  0x000000010436a898 poll_event_wait + 196
3   Ambassador.iOS                  0x000000010436a190 selector_thread + 1152
4   Ambassador.iOS                  0x00000001043795cc start_wrapper_internal + 344
5   Ambassador.iOS                  0x0000000104379450 start_wrapper + 88
6   libsystem_pthread.dylib         0x0000000182f9e1d0 _pthread_start + 124 (pthread.c:895)
7   libsystem_pthread.dylib         0x0000000182fa1ae0 thread_start + 8

Thread 17 name:
Thread 17:
0   libsystem_kernel.dylib          0x0000000183058688 semaphore_timedwait_trap + 8
1   Ambassador.iOS                  0x000000010436dd6c worker_thread + 848
2   Ambassador.iOS                  0x00000001043795cc start_wrapper_internal + 344
3   Ambassador.iOS                  0x0000000104379450 start_wrapper + 88
4   libsystem_pthread.dylib         0x0000000182f9e1d0 _pthread_start + 124 (pthread.c:895)
5   libsystem_pthread.dylib         0x0000000182fa1ae0 thread_start + 8

Thread 18 name:
Thread 18:
0   libsystem_kernel.dylib          0x0000000183058688 semaphore_timedwait_trap + 8
1   Ambassador.iOS                  0x000000010436dd6c worker_thread + 848
2   Ambassador.iOS                  0x00000001043795cc start_wrapper_internal + 344
3   Ambassador.iOS                  0x0000000104379450 start_wrapper + 88
4   libsystem_pthread.dylib         0x0000000182f9e1d0 _pthread_start + 124 (pthread.c:895)
5   libsystem_pthread.dylib         0x0000000182fa1ae0 thread_start + 8

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x0000000182eecd65   x5: 0x000000016d1b81a0   x6: 0x0000000000000036   x7: 0xffffffffffffffec
    x8: 0x0000000104af9800   x9: 0x0000000182f99b40  x10: 0x0000000182f95704  x11: 0x0000000000bf3d01
   x12: 0x0000000132cd0000  x13: 0x0000000000004009  x14: 0x0000000132ccc000  x15: 0x0000000000003fff
   x16: 0x0000000000000148  x17: 0x000000018316a5a0  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x0000000000000407  x21: 0x0000000000000009  x22: 0x0000000104af98e0  x23: 0x0000000132019478
   x24: 0x0000000131e01e40  x25: 0x00000001068bf898  x26: 0x000000013200ae00  x27: 0x000000016d1b9250
   x28: 0x0000000103029c43   fp: 0x000000016d1b8410   lr: 0x0000000182f95774
    sp: 0x000000016d1b83f0   pc: 0x0000000183079ec4 cpsr: 0x40000000
   esr: 0x56000080  Address size fault

Can anyone help me???

Answers

  • Imran_619Imran_619 Member ✭✭✭

    Here we go:

    EXC_CRASH (SIGABRT) implies that you crashed because someone abort.

    Frame 1 of the crashed thread’s backtrace (objc_exception_throw) indicates that this was an unhandled language exception (NSException in this case).

    Frame 2 indicates that it was thrown by an NSMutableArray (__NSArrayM) when someone called -insertObject:atIndex:.

    Frame 3 indicates that that ‘someone’ was your code, namely, -[AppController midiInputDeviceNames] at line 200 of AppController.mm.

    The standard reasons for -insertObject:atIndex: throwing a language exception is that:

    the object in nil

    the index is out of bounds

    I recommend that you look at your code to see how these can happen. If you can’t figure it out, add explicit checks to your code for both of these cases and then send an ad hoc build to the customer who is having the problem (customers love getting ad hoc builds like this, it makes them feel special.

    For more information on mobile app development you can visit ArStudioz

Sign In or Register to comment.