Skip to content

SIGSEGV reported by Sentry when a NullReferenceException is thrown in Release mode #9055

Closed
@tranb3r

Description

@tranb3r

Android framework version

net8.0-android

Affected platform version

VS 2022 17.10.0

Description

I'm getting SIGSEGV reports from Sentry when running my Maui app on Android.
I've norrowed it down to a NullReferenceException happening in Release mode.
However, I don't understand why I get both a NullReferenceException and a SIGSEGV, since I'm using only managed code.
Even when I catch the NullReferenceException, the SIGSEGV still occurs, without the app actually crashing.
Also, I haven't seen anything weird in the log. How is Sentry catching this SIGSEGV? I'm lost here...
Could you please take a look at my repro? https://github.com/tranb3r/Issues/tree/main/MauiAppSegfault

Steps to Reproduce

  1. Open repro app in Visual Studio and set your Dsn for Sentry before running the app.
  2. Run the app in Release mode on Android.
  3. Tap on Run button. A NullReferenceException happens but it's catched silently.
  4. Close the app, launch it again. An error report with SIGSEGV is sent to Sentry immediately.

Did you find any workaround?

No workaround.

Relevant log output

No response

Metadata

Metadata

Assignees

Labels

Area: App RuntimeIssues in `libmonodroid.so`.need-attentionA xamarin-android contributor needs to review

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions