Skip to content

iOS: cannot suppress SIGABRT nor EXC_BAD_ACCESS #4520

@jpnurmi

Description

@jpnurmi

Package

Sentry

.NET Flavor

.NET

.NET Version

9.0.304

OS

iOS

OS Version

No response

Development Environment

Rider 2024 (MacOS)

SDK Version

main (3f12094)

Self-Hosted Sentry Version

25.8.0

Workload Versions

Using workload version 9.0.304, which was specified in the global.json file at /Users/jpnurmi/Projects/sentry/sentry-dotnet/global.json.

Installed Workload Id      Manifest Version       Installation Source
---------------------------------------------------------------------
android                    35.0.92/9.0.100        SDK 9.0.300
ios                        18.5.9215/9.0.100      SDK 9.0.300
maccatalyst                18.5.9215/9.0.100      SDK 9.0.300
macos                      15.5.9215/9.0.100      SDK 9.0.300
maui-android               9.0.82/9.0.100         SDK 9.0.300
maui-ios                   9.0.82/9.0.100         SDK 9.0.300
maui-maccatalyst           9.0.82/9.0.100         SDK 9.0.300
maui-tizen                 9.0.82/9.0.100         SDK 9.0.300
wasm-tools-net8            9.0.8/9.0.100          SDK 9.0.300

UseSentry or SentrySdk.Init call

diff --git a/samples/Sentry.Samples.Maui/MauiProgram.cs b/samples/Sentry.Samples.Maui/MauiProgram.cs
index 1a8a6a30..69aab6b7 100644
--- a/samples/Sentry.Samples.Maui/MauiProgram.cs
+++ b/samples/Sentry.Samples.Maui/MauiProgram.cs
@@ -67,6 +67,9 @@ public static MauiApp CreateMauiApp()
                     // Return true to capture or false to prevent the capture
                     return true;
                 });
+
+                options.Native.SuppressSignalAborts = true;
+                options.Native.SuppressExcBadAccess = true;
             })

             .ConfigureFonts(fonts =>

Steps to Reproduce

SIGABRT

  1. Enable options.Native.SuppressSignalAborts
  2. Run Sentry.Samples.Maui
  3. Press Throw Unhandled .NET Exception (Crash)
  4. Run Sentry.Samples.Maui again
  5. Observe Sentry

EXC_BAD_ACCESS

  1. Enable options.Native.SuppressExcBadAccess
  2. Add a button to trigger NullReferenceException
  3. Run Sentry.Samples.Maui
  4. Press the button to trigger a null reference exception
  5. Run Sentry.Samples.Maui again
  6. Observe Sentry

Expected Result

Only System.ApplicationException should have been submitted - no SIGABRT nor EXC_BAD_ACCESS.

Actual Result

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .net codeBugSomething isn't working
    No fields configured for issues without a type.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions