-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Unity as a Library does not report crashes/fatals #1727
Comments
Thanks @Esildor for reaching out! Tbh I've never tried the UaaL sample. I'll get back to you after giving this a try! |
This has not been forgotten. I'm working my way through the guide. |
Thanks for the update 💖 |
We're working on, well, making that work. There are a couple of questions that need to be answered first:
|
I've created a UaaL repro here to have something to work off of. |
ContextWhen exporting as a library Unity we have a couple of different things to watch out for:
Setup for Automatic Native Crash CaptureNumber 3 is currently the crux. When exporting as a library, Unity has its own activity to run in
To get the Android SDK to have the NDK integration running in the separate process we have to follow our "multi process apps" docs and add
to the GotchaAdd ResultHaving followed this setup native crashes do automatically get captured. Open IssuesThere are a couple issues remaining, mostly debug symbols and IL2CPP related. Debug Symbol UploadThe debug symbols automatically uploaded by the Android Gradle Plugin seem to be lacking the C# line numbers and IL2CPP MappingsBecause native support during the export is disabled we also don't generate and upload the IL2CPP mappings errors captured by the Unity SDK are missing line numbers. but this can be fixed on the SDK side. C# frames in native crashesThe screenshots of native crashes have a couple of
TLDR; What to do?
|
Environment
How do you use Sentry?
Sentry SaaS
Which version of the SDK?
2.1.0
How did you install the package?
Git-URL
Which version of Unity?
6000.0.4f1
Is this happening in Unity (editor) or on a player like Android, iOS, Windows?
Android
Steps to Reproduce
UnityEngine.Diagnostics.Utils.ForceCrash()
. To the top left of the screen.ForcedCrashCategory
buttons, for example: Engine Crash - FatalError, Engine Crash - AccessViolation, etc.Expected Result
Unity engine-level crashes/fatal issues are reported to Sentry.
Actual Result
No fatal crash is reported. It's also worth noting: Performing these steps in a non-UaaL project reports fatal level crashes to Sentry as expected, see the image below.
Any logs or screenshots
The text was updated successfully, but these errors were encountered: