Closed geskill closed 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.
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 (/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)