Skip to content

Sentry reports handled NRE as EXC_BAD_ACCESS signal #3776

@TimBurik

Description

@TimBurik

Package

Sentry

.NET Flavor

.NET

.NET Version

9.0.100

OS

iOS

SDK Version

4.13.0

Self-Hosted Sentry Version

No response

Steps to Reproduce

  1. Create empty dotnet iOS project, add Sentry nuget package;
  2. In FinishedLaunching(), initialize SentrySdk:
SentrySdk.Init(options =>
 {
    options.Dsn = "...";
    options.Debug = true;
    options.SampleRate = 1.0f;
});
  1. After Sentry is initialized, execute a code like this:
try
{
    object o = null;
    Console.WriteLine(o.ToString()); //throws NullReferenceException
}
catch (Exception e)
{
    Console.WriteLine(e);
}

Expected Result

Since exception is handled, there should be no reports in Sentry.

Actual Result

Sentry writes down the envelope and sends it in the next session. Example of the crashlog: crashlog.txt

In production, we also see examples of double reports - when unhandled managed NRE and native SIGSEGV are reported from the same device at the same time with very similar stacktraces. But it seems to be the result of the same issue.

I seems that this issue is related to the order of signal handlers and has the same root cause as dotnet/android#9055 (seems to have a fix on the Sentry side getsentry/sentry-native#1026). Also it might be related to this issue: #3678

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Status

    Done

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions