-
Notifications
You must be signed in to change notification settings - Fork 263
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
[BUG] Broken crash stack traces with NDK r22 and SDK 29 #1589
Comments
r22 is no longer supported. Do you see the same issue with NDK r23? |
Yes, having the same issue with r23. |
Thanks for confirming. Not a regression from r22 but is from the previous LTS so our rules here are a little hazy. I'd be in favor of a cherry-pick to r23, but it depends on the scope of the fix. For now triaging to r24. |
Ok thanks. I noticed the issue on a Galaxy S20 with Android 10 and I just tried an S21 with Android 11 and I'm not seeing the problem there so it could depend on the target device's version too. |
That reminds me of #1196 (comment), but I don't think it's actually related (that issue was fixed in r22 after all). |
It does sound like a similar type of issue. |
Adding |
Huh. I saw earlier that we do have a test for this, but maybe the test was only for ndk-build? I'll have to look again tomorrow. Thanks for confirming. Really didn't expect that to be the answer :( You're just using whatever version of CMake and AGO are the defaults for that sample, right? Only changed the NDK version? |
The sample uses NDK r22 by default and I only need to change the min SDK version to 29 to see the issue. Changing the NDK version to r21 does not show the issue even with the min SDK version still at 29. I didn't change the CMake version or any other version. |
Hmm. It sounds like we got the API level for the min version off by one then, but I checked and https://android-review.googlesource.com/c/platform/system/core/+/777288/ was in Q (29). I wonder if Samsung for some reason reverted that patch (I can't imagine why they would, so that seems really unlikely to me), or if that was only a partial fix and we just need to raise that to 30. |
I was able to reproduce the same issue with the sample native-activity on a Pixel 3a with Android 10 so it does not appear to be something Samsung changed. |
Excellent, thanks for checking that (was on my list but you beat me to it). Sounds like all we need to do then is just change the |
Hopefully it's as simple as that but I don't know enough about the issue to confirm. Thanks for looking into it :-) |
@pharscoet should be fixed in https://ci.android.com/builds/branches/aosp-master-ndk/grid?head=7821997&tail=7821997 if you want to give that a shot. |
this version does fix the issue with the NDK's native-activity sample and with some other code I was seeing this issue with :-) |
Thanks for confirming 👍 It'll be in r24 beta 1 in a couple weeks, but for a stable release r23c will be sooner than r24 stable (both dates tbd, but r23c will be first). |
Ok, so the fix will also be merged into r23c, and not just in r24, correct? |
Yep. |
Sounds good, thanks! |
Should be fixed in r23 build 8486889. |
Broken crash stack traces with SDK 29, and need to raise the min SDK version to 30 to solve the problem. Test: added test fix bug 1589 android/ndk#1589 Change-Id: Ie39ed3e48048a90caa69a462ff44e48a02c361d8 (cherry picked from commit e3436c7) Merged-In: Ie39ed3e48048a90caa69a462ff44e48a02c361d8
Bug: android/ndk#1589 Test: None Change-Id: I2890bbcd625ba74d0869649de4b17e10efee7112 (cherry picked from commit ab24010d325f935fe2bb9c74af2f5b9bed0c9315) Merged-In: I2890bbcd625ba74d0869649de4b17e10efee7112
Description
I am seeing a strange issue where after upgrading code to use NDK r22, the crash stack traces in the log are bogus or truncated.
And it seems to happen when using a min SDK version of 29 and not with earlier versions (I haven't tried 30). NDK r21 with min SDK 29 does not have the issue.
I am able to reproduce the issue with the
native-activity
app from the NDK samples.That sample app has
ndkVersion
set to22.1.7171670
.I added a
packagingOptions.doNotStrip '**'
to thebuild.gradle
file so the symbols are not stripped and anassert(false);
inmain.cpp:engine_draw_frame()
to cause a crash.When run, the assert produces the stack trace:
which is correct.
Now, if I change the
minSdkVersion
to29
inbuild.gradle
and I run it again, the new stack trace becomes:it is now truncated and not useful. With other code I have seen the trace containing symbols completely unrelated to the crash.
If leaving
minSdkVersion
at29
and changingndkVersion
to21.4.7075529
, the correct stack trace is produced.Environment Details
Not all of these will be relevant to every bug, but please provide as much
information as you can.
The text was updated successfully, but these errors were encountered: