Problem Statement
.NET 11 should be adding. in proc crash report logging that we can hopefully leverage to provide better exception reporting on mobile targets.
See:
The .crashreport.json files include a much richer stack trace than we currently get for native crashes or crashes with a mix of native and managed frames:
...
"threads": [
{
"is_managed": "true",
"crashed": "true",
"native_thread_id": "0x1adc",
"ctx": {
"IP": "0x7e6f5e5a10f4",
"SP": "0x7fffea6244e0",
"BP": "0x7fffea6244e0"
},
"stack_frames": [
{
"is_managed": "false",
"stack_pointer": "0x7fffea6244e0",
"native_address": "0x7e6f5e5a10f4"
},
{
"stack_pointer": "0x7fffea624520",
"native_address": "0x7e6e1af96f98",
"native_offset": "0x78",
"method_name": "Maui.Diagnostics.Playground.Features.Scenarios.NativeCrashInterop.MixedStackNative",
"is_managed": "true",
"token": "0x6000093",
"il_offset": "0x0",
"filename": "Maui.Diagnostics.Playground",
"timestamp": "0xcbf5c1ba",
"sizeofimage": "0x36a00",
"guid": "{8ae4c3d5-286d-487a-adf7-39bfa6d48ad3}"
},
...
Currently Sentry just shows unsymbolicated Native frames:
SIGSEGV: Segfault
libcrashnativekit 0x7e6f5e5a10f4 null
libcrashnativekit 0x7e6f5e5a10dc null
libcrashnativekit 0x7e6f5e5a10c8 null
libcrashnativekit 0x7e6f5e5a0f14 null
libcrashnativekit 0x7e6f5e5a0fdc crash_native_mixed_stack
0x7e6e1af96f94 null
And when sentry-native captures mixed stack traces it's not much better (since sentry-native can't unwind managed frames):
Solution Brainstorm
We should be able to pull the crash report from disk when building the event in Sentry):
- If it's a native crash, we'd likely have to do that in sentry-native since this will be the SDK that captures native exceptions
- If it's a managed crash, it still might be useful if we have a mix of native/managed frames in the stack trace
Problem Statement
.NET 11 should be adding. in proc crash report logging that we can hopefully leverage to provide better exception reporting on mobile targets.
See:
The .crashreport.json files include a much richer stack trace than we currently get for native crashes or crashes with a mix of native and managed frames:
Currently Sentry just shows unsymbolicated Native frames:
And when sentry-native captures mixed stack traces it's not much better (since sentry-native can't unwind managed frames):
Solution Brainstorm
We should be able to pull the crash report from disk when building the event in Sentry):