xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.49k stars 515 forks source link

Random iOS crashes of a published app #15402

Closed geskill closed 2 years ago

geskill commented 2 years ago

Steps to Reproduce

Complete random crash; works in simulator and with debugger.

Expected Behavior

Shouldn't crash

Actual Behavior

symbolicatedCrash.txt ``` Incident IdentMobileAppifier:-8633-4E76-81B2-1E784EC9574C Hardware Model: iPhone13,1 Process: MobileApp.iOS [86340] Path: /private/var/containers/Bundle/Application/-A31F-43C5-9361-8FC918C156BD/MobileApp.iOS.app/MobileApp.iOS Identifier: de.XXX.MobileApp Version: 1.0 (1.0.77) AppStoreTools: 13F100 AppVariant: 1:iPhone13,1:15 Beta: YES Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: de.XXX.MobileApp [1968] Date/Time: 2022-07-05 17:44:56.0109 +0200 Launch Time: 2022-07-05 15:51:40.9349 +0200 OS Version: iPhone OS 15.5 (19F77) Release Type: User Baseband Version: 2.54.02 Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGABRT) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000 Exception Codes: 0x0000000000000001, 0x0000000000000000 VM Region Info: 0 is not in any region. Bytes before following region: 4302798848 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> __TEXT 100778000-1007bc000 [ 272K] r-x/r-x SM=COW ...MobileApp.iOS Exception Note: EXC_CORPSE_NOTIFY Triggered by Thread: 0 Kernel Triage: VM - Compressor failed a blocking pager_get VM - Compressor failed a blocking pager_get VM - Compressor failed a blocking pager_get VM - Compressor failed a blocking pager_get VM - Compressor failed a blocking pager_get Thread 0 name: Thread 0 name: Thread 0 Crashed: 0 libsystem_kernel.dylib 0x00000001f0941b38 __pthread_kill + 8 1 libsystem_pthread.dylib 0x000000022a04a3bc pthread_kill + 268 (pthread.c:1668) 2 libsystem_c.dylib 0x00000001c406344c __abort + 128 (abort.c:155) 3 libsystem_c.dylib 0x00000001c400b530 abort + 180 (abort.c:126) 4 MobileApp.iOS 0x0000000102cff32c xamarin_find_protocol_wrapper_type + 39351084 (runtime.m:1177) 5 MobileApp.iOS 0x0000000102be7550 mono_invoke_unhandled_exception_hook + 38204752 (exception.c:1299) 6 MobileApp.iOS 0x0000000102b8590c mono_handle_exception_internal + 37804300 (mini-exceptions.c:2783) 7 MobileApp.iOS 0x0000000102b842e0 mono_handle_exception + 37798624 (mini-exceptions.c:3107) 8 MobileApp.iOS 0x0000000102b7acfc mono_arm_throw_exception + 37760252 (exceptions-arm64.c:403) 9 MobileApp.iOS 0x0000000100be186c throw_exception + 172 10 MobileApp.iOS 0x000000010092e1fc System_Runtime_ExceptionServices_ExceptionDispatchInfo_Throw + 44 11 MobileApp.iOS 0x0000000100934424 System_Runtime_CompilerServices_AsyncMethodBuilderCore__c__ThrowAsyncb__7_0_object + 84 12 MobileApp.iOS 0x00000001017f0bdc Foundation_NSAsyncSynchronizationContextDispatcher_Apply + 17271772 (NSAction.cs:178) 13 MobileApp.iOS 0x0000000100b75280 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 272 14 MobileApp.iOS 0x0000000102b95f90 mono_jit_runtime_invoke + 37871504 (mini-runtime.c:3191) 15 MobileApp.iOS 0x0000000102c42138 mono_runtime_invoke_checked + 38576440 (object.c:3220) 16 MobileApp.iOS 0x0000000102c455bc mono_runtime_invoke + 38589884 (object.c:3107) 17 MobileApp.iOS 0x000000010077f0f4 native_to_managed_trampoline_17(objc_object*, objc_selector*, _MonoMethod**, unsigned int) + 28916 (registrar.m:904) 18 MobileApp.iOS 0x00000001007809f4 -[__MonoMac_NSAsyncSynchronizationContextDispatcher xamarinApplySelector] + 35316 (registrar.m:8732) 19 Foundation 0x00000001ba69df20 __NSThreadPerformPerform + 212 (NSThread.m:1058) 20 CoreFoundation 0x00000001b8f27414 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1972) 21 CoreFoundation 0x00000001b8f381a0 __CFRunLoopDoSource0 + 208 (CFRunLoop.c:2016) 22 CoreFoundation 0x00000001b8e716f8 __CFRunLoopDoSources0 + 368 (CFRunLoop.c:2061) 23 CoreFoundation 0x00000001b8e7705c __CFRunLoopRun + 828 (CFRunLoop.c:2951) 24 CoreFoundation 0x00000001b8e8abc8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268) 25 GraphicsServices 0x00000001d4fbe374 GSEventRunModal + 164 (GSEvent.c:2200) 26 UIKitCore 0x00000001bb7fa648 -[UIApplication _run] + 1100 (UIApplication.m:3511) 27 UIKitCore 0x00000001bb57bd90 UIApplicationMain + 364 (UIApplication.m:5064) 28 MobileApp.iOS 0x00000001018d5e18 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 344 29 MobileApp.iOS 0x00000001018254c0 UIKit_UIApplication_Main_string___string_string + 17487040 (UIApplication.cs:75) 30 MobileApp.iOS 0x00000001007bd974 EM_Mobile_iOS_Application_Main_string__ + 285044 (/:1) 31 MobileApp.iOS 0x0000000100b75280 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 272 32 MobileApp.iOS 0x0000000102b95f90 mono_jit_runtime_invoke + 37871504 (mini-runtime.c:3191) 33 MobileApp.iOS 0x0000000102c42138 mono_runtime_invoke_checked + 38576440 (object.c:3220) 34 MobileApp.iOS 0x0000000102c473ac mono_runtime_exec_main_checked + 38597548 (object.c:5288) 35 MobileApp.iOS 0x0000000102b7a868 mono_jit_exec + 37759080 (driver.c:1328) 36 MobileApp.iOS 0x0000000102d06ab8 xamarin_main + 39381688 (monotouch-main.m:0) 37 MobileApp.iOS 0x00000001007bd894 main + 284820 (main.m:182) 38 dyld 0x0000000103255ce4 start + 520 (dyldMain.cpp:879) Thread 1 name: Thread 1: 0 libsystem_kernel.dylib 0x00000001f093bf24 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x000000022a04b298 _pthread_cond_wait + 1236 (pthread_cond.c:636) 2 MobileApp.iOS 0x0000000102cda560 thread_func + 39200096 (sgen-thread-pool.c:196) 3 libsystem_pthread.dylib 0x000000022a0449ac _pthread_start + 148 (pthread.c:891) 4 libsystem_pthread.dylib 0x000000022a043e68 thread_start + 8 Thread 2 name: Thread 2: 0 libsystem_kernel.dylib 0x00000001f093b4dc semaphore_wait_trap + 8 1 MobileApp.iOS 0x0000000102bea954 finalizer_thread + 38218068 (gc.c:965) 2 MobileApp.iOS 0x0000000102c868f8 start_wrapper_internal + 38856952 (threads.c:1289) 3 MobileApp.iOS 0x0000000102c8677c start_wrapper + 38856572 (threads.c:1310) 4 libsystem_pthread.dylib 0x000000022a0449ac _pthread_start + 148 (pthread.c:891) 5 libsystem_pthread.dylib 0x000000022a043e68 thread_start + 8 Thread 3 name: Thread 3: 0 libsystem_kernel.dylib 0x00000001f093b4a0 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x00000001f093bae4 mach_msg + 76 (mach_msg.c:119) 2 CoreFoundation 0x00000001b8e72d30 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646) 3 CoreFoundation 0x00000001b8e771bc __CFRunLoopRun + 1180 (CFRunLoop.c:3000) 4 CoreFoundation 0x00000001b8e8abc8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268) 5 Foundation 0x00000001ba679464 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 236 (NSRunLoop.m:373) 6 Foundation 0x00000001ba6bae2c -[NSRunLoop(NSRunLoop) runUntilDate:] + 92 (NSRunLoop.m:420) 7 UIKitCore 0x00000001bb774770 -[UIEventFetcher threadMain] + 524 (UIEventFetcher.m:1167) 8 Foundation 0x00000001ba6c943c __NSThread__start__ + 808 (NSThread.m:972) 9 libsystem_pthread.dylib 0x000000022a0449ac _pthread_start + 148 (pthread.c:891) 10 libsystem_pthread.dylib 0x000000022a043e68 thread_start + 8 Thread 4 name: Thread 4: 0 libsystem_kernel.dylib 0x00000001f093bf24 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x000000022a04b298 _pthread_cond_wait + 1236 (pthread_cond.c:636) 2 MobileApp.iOS 0x0000000102ce87fc mono_os_cond_timedwait + 39258108 (mono-os-mutex.c:32) 3 MobileApp.iOS 0x0000000102c91944 mono_w32handle_timedwait_signal_handle + 38902084 (w32handle.c:767) 4 MobileApp.iOS 0x0000000102c9181c mono_w32handle_wait_one + 38901788 (w32handle.c:895) 5 MobileApp.iOS 0x0000000102c353b0 ves_icall_System_Threading_Monitor_Monitor_wait + 38523824 (monitor.c:1499) 6 MobileApp.iOS 0x0000000102c087e0 ves_icall_System_Threading_Monitor_Monitor_wait_raw + 38340576 (icall-def.h:999) 7 MobileApp.iOS 0x00000001008bac48 wrapper_managed_to_native_System_Threading_Monitor_Monitor_wait_object_int + 104 8 MobileApp.iOS 0x00000001008bad00 System_Threading_Monitor_ObjWait_bool_int_object + 80 9 MobileApp.iOS 0x00000001008ba7ec System_Threading_Monitor_Wait_object_int_bool + 44 10 MobileApp.iOS 0x00000001008ba840 System_Threading_Monitor_Wait_object_int + 32 11 MobileApp.iOS 0x00000001008b54f8 System_Threading_SemaphoreSlim_WaitUntilCountOrTimeout_int_uint_System_Threading_CancellationToken + 120 12 MobileApp.iOS 0x00000001008b525c System_Threading_SemaphoreSlim_Wait_int_System_Threading_CancellationToken + 652 13 MobileApp.iOS 0x000000010123e6e0 System_Collections_Concurrent_BlockingCollection_1_T_REF_TryTakeWithNoTimeValidation_T_REF__int_System_Threading_CancellationToken_System_Threading_CancellationTokenSource + 11298528 (BlockingCollection.cs:701) 14 MobileApp.iOS 0x000000010123e4d8 System_Collections_Concurrent_BlockingCollection_1_T_REF_TryTake_T_REF__int_System_Threading_CancellationToken + 11298008 (BlockingCollection.cs:656) 15 MobileApp.iOS 0x000000010123e40c System_Collections_Concurrent_BlockingCollection_1_T_REF_Take + 11297804 (BlockingCollection.cs:543) 16 MobileApp.iOS 0x0000000101abc844 Xamarin_Forms_Platform_iOS_CADisplayLinkTicker_StartThread + 20203588 (/D:\a\1\s\Xamarin.Forms.Platform.iOS\CADisplayLinkTicker.cs:52) 17 MobileApp.iOS 0x00000001008bb55c System_Threading_ThreadHelper_ThreadStart_Context_object + 188 18 MobileApp.iOS 0x00000001008b8f3c System_Threading_ExecutionContext_RunInternal_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool + 428 19 MobileApp.iOS 0x00000001008b8d3c System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool + 44 20 MobileApp.iOS 0x00000001008b8cc0 System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object + 80 21 MobileApp.iOS 0x0000000100ba7410 wrapper_other_object_gsharedvt_out_sig_object__object__object__intptr_0 + 64 22 MobileApp.iOS 0x0000000102d14a20 jit_call_cb + 39438880 (interp.c:0) 23 MobileApp.iOS 0x0000000102d13720 do_jit_call + 39434016 (interp.c:2439) 24 MobileApp.iOS 0x0000000102d0a87c interp_exec_method_full + 39397500 (interp.c:4072) 25 MobileApp.iOS 0x0000000102d083c4 interp_runtime_invoke + 39388100 (interp.c:1944) 26 MobileApp.iOS 0x0000000102b95ea4 mono_jit_runtime_invoke + 37871268 (mini-runtime.c:3209) 27 MobileApp.iOS 0x0000000102c42138 mono_runtime_invoke_checked + 38576440 (object.c:3220) 28 MobileApp.iOS 0x0000000102c46d30 mono_runtime_delegate_try_invoke + 38595888 (object.c:4441) 29 MobileApp.iOS 0x0000000102c869f0 start_wrapper_internal + 38857200 (threads.c:1258) 30 MobileApp.iOS 0x0000000102c8677c start_wrapper + 38856572 (threads.c:1310) 31 libsystem_pthread.dylib 0x000000022a0449ac _pthread_start + 148 (pthread.c:891) 32 libsystem_pthread.dylib 0x000000022a043e68 thread_start + 8 Thread 5 name: Thread 5: 0 libsystem_kernel.dylib 0x00000001f093bf24 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x000000022a04b298 _pthread_cond_wait + 1236 (pthread_cond.c:636) 2 MobileApp.iOS 0x0000000102ce87d4 mono_os_cond_timedwait + 39258068 (mono-os-mutex.c:75) 3 MobileApp.iOS 0x0000000102c91944 mono_w32handle_timedwait_signal_handle + 38902084 (w32handle.c:767) 4 MobileApp.iOS 0x0000000102c9181c mono_w32handle_wait_one + 38901788 (w32handle.c:895) 5 MobileApp.iOS 0x0000000102c91a40 mono_w32handle_wait_multiple + 38902336 (w32handle.c:1002) 6 MobileApp.iOS 0x0000000102c814a8 ves_icall_System_Threading_WaitHandle_Wait_internal + 38835368 (threads.c:2314) 7 MobileApp.iOS 0x0000000102c0a1fc ves_icall_System_Threading_WaitHandle_Wait_internal_raw + 38347260 (icall-def.h:1100) 8 MobileApp.iOS 0x00000001008c2208 wrapper_managed_to_native_System_Threading_WaitHandle_Wait_internal_intptr__int_bool_int + 120 9 MobileApp.iOS 0x00000001008c1d68 System_Threading_WaitHandle_WaitOneNative_System_Runtime_InteropServices_SafeHandle_uint_bool_bool + 264 10 MobileApp.iOS 0x00000001008c186c System_Threading_WaitHandle_InternalWaitOne_System_Runtime_InteropServices_SafeHandle_long_bool_bool + 60 11 MobileApp.iOS 0x00000001008c181c System_Threading_WaitHandle_WaitOne_long_bool + 60 12 MobileApp.iOS 0x00000001008c163c System_Threading_WaitHandle_WaitOne_int_bool + 60 13 MobileApp.iOS 0x00000001008c178c System_Threading_WaitHandle_WaitOne_int + 44 14 MobileApp.iOS 0x00000001008c4c48 System_Threading_Timer_Scheduler_SchedulerThread + 216 15 MobileApp.iOS 0x00000001008bb55c System_Threading_ThreadHelper_ThreadStart_Context_object + 188 16 MobileApp.iOS 0x00000001008b8f3c System_Threading_ExecutionContext_RunInternal_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool + 428 17 MobileApp.iOS 0x00000001008b8d3c System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool + 44 18 MobileApp.iOS 0x00000001008b8cc0 System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object + 80 19 MobileApp.iOS 0x0000000100ba7410 wrapper_other_object_gsharedvt_out_sig_object__object__object__intptr_0 + 64 20 MobileApp.iOS 0x0000000102d14a20 jit_call_cb + 39438880 (interp.c:0) 21 MobileApp.iOS 0x0000000102d13720 do_jit_call + 39434016 (interp.c:2439) 22 MobileApp.iOS 0x0000000102d0a87c interp_exec_method_full + 39397500 (interp.c:4072) 23 MobileApp.iOS 0x0000000102d083c4 interp_runtime_invoke + 39388100 (interp.c:1944) 24 MobileApp.iOS 0x0000000102b95ea4 mono_jit_runtime_invoke + 37871268 (mini-runtime.c:3209) 25 MobileApp.iOS 0x0000000102c42138 mono_runtime_invoke_checked + 38576440 (object.c:3220) 26 MobileApp.iOS 0x0000000102c46d30 mono_runtime_delegate_try_invoke + 38595888 (object.c:4441) 27 MobileApp.iOS 0x0000000102c869f0 start_wrapper_internal + 38857200 (threads.c:1258) 28 MobileApp.iOS 0x0000000102c8677c start_wrapper + 38856572 (threads.c:1310) 29 libsystem_pthread.dylib 0x000000022a0449ac _pthread_start + 148 (pthread.c:891) 30 libsystem_pthread.dylib 0x000000022a043e68 thread_start + 8 Thread 6 name: Thread 6: 0 libsystem_kernel.dylib 0x00000001f093c164 select$DARWIN_EXTSN + 8 1 MobileApp.iOS 0x0000000102ce8fd8 mono_poll + 39260120 (mono-poll.c:115) 2 MobileApp.iOS 0x0000000102c78690 poll_event_wait + 38798992 (threadpool-io-poll.c:153) 3 MobileApp.iOS 0x0000000102c78104 selector_thread + 38797572 (threadpool-io.c:461) 4 MobileApp.iOS 0x0000000102c868f8 start_wrapper_internal + 38856952 (threads.c:1289) 5 MobileApp.iOS 0x0000000102c8677c start_wrapper + 38856572 (threads.c:1310) 6 libsystem_pthread.dylib 0x000000022a0449ac _pthread_start + 148 (pthread.c:891) 7 libsystem_pthread.dylib 0x000000022a043e68 thread_start + 8 Thread 7 name: Thread 7: 0 libsystem_kernel.dylib 0x00000001f093b4a0 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x00000001f093bae4 mach_msg + 76 (mach_msg.c:119) 2 CoreFoundation 0x00000001b8e72d30 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646) 3 CoreFoundation 0x00000001b8e771bc __CFRunLoopRun + 1180 (CFRunLoop.c:3000) 4 CoreFoundation 0x00000001b8e8abc8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268) 5 AudioSession 0x00000001c2496f04 CADeprecated::GenericRunLoopThread::Entry(void*) + 164 (GenericRunLoopThread.h:95) 6 AudioSession 0x00000001c24a08f0 CADeprecated::CAPThread::Entry(CADeprecated::CAPThread*) + 92 (CAPThread.cpp:324) 7 libsystem_pthread.dylib 0x000000022a0449ac _pthread_start + 148 (pthread.c:891) 8 libsystem_pthread.dylib 0x000000022a043e68 thread_start + 8 Thread 8 name: Thread 8: 0 libsystem_kernel.dylib 0x00000001f093b4a0 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x00000001f093bae4 mach_msg + 76 (mach_msg.c:119) 2 CoreFoundation 0x00000001b8e72d30 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646) 3 CoreFoundation 0x00000001b8e771bc __CFRunLoopRun + 1180 (CFRunLoop.c:3000) 4 CoreFoundation 0x00000001b8e8abc8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268) 5 CoreFoundation 0x00000001b8f0bda8 CFRunLoopRun + 64 (CFRunLoop.c:3293) 6 CoreMotion 0x00000001c6317a9c CLMotionCore::runMotionThread(void*) + 1208 (CLMotionCore.mm:370) 7 libsystem_pthread.dylib 0x000000022a0449ac _pthread_start + 148 (pthread.c:891) 8 libsystem_pthread.dylib 0x000000022a043e68 thread_start + 8 Thread 9 name: Thread 9: 0 libsystem_kernel.dylib 0x00000001f093b4f4 semaphore_timedwait_trap + 8 1 MobileApp.iOS 0x0000000102c7bb68 worker_thread + 38812520 (threadpool-worker-default.c:490) 2 MobileApp.iOS 0x0000000102c868f8 start_wrapper_internal + 38856952 (threads.c:1289) 3 MobileApp.iOS 0x0000000102c8677c start_wrapper + 38856572 (threads.c:1310) 4 libsystem_pthread.dylib 0x000000022a0449ac _pthread_start + 148 (pthread.c:891) 5 libsystem_pthread.dylib 0x000000022a043e68 thread_start + 8 Thread 10 name: Thread 10: 0 libsystem_kernel.dylib 0x00000001f093b4f4 semaphore_timedwait_trap + 8 1 MobileApp.iOS 0x0000000102c7bb68 worker_thread + 38812520 (threadpool-worker-default.c:490) 2 MobileApp.iOS 0x0000000102c868f8 start_wrapper_internal + 38856952 (threads.c:1289) 3 MobileApp.iOS 0x0000000102c8677c start_wrapper + 38856572 (threads.c:1310) 4 libsystem_pthread.dylib 0x000000022a0449ac _pthread_start + 148 (pthread.c:891) 5 libsystem_pthread.dylib 0x000000022a043e68 thread_start + 8 Thread 11 name: Thread 11: 0 libsystem_pthread.dylib 0x000000022a043e54 start_wqthread + 0 Thread 12 name: Thread 12: 0 libsystem_kernel.dylib 0x00000001f093bf24 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x000000022a04b298 _pthread_cond_wait + 1236 (pthread_cond.c:636) 2 MobileApp.iOS 0x0000000102ce87d4 mono_os_cond_timedwait + 39258068 (mono-os-mutex.c:75) 3 MobileApp.iOS 0x0000000102cf09ac mono_thread_info_sleep + 39291308 (mono-threads.c:1673) 4 MobileApp.iOS 0x0000000102c7b2b0 monitor_thread + 38810288 (threadpool-worker-default.c:728) 5 MobileApp.iOS 0x0000000102c868f8 start_wrapper_internal + 38856952 (threads.c:1289) 6 MobileApp.iOS 0x0000000102c8677c start_wrapper + 38856572 (threads.c:1310) 7 libsystem_pthread.dylib 0x000000022a0449ac _pthread_start + 148 (pthread.c:891) 8 libsystem_pthread.dylib 0x000000022a043e68 thread_start + 8 Thread 13 name: Thread 13: 0 libsystem_kernel.dylib 0x00000001f093b4f4 semaphore_timedwait_trap + 8 1 MobileApp.iOS 0x0000000102c7bb68 worker_thread + 38812520 (threadpool-worker-default.c:490) 2 MobileApp.iOS 0x0000000102c868f8 start_wrapper_internal + 38856952 (threads.c:1289) 3 MobileApp.iOS 0x0000000102c8677c start_wrapper + 38856572 (threads.c:1310) 4 libsystem_pthread.dylib 0x000000022a0449ac _pthread_start + 148 (pthread.c:891) 5 libsystem_pthread.dylib 0x000000022a043e68 thread_start + 8 Thread 14 name: Thread 14: 0 libsystem_kernel.dylib 0x00000001f093b4f4 semaphore_timedwait_trap + 8 1 MobileApp.iOS 0x0000000102c7bb68 worker_thread + 38812520 (threadpool-worker-default.c:490) 2 MobileApp.iOS 0x0000000102c868f8 start_wrapper_internal + 38856952 (threads.c:1289) 3 MobileApp.iOS 0x0000000102c8677c start_wrapper + 38856572 (threads.c:1310) 4 libsystem_pthread.dylib 0x000000022a0449ac _pthread_start + 148 (pthread.c:891) 5 libsystem_pthread.dylib 0x000000022a043e68 thread_start + 8 Thread 15 name: Thread 15: 0 libsystem_kernel.dylib 0x00000001f093b4f4 semaphore_timedwait_trap + 8 1 MobileApp.iOS 0x0000000102c7bb68 worker_thread + 38812520 (threadpool-worker-default.c:490) 2 MobileApp.iOS 0x0000000102c868f8 start_wrapper_internal + 38856952 (threads.c:1289) 3 MobileApp.iOS 0x0000000102c8677c start_wrapper + 38856572 (threads.c:1310) 4 libsystem_pthread.dylib 0x000000022a0449ac _pthread_start + 148 (pthread.c:891) 5 libsystem_pthread.dylib 0x000000022a043e68 thread_start + 8 Thread 0 crashed with ARM Thread State (64-bit): x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000 x4: 0x0000000000000000 x5: 0x0000000000989680 x6: 0x0000000000000800 x7: 0x000000000000f500 x8: 0x49ff301c08872ed0 x9: 0x49ff301d0badab50 x10: 0x00000000000003e8 x11: 0x0000000000000000 x12: 0x0000000121d60000 x13: 0x000000012b714133 x14: 0x0000000000001fe0 x15: 0x0000000080000000 x16: 0x0000000000000148 x17: 0x00000001032a8580 x18: 0x0000000000000000 x19: 0x0000000000000006 x20: 0x0000000000000103 x21: 0x00000001032a8660 x22: 0x0000000000000000 x23: 0x0000000104016400 x24: 0x000000012b714130 x25: 0x000000016f685110 x26: 0x0000000000000002 x27: 0x0000000103025618 x28: 0x0000000000ffffff fp: 0x000000016f6842d0 lr: 0x000000022a04a3bc sp: 0x000000016f6842b0 pc: 0x00000001f0941b38 cpsr: 0x40001000 esr: 0x56000080 Address size fault Binary Images: 0x100778000 - 0x102e57fff MobileApp.iOS arm64 <8602e97e1f303be88b8f940f2dd39d39> /private/var/containers/Bundle/Application/712D27DD-A31F-43C5-9361-8FC918C156BD/MobileApp.iOS.app/MobileApp.iOS 0x10323c000 - 0x103293fff dyld arm64e <7c9c7851823738a7b1eb9cd2deb4b746> /usr/lib/dyld 0x1b8e6c000 - 0x1b92c1fff CoreFoundation arm64e <5198fb5756453b34a49ff32b52256cf3> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation 0x1ba660000 - 0x1ba96afff Foundation arm64e /System/Library/Frameworks/Foundation.framework/Foundation 0x1bb2e6000 - 0x1bcb81fff UIKitCore arm64e <3ed35565456d33cbb5546c567fa81585> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore 0x1c2490000 - 0x1c24bafff AudioSession arm64e <517338a283153b61b47f5cb914d4fcec> /System/Library/PrivateFrameworks/AudioSession.framework/AudioSession 0x1c3feb000 - 0x1c406afff libsystem_c.dylib arm64e <9bd1e19940a33e4a8a78271281c0cf0d> /usr/lib/system/libsystem_c.dylib 0x1c6305000 - 0x1c661efff CoreMotion arm64e <9c8c66b5a316322aa0d934c267254564> /System/Library/Frameworks/CoreMotion.framework/CoreMotion 0x1d4fbd000 - 0x1d4fc5fff GraphicsServices arm64e <260f066ec5de3844967e483985448f21> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices 0x1f093a000 - 0x1f096ffff libsystem_kernel.dylib arm64e <1db00c916ad8384085030c6fbffa8e0b> /usr/lib/system/libsystem_kernel.dylib 0x22a043000 - 0x22a04efff libsystem_pthread.dylib arm64e <1026e3a4d3c03b0da552f185d6772a29> /usr/lib/system/libsystem_pthread.dylib EOF ```

Environment

Version information ``` Visual Studio Professional 2022 for Mac Version 17.0.5 (build 6) Installation UUID: bb9828c4-f56e-4787-bfbd-5ba58500226c Runtime .NET 6.0.5 (64-bit) Architecture: X64 Roslyn (Language Service) 4.1.0-3.22075.3+592501cbb9c9394072a245c15b3458ff88155d85 NuGet Version: 6.0.0.262 .NET SDK (x64) SDK: /usr/local/share/dotnet/sdk/6.0.301/Sdks SDK-Versionen: 6.0.301 6.0.300 6.0.203 6.0.202 6.0.201 6.0.200 6.0.101 6.0.100 5.0.408 5.0.407 5.0.406 5.0.405 5.0.404 5.0.403 5.0.402 5.0.401 5.0.400 5.0.302 5.0.301 5.0.203 5.0.202 5.0.201 5.0.103 5.0.102 5.0.101 5.0.100 3.1.420 3.1.419 3.1.418 3.1.417 3.1.416 3.1.415 3.1.414 3.1.413 3.1.412 3.1.411 3.1.410 3.1.409 3.1.408 3.1.407 3.1.406 3.1.405 3.1.404 3.1.403 3.1.402 3.1.401 3.1.302 3.1.300 3.1.202 3.1.200 3.1.101 3.1.100 3.0.101 3.0.100 MSBuild-SDKs: /Applications/Visual Studio.app/Contents/MonoBundle/MSBuild/Current/bin/Sdks .NET Runtime (x64) Laufzeit: /usr/local/share/dotnet/dotnet Laufzeitversionen: 6.0.6 6.0.5 6.0.4 6.0.3 6.0.2 6.0.1 6.0.0 5.0.17 5.0.16 5.0.15 5.0.14 5.0.13 5.0.12 5.0.11 5.0.10 5.0.9 5.0.8 5.0.7 5.0.6 5.0.5 5.0.4 5.0.3 5.0.2 5.0.1 5.0.0 3.1.26 3.1.25 3.1.24 3.1.23 3.1.22 3.1.21 3.1.20 3.1.19 3.1.18 3.1.17 3.1.16 3.1.15 3.1.14 3.1.13 3.1.12 3.1.11 3.1.10 3.1.9 3.1.8 3.1.7 3.1.6 3.1.4 3.1.2 3.1.1 3.1.0 3.0.1 3.0.0 2.1.23 2.1.22 2.1.21 2.1.20 2.1.18 2.1.16 2.1.15 2.1.14 2.1.13 Xamarin.Profiler Version: 1.8.0.19 Speicherort: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler Updater Version: 11 Apple Developer Tools Xcode 13.4.1 (20504) Build 13F100 Xamarin.Mac Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version. Xamarin.iOS Version: 15.10.0.5 (Visual Studio Professional) Hash: 96b3edb6d Branch: d17-2 Build date: 2022-05-18 07:32:07-0400 Xamarin Designer Version: 17.1.5.90 Hash: 53f47efde Branch: remotes/origin/d17-0-vsmac Build date: 2022-06-23 13:04:47 UTC Xamarin.Android Version: 12.3.3.3 (Visual Studio Professional) Commit: xamarin-android/d17-2/4e061b7 Android SDK: /Users/sebastianklatte/Library/Developer/Xamarin/android-sdk-macosx Unterstützte Android-Versionen: 12.0 (API-Ebene 31) 11.0 (API-Ebene 30) 10.0 (API-Ebene 29) 9.0 (API-Ebene 28) Version der SDK-Befehlszeilentools: 5.0 Version der SDK-Plattformtools: 31.0.3 Version der SDK-Buildtools: 30.0.3 Buildinformationen: Mono: dffa5ab Java.Interop: xamarin/java.interop/d17-2@9760f0a9 ProGuard: Guardsquare/proguard/v7.0.1@912d149 SQLite: xamarin/sqlite/3.38.2@7b1e016 Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-2@fc3c2ac Microsoft Build of OpenJDK Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk 11.0.12 EPL-Code für Android Designer hier verfügbar: https://github.com/xamarin/AndroidDesigner.EPL Eclipse Temurin JDK Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk 1.8.0.302 EPL-Code für Android Designer hier verfügbar: https://github.com/xamarin/AndroidDesigner.EPL Android SDK Manager Version: 17.2.0.37 Hash: 7f5a6ef Branch: remotes/origin/d17-2 Build date: 2022-06-23 13:04:52 UTC Android Device Manager Version: 0.0.0.1116 Hash: e47e6c8 Branch: remotes/origin/d17-2 Build date: 2022-06-23 13:04:52 UTC Build Information Release ID: 1700050006 Git revision: 6b4784739a2f1a96c570a5f7c945170a8445bcf1 Build date: 2022-06-23 13:02:17+00 Build branch: release-17.0 Build lane: release-17.0 Operating System Mac OS X 12.4.0 Darwin 21.5.0 Darwin Kernel Version 21.5.0 Tue Apr 26 21:08:22 PDT 2022 root:xnu-8020.121.3~4/RELEASE_X86_64 x86_64 ```

Build Logs

Example Project (If Possible)

chamons commented 2 years ago

The relevant portion of the stack trace:

3   libsystem_c.dylib               0x00000001c400b530 abort + 180 (abort.c:126)
4   MobileApp.iOS                   0x0000000102cff32c xamarin_find_protocol_wrapper_type + 39351084 (runtime.m:1177)
5   MobileApp.iOS                   0x0000000102be7550 mono_invoke_unhandled_exception_hook + 38204752 (exception.c:1299)
6   MobileApp.iOS                   0x0000000102b8590c mono_handle_exception_internal + 37804300 (mini-exceptions.c:2783)
7   MobileApp.iOS                   0x0000000102b842e0 mono_handle_exception + 37798624 (mini-exceptions.c:3107)
8   MobileApp.iOS                   0x0000000102b7acfc mono_arm_throw_exception + 37760252 (exceptions-arm64.c:403)
9   MobileApp.iOS                   0x0000000100be186c throw_exception + 172
10  MobileApp.iOS                   0x000000010092e1fc System_Runtime_ExceptionServices_ExceptionDispatchInfo_Throw + 44
11  MobileApp.iOS                   0x0000000100934424 System_Runtime_CompilerServices_AsyncMethodBuilderCore__c__ThrowAsyncb__7_0_object + 84
12  MobileApp.iOS                   0x00000001017f0bdc Foundation_NSAsyncSynchronizationContextDispatcher_Apply + 17271772 (NSAction.cs:178)
13  MobileApp.iOS                   0x0000000100b75280 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 272
14  MobileApp.iOS                   0x0000000102b95f90 mono_jit_runtime_invoke + 37871504 (mini-runtime.c:3191)
15  MobileApp.iOS                   0x0000000102c42138 mono_runtime_invoke_checked + 38576440 (object.c:3220)
16  MobileApp.iOS                   0x0000000102c455bc mono_runtime_invoke + 38589884 (object.c:3107)
17  MobileApp.iOS                   0x000000010077f0f4 native_to_managed_trampoline_17(objc_object*, objc_selector*, _MonoMethod**, unsigned int) + 28916 (registrar.m:904)
18  MobileApp.iOS                   0x00000001007809f4 -[__MonoMac_NSAsyncSynchronizationContextDispatcher xamarinApplySelector] + 35316 (registrar.m:8732)
19  Foundation                      0x00000001ba69df20 __NSThreadPerformPerform + 212 (NSThread.m:1058)
20  CoreFoundation                  0x00000001b8f27414 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1972)

First of all, I want to point out that this stack trace is suspect. If you aren't familiar with stack traces, each line has this format

Frame # - Library/Executable - Pointer - Resolved Symbol + Offset from Symbols - (optional filname:line number)

Let's look at frame 4: 4 MobileApp.iOS 0x0000000102cff32c xamarin_find_protocol_wrapper_type + 39351084 (runtime.m:1177)

Note that the offset is absurdly huge 39351084. This means we can not trust that it was actually in xamarin_find_protocol_wrapper_type in, it just happened to be the closest symbol it could find (39351084 away).

That offset should be in the hundreds, occasionally in thousands/ten thousands. Anything over that is likely garbage.

Now let's look at the portions that have reasonable offsets to see what we can find:

3   libsystem_c.dylib               0x00000001c400b530 abort + 180 (abort.c:126)
...
9   MobileApp.iOS                   0x0000000100be186c throw_exception + 172
10  MobileApp.iOS                   0x000000010092e1fc System_Runtime_ExceptionServices_ExceptionDispatchInfo_Throw + 44
11  MobileApp.iOS                   0x0000000100934424 System_Runtime_CompilerServices_AsyncMethodBuilderCore__c__ThrowAsyncb__7_0_object + 84
...
13  MobileApp.iOS                   0x0000000100b75280 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 272
...
17  MobileApp.iOS                   0x000000010077f0f4 native_to_managed_trampoline_17(objc_object*, objc_selector*, _MonoMethod**, unsigned int) + 28916 (registrar.m:904)
18  MobileApp.iOS                   0x00000001007809f4 -[__MonoMac_NSAsyncSynchronizationContextDispatcher xamarinApplySelector] + 35316 (registrar.m:8732)
19  Foundation                      0x00000001ba69df20 __NSThreadPerformPerform + 212 (NSThread.m:1058)
20  CoreFoundation                  0x00000001b8f27414 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1972)

Apple is calling us from a CFRunLoop, on some NSThread API, and we're calling something that looks like it has a NSAsyncSynchronizationContextDispatcher related. We trampoline to managed code, calling something that appears to take 2 pointer sized arguments and is using async, and throw an exception that is uncaught.

Beyond that, we can't tell much more, as we don't have full symbols.

It sounds like this is a random crash, which means you can't reproduce it. If you could, you could add this to your csproj:

<PropertyGroup>
    <NoSymbolStrip>true</NoSymbolStrip>
</PropertyGroup>

which would prevent all symbols from being stripped, giving you a better stack trace. However, it would significantly increase your application bundle size.

Another option would be to look into services that allow you to catch managed exceptions and report them back. This would let you see the managed exception that is the root cause. One such service is App Center but they are many on the market.

Without a sample to reproduce or more details however, there isn't more we can do here, so I'm going to close this issue. Feel free to reopen if you have actionable details, such as a stack trace with better symbols or a sample project showing the issue.