You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we bundle the Sentry iOS SDK we need to take into account that Mono uses some signals to interpret NullReferenceExceptions and need special case (run before other crash reports do):
This is probably something we can do in the binding project, before calling Init in the iOS SDK.
Proposed solution, based on the Mono docs:
try{}finally{
Mono.Runtime.RemoveSignalHandlers();try{// Init the Sentry iOS SDK:
SentrySDK.start(...);}finally{
Mono.Runtime.InstallSignalHandlers();}}
Since Mono’s signal handlers are reinstalled and not restored, Mono will now chain to the signal handlers installed by EnableCrashReporting.
The code is executed in a finally block, so that the Mono runtime will never abort it under any circumstance.
It’s recommended to do this as early as possible when launching the process, in particular before starting any secondary threads. If any signals are raised between removing and reinstalling Mono’s signal handlers (this includes NullReferenceExceptions), the app will crash.
When we bundle the Sentry iOS SDK we need to take into account that Mono uses some signals to interpret
NullReferenceException
s and need special case (run before other crash reports do):See: https://www.mono-project.com/docs/advanced/signals/#incomplete-solution
See also: dotnet/runtime#44736
This is probably something we can do in the binding project, before calling
Init
in the iOS SDK.Proposed solution, based on the Mono docs:
See: https://www.mono-project.com/docs/advanced/signals/#complete-solution
The text was updated successfully, but these errors were encountered: