-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[Android] Uncaught exception crashes an app without printing correct stack trace #69601
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to 'arch-android': @steveisok, @akoeplinger Issue DetailsDescriptionI noticed that uncaught exceptions don't print information about the exception that cause it and instead print information about a SIGSEGV crash originating in Mono Reproduction Steps
Expected behaviorThe runtime will print a stack trace of the exception which caused the app to crash. Actual behaviorThe app crashes due to null pointer dereference in
Regression?No response Known WorkaroundsNo response Configuration
Other informationNo response
|
There is something weird going on with runtime/src/tasks/AndroidAppBuilder/Templates/monodroid.c Lines 168 to 182 in 3b46cf5
When I put a breakpoint in it, I can see that
However if I print out
So it looks like something cuts off the upper 32-bits of the I stepped through it and there's nothing obviously wrong with the function itself - we do some GC Unsafe transitions and then return Maybe we have some other declaration of |
Treat missing protoype warnings as errors so this doesn't happen again. Fixes dotnet#69601
* [AndroidAppBuilder] add missing includes to template Treat missing protoype warnings as errors so this doesn't happen again. Fixes #69601 * also fixup library mode template
Description
I noticed that uncaught exceptions don't print information about the exception that cause it and instead print information about a SIGSEGV crash originating in Mono
m_class_get_class_kind
function.Reproduction Steps
src/mono/sample/Android/Program.cs
with simplythrow new System.Exception("boom");
adb logcat -s DEBUG
Expected behavior
The runtime will print a stack trace of the exception which caused the app to crash.
Actual behavior
The app crashes due to null pointer dereference in
m_class_get_class_kind
and produces a crash report similar to this:Regression?
No response
Known Workarounds
No response
Configuration
main
(3914bcc230134ec3e1c9be903c6bd8ff60d92501
)EDIT:
The variables in the android sample Makefile:
Other information
No response
The text was updated successfully, but these errors were encountered: