-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Release build for embedded app on API 16 crashes with Fatal signal 11 (SIGSEGV) at 0x53cbc000 (code=2), thread 16581 (1.ui) #43259
Comments
Bisected this to dart-lang/sdk@8c5236f |
I can reproduce this by running any Flutter app in release mode on a Nexus 7 (2012) running Android 4.1.2 |
I was able to reproduce this in the emulator with Android 4.1, but not with a Nexus 7 running Android 4.4. The emulator is quite difficult to use: Jason, how did you get Android 4.1 on the Nexus? I can only seem to flash it with 4.4 and above. |
I have an old Nexus 7 running 4.1.2 that I've never upgraded. The 4.1.2 factory image on https://developers.google.com/android/images#nakasi should work, but I haven't actually tried flashing it. The Nexus 7 needs to be the 2012 model, not the 2013 version. |
Thanks, I was able to reproduce it on the phone. It actually wasn't reproducing in QEMU, I just hit another issue where some code in the Flutter runtime included some VFP instructions QEMU wouldn't execute. Anyway, the issue is that the Android ELF loader in 4.1.2 is not loading segments from our ELF snapshots in the correct order. I'll see if we can work around it by changing our snapshots; if not, we can use our custom ELF loader for this (or older) versions of Android. |
The root cause is an issue in Android 4.1's "Bionic" dynamic linker: It incorrect assumes that all non-writable sections are contiguous, which is not true for our ELF snapshots. We will try to restore this assumption by moving the BSS segments to the beginning and leaving the program header segment writable. |
… Jelly Bean. Fixes flutter/flutter#43259 Change-Id: I8c9041baf34bd07bf203469d0ebfbb2e6379ee08 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123733 Commit-Queue: Samir Jindel <sjindel@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>
Thank you! I confirm it is fixed on master channel :). |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Description
Simple flutter application embedded in existing android app crashes on Android 4.1 when starting flutter engine. Only on release build, debug build works properly. Works on release and debug builds on Android API>=18. API 17 - not tested.
Tested on Flutter SDK from master, dev and beta channels.
Steps to reproduce
Create embedded flutter app for Android as described in Add Flutter to existing apps docs.
Use Flutter's new Android embedding.
Create flutter engine in app's MainActivity.kt.
flutter doctor -v
The text was updated successfully, but these errors were encountered: