Skip to content

Check for crash reports when capturing errors on mobile (next Major) #5312

Description

@jamescrosswell

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):

Image

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

Activity

  1. added this to the 7.0.0 milestone on Jun 24, 2026
  2. added
    FeatureNew feature or request
    .NETPull requests that update .net code
    on Jun 24, 2026
  3. linear-code commented on Jun 24, 2026

    @linear-code
  4. added
    Next MajorChanges scheduled for the next Major release.
    on Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .net codeFeatureNew feature or requestNext MajorChanges scheduled for the next Major release.

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions