Skip to content
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

Closed
bDev10 opened this issue Oct 22, 2019 · 8 comments
Assignees
Labels
a: existing-apps Integration with existing apps via the add-to-app flow c: crash Stack traces logged to the console platform-android Android applications specifically

Comments

@bDev10
Copy link

bDev10 commented Oct 22, 2019

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

  1. Create embedded flutter app for Android as described in Add Flutter to existing apps docs.

  2. Use Flutter's new Android embedding.

  3. Create flutter engine in app's MainActivity.kt.

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_main)
    setSupportActionBar(toolbar)

    // Instantiate your FlutterEngine.
    FlutterMain.startInitialization(applicationContext)
    FlutterMain.ensureInitializationComplete(applicationContext, null)

    val flutterEngine = FlutterEngine(applicationContext)  // <------- CRASHES HERE

    // Pre-warm your FlutterEngine by starting Dart execution.
    flutterEngine
        .dartExecutor
        .executeDartEntrypoint(
            DartExecutor.DartEntrypoint.createDefault()
        )
    FlutterEngineCache
        .getInstance()
        .put(MyApplication.MAIN_FLUTTER_ENGINE_ID, flutterEngine);
}
  1. Build in release.
  2. Start app on device with Android 4.1 (tested on Samsung Galaxy S2, Android 4.1.2).
  3. Crash:
10-22 12:49:33.578 16565-16581/? A/libc: Fatal signal 11 (SIGSEGV) at 0x53cbc000 (code=2), thread 16581 (1.ui)
10-22 12:49:33.678 1826-1826/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-22 12:49:33.678 1826-1826/? I/DEBUG: Build fingerprint: 'samsung/GT-I9100/GT-I9100:4.1.2/JZO54K/I9100XWLSS:user/release-keys'
10-22 12:49:33.683 1826-1826/? I/DEBUG: pid: 16565, tid: 16581, name: 1.ui  >>> com.example.embedflutter <<<
10-22 12:49:33.683 1826-1826/? I/DEBUG: signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 53cbc000
10-22 12:49:33.773 1826-1826/? I/DEBUG:     r0 538ba000  r1 00402000  r2 53431741  r3 0000001d
10-22 12:49:33.773 1826-1826/? I/DEBUG:     r4 535b1088  r5 4fe803e0  r6 4fe803e8  r7 00006f48
10-22 12:49:33.773 1826-1826/? I/DEBUG:     r8 53588a7c  r9 536b2964  sl 535a3d78  fp 4fe803f0
10-22 12:49:33.773 1826-1826/? I/DEBUG:     ip 535ae0dc  sp 536b2800  lr 533cb1bf  pc 533cb1d6  cpsr 60000030
10-22 12:49:33.773 1826-1826/? I/DEBUG:     d0  3f7aaaab000001d4  d1  3ff0000000000400
10-22 12:49:33.773 1826-1826/? I/DEBUG:     d2  3ef9d43540a00000  d3  4240000042400000
10-22 12:49:33.773 1826-1826/? I/DEBUG:     d4  0000000042100000  d5  0000000000000000
10-22 12:49:33.773 1826-1826/? I/DEBUG:     d6  437f0000000000ff  d7  3f8000003f800000
10-22 12:49:33.773 1826-1826/? I/DEBUG:     d8  000000000000000b  d9  0000000000000000
10-22 12:49:33.773 1826-1826/? I/DEBUG:     d10 0000000000000000  d11 0000000000000000
10-22 12:49:33.773 1826-1826/? I/DEBUG:     d12 0000000000000000  d13 0000000000000000
10-22 12:49:33.773 1826-1826/? I/DEBUG:     d14 0000000000000000  d15 0000000000000000
10-22 12:49:33.773 1826-1826/? I/DEBUG:     d16 3fdd400000000000  d17 3fe6b851eb851eb8
10-22 12:49:33.773 1826-1826/? I/DEBUG:     d18 00000190000001f4  d19 00000113000003e8
10-22 12:49:33.773 1826-1826/? I/DEBUG:     d20 3fd3bd3cc9be45de  d21 3fe3bd3cc9be45de
10-22 12:49:33.773 1826-1826/? I/DEBUG:     d22 3fa4e644860834c5  d23 3fe921fb54442d18
10-22 12:49:33.773 1826-1826/? I/DEBUG:     d24 3fede16b9c24a98f  d25 3fe55559ee5e69f9
10-22 12:49:33.773 1826-1826/? I/DEBUG:     d26 0000000000000000  d27 0000000000000000
10-22 12:49:33.773 1826-1826/? I/DEBUG:     d28 0000000000000005  d29 0000000000000000
10-22 12:49:33.773 1826-1826/? I/DEBUG:     d30 0000000000000000  d31 0000000000000000
10-22 12:49:33.773 1826-1826/? I/DEBUG:     scr 80000010
10-22 12:49:33.773 1826-1826/? I/DEBUG: backtrace:
10-22 12:49:33.773 1826-1826/? I/DEBUG:     #00  pc 003d51d6  /data/data/com.example.embedflutter/lib/libflutter.so
10-22 12:49:33.773 1826-1826/? I/DEBUG:     #01  pc 003d51bb  /data/data/com.example.embedflutter/lib/libflutter.so
10-22 12:49:33.773 1826-1826/? I/DEBUG: stack:
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b27c0  535a3ea0  /data/data/com.example.embedflutter/lib/libflutter.so
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b27c4  535a3d78  /data/data/com.example.embedflutter/lib/libflutter.so
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b27c8  509dc568  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b27cc  533c4607  /data/data/com.example.embedflutter/lib/libflutter.so
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b27d0  509dc5c0  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b27d4  535b2390  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b27d8  00000117  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b27dc  0000009b  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b27e0  00000000  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b27e4  00000000  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b27e8  00000117  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b27ec  4fe803d8  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b27f0  535b1088  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b27f4  4fe803e0  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b27f8  df0027ad  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b27fc  00000000  
10-22 12:49:33.778 1826-1826/? I/DEBUG:     #00  536b2800  00000000  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          ........  ........
10-22 12:49:33.778 1826-1826/? I/DEBUG:     #01  536b2800  00000000  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b2804  00000078  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b2808  00000000  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b280c  535b2390  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b2810  535a36cc  /data/data/com.example.embedflutter/lib/libflutter.so
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b2814  535a237c  /data/data/com.example.embedflutter/lib/libflutter.so
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b2818  535a36cc  /data/data/com.example.embedflutter/lib/libflutter.so
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b281c  520627d8  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b2820  536b2930  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b2824  522193a8  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b2828  51c8a008  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b282c  00000002  
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b2830  53cc3000  /data/data/com.example.embedflutter/lib/libapp.so
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b2834  53dcb7ab  /data/data/com.example.embedflutter/lib/libapp.so
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b2838  53dcb7ab  /data/data/com.example.embedflutter/lib/libapp.so
10-22 12:49:33.778 1826-1826/? I/DEBUG:          536b283c  51c8a008  
10-22 12:49:33.778 1826-1826/? I/DEBUG: memory near r0:
10-22 12:49:33.783 1826-1826/? I/DEBUG:     538b9fe0 00000000 00000000 00000000 00000000  ................
10-22 12:49:33.783 1826-1826/? I/DEBUG:     538b9ff0 00000000 00000000 00000000 00000000  ................
10-22 12:49:33.783 1826-1826/? I/DEBUG:     538ba000 00401530 00402000 00000000 00000000  0.@.. @.........
10-22 12:49:33.783 1826-1826/? I/DEBUG:     538ba010 00000000 00000000 00000000 00000000  ................
10-22 12:49:33.783 1826-1826/? I/DEBUG:     538ba020 00128818 80000428 00000000 00000000  ....(...........
10-22 12:49:33.783 1826-1826/? I/DEBUG: memory near r1:
10-22 12:49:33.783 1826-1826/? I/DEBUG:     00401fe0 ffffffff ffffffff ffffffff ffffffff  ................
10-22 12:49:33.783 1826-1826/? I/DEBUG:     00401ff0 ffffffff ffffffff ffffffff ffffffff  ................
10-22 12:49:33.783 1826-1826/? I/DEBUG:     00402000 ffffffff ffffffff ffffffff ffffffff  ................
10-22 12:49:33.783 1826-1826/? I/DEBUG:     00402010 ffffffff ffffffff ffffffff ffffffff  ................
10-22 12:49:33.783 1826-1826/? I/DEBUG:     00402020 ffffffff ffffffff ffffffff ffffffff  ................
10-22 12:49:33.783 1826-1826/? I/DEBUG: memory near r2:
10-22 12:49:33.783 1826-1826/? I/DEBUG:     53431720 44794806 4478447a 0300e9cd f7634668  .HyDzDxD....hFc.
10-22 12:49:33.783 1826-1826/? I/DEBUG:     53431730 46c0fa2f ffc277ae ffc350cb ffc3837e  /..F.w...P..~...
10-22 12:49:33.783 1826-1826/? I/DEBUG:     53431740 b082b570 482d4605 44784674 28006800  p....F-HtFxD.h.(
10-22 12:49:33.783 1826-1826/? I/DEBUG:     53431750 f079bf18 482aec56 f4f44478 6806ec8c  ..y.V.*HxD.....h
10-22 12:49:33.783 1826-1826/? I/DEBUG:     53431760 f8d6b3ae bbd802a4 b3386b30 42b06840  ........0k8.@h.B
10-22 12:49:33.783 1826-1826/? I/DEBUG: memory near r4:
10-22 12:49:33.783 1826-1826/? I/DEBUG:     535b1068 00000000 00000000 00000000 00000000  ................
10-22 12:49:33.783 1826-1826/? I/DEBUG:     535b1078 0000000e 0000001c 00000000 00000000  ................
10-22 12:49:33.783 1826-1826/? I/DEBUG:     535b1088 51a8f954 51a8f95c 51a8f964 51a8f96c  T..Q\..Qd..Ql..Q
10-22 12:49:33.783 1826-1826/? I/DEBUG:     535b1098 51a8f974 51a8f97c 51a8f984 51a8f98c  t..Q|..Q...Q...Q
10-22 12:49:33.783 1826-1826/? I/DEBUG:     535b10a8 51a8f994 51a8f99c 51a8f9a4 51a8f9ac  ...Q...Q...Q...Q
10-22 12:49:33.783 1826-1826/? I/DEBUG: memory near r5:
10-22 12:49:33.783 1826-1826/? I/DEBUG:     4fe803c0 535a6e44 54635e81 535a3ea8 000003a8  DnZS.^cT.>ZS....
10-22 12:49:33.783 1826-1826/? I/DEBUG:     4fe803d0 535a6ba4 51cc0021 535a4f14 521bc4b9  .kZS!..Q.OZS...R
10-22 12:49:33.783 1826-1826/? I/DEBUG:     4fe803e0 535a5634 51fc0021 535a6214 524794b9  4VZS!..Q.bZS..GR
10-22 12:49:33.783 1826-1826/? I/DEBUG:     4fe803f0 535a3ea8 538b7440 50b9f3b0 4f5210d2  .>ZS@t.S...P..RO
10-22 12:49:33.783 1826-1826/? I/DEBUG:     4fe80400 426e7a8d 408162c8 4f51e294 5f315943  .znB.b.@..QOCY1_
10-22 12:49:33.783 1826-1826/? I/DEBUG: memory near r6:
10-22 12:49:33.783 1826-1826/? I/DEBUG:     4fe803c8 535a3ea8 000003a8 535a6ba4 51cc0021  .>ZS.....kZS!..Q
10-22 12:49:33.783 1826-1826/? I/DEBUG:     4fe803d8 535a4f14 521bc4b9 535a5634 51fc0021  .OZS...R4VZS!..Q
10-22 12:49:33.788 1826-1826/? I/DEBUG:     4fe803e8 535a6214 524794b9 535a3ea8 538b7440  .bZS..GR.>ZS@t.S
10-22 12:49:33.788 1826-1826/? I/DEBUG:     4fe803f8 50b9f3b0 4f5210d2 426e7a8d 408162c8  ...P..RO.znB.b.@
10-22 12:49:33.788 1826-1826/? I/DEBUG:     4fe80408 4f51e294 5f315943 408162c8 4f51fd6a  ..QOCY1_.b.@j.QO
10-22 12:49:33.788 1826-1826/? I/DEBUG: memory near r7:
10-22 12:49:33.788 1826-1826/? I/DEBUG:     00006f28 ffffffff ffffffff ffffffff ffffffff  ................
10-22 12:49:33.788 1826-1826/? I/DEBUG:     00006f38 ffffffff ffffffff ffffffff ffffffff  ................
10-22 12:49:33.788 1826-1826/? I/DEBUG:     00006f48 ffffffff ffffffff ffffffff ffffffff  ................
10-22 12:49:33.788 1826-1826/? I/DEBUG:     00006f58 ffffffff ffffffff ffffffff ffffffff  ................
10-22 12:49:33.788 1826-1826/? I/DEBUG:     00006f68 ffffffff ffffffff ffffffff ffffffff  ................
10-22 12:49:33.788 1826-1826/? I/DEBUG: memory near r8:
10-22 12:49:33.788 1826-1826/? I/DEBUG:     53588a5c 00000000 00000000 00000000 00000000  ................
10-22 12:49:33.788 1826-1826/? I/DEBUG:     53588a6c 00000000 00000000 00000000 00000001  ................
10-22 12:49:33.788 1826-1826/? I/DEBUG:     53588a7c 53065691 5305dee3 53064f5c 53064e2a  .V.S...S\O.S*N.S
10-22 12:49:33.788 1826-1826/? I/DEBUG:     53588a8c 530610ac 5305e0d0 53053684 530583b8  ...S...S.6.S...S
10-22 12:49:33.788 1826-1826/? I/DEBUG:     53588a9c 53056017 53066e21 5306fd53 5306fd53  .`.S!n.SS..SS..S
10-22 12:49:33.788 1826-1826/? I/DEBUG: memory near r9:
10-22 12:49:33.788 1826-1826/? I/DEBUG:     536b2944 535aac44 520627d8 536b28f0 51c8a008  D.ZS.'.R.(kS...Q
10-22 12:49:33.788 1826-1826/? I/DEBUG:     536b2954 533d6a2d 535a237c 00000000 00000000  -j=S|#ZS........
10-22 12:49:33.788 1826-1826/? I/DEBUG:     536b2964 00000002 520627d8 53cc3000 001087ab  .....'.R.0.S....
10-22 12:49:33.788 1826-1826/? I/DEBUG:     536b2974 53dcb7c0 538ba000 00000000 00000000  ...S...S........
10-22 12:49:33.788 1826-1826/? I/DEBUG:     536b2984 536b2a5c 536b3094 ffffffff ffffffe2  \*kS.0kS........
10-22 12:49:33.788 1826-1826/? I/DEBUG: memory near sl:
10-22 12:49:33.788 1826-1826/? I/DEBUG:     535a3d58 5312976d 53129aa3 53128de7 533df871  m..S...S...Sq.=S
10-22 12:49:33.788 1826-1826/? I/DEBUG:     535a3d68 53128de7 53128de7 00000000 00000000  ...S...S........
10-22 12:49:33.788 1826-1826/? I/DEBUG:     535a3d78 53128de7 533d5a09 5312976d 5312976d  ...S.Z=Sm..Sm..S
10-22 12:49:33.788 1826-1826/? I/DEBUG:     535a3d88 5312976d 5312976d 5312976d 5312976d  m..Sm..Sm..Sm..S
10-22 12:49:33.788 1826-1826/? I/DEBUG:     535a3d98 5312976d 5312976d 5312976d 5312976d  m..Sm..Sm..Sm..S
10-22 12:49:33.788 1826-1826/? I/DEBUG: memory near fp:
10-22 12:49:33.788 1826-1826/? I/DEBUG:     4fe803d0 535a6ba4 51cc0021 535a4f14 521bc4b9  .kZS!..Q.OZS...R
10-22 12:49:33.788 1826-1826/? I/DEBUG:     4fe803e0 535a5634 51fc0021 535a6214 524794b9  4VZS!..Q.bZS..GR
10-22 12:49:33.788 1826-1826/? I/DEBUG:     4fe803f0 535a3ea8 538b7440 50b9f3b0 4f5210d2  .>ZS@t.S...P..RO
10-22 12:49:33.788 1826-1826/? I/DEBUG:     4fe80400 426e7a8d 408162c8 4f51e294 5f315943  .znB.b.@..QOCY1_
10-22 12:49:33.788 1826-1826/? I/DEBUG:     4fe80410 408162c8 4f51fd6a 1fe8b377 000003c9  .b.@j.QOw.......
10-22 12:49:33.788 1826-1826/? I/DEBUG: memory near ip:
10-22 12:49:33.793 1826-1826/? I/DEBUG:     535ae0bc 40096c59 400cd4d8 400ca138 4007f0a5  Yl.@...@8..@...@
10-22 12:49:33.793 1826-1826/? I/DEBUG:     535ae0cc 4007f1e5 4007d701 400770e5 400700f4  ...@...@.p.@...@
10-22 12:49:33.793 1826-1826/? I/DEBUG:     535ae0dc 400702d0 40070224 40073f89 40073f75  ...@$..@.?.@u?.@
10-22 12:49:33.793 1826-1826/? I/DEBUG:     535ae0ec 4006ac00 4006b19c 4006b4c8 4006f6c0  ...@...@...@...@
10-22 12:49:33.793 1826-1826/? I/DEBUG:     535ae0fc 4006f2c0 40070024 400703e8 40073f9d  ...@$..@...@.?.@
10-22 12:49:33.793 1826-1826/? I/DEBUG: memory near sp:
10-22 12:49:33.793 1826-1826/? I/DEBUG:     536b27e0 00000000 00000000 00000117 4fe803d8  ...............O
10-22 12:49:33.793 1826-1826/? I/DEBUG:     536b27f0 535b1088 4fe803e0 df0027ad 00000000  ..[S...O.'......
10-22 12:49:33.793 1826-1826/? I/DEBUG:     536b2800 00000000 00000078 00000000 535b2390  ....x........#[S
10-22 12:49:33.793 1826-1826/? I/DEBUG:     536b2810 535a36cc 535a237c 535a36cc 520627d8  .6ZS|#ZS.6ZS.'.R
10-22 12:49:33.793 1826-1826/? I/DEBUG:     536b2820 536b2930 522193a8 51c8a008 00000002  0)kS..!R...Q....
10-22 12:49:33.793 1826-1826/? I/DEBUG: code around pc:
10-22 12:49:33.793 1826-1826/? I/DEBUG:     533cb1b4 2004f8db f0004639 6868f8e7 f8d03701  ... 9F....hh.7..
10-22 12:49:33.793 1826-1826/? I/DEBUG:     533cb1c4 428f1003 f8d9dbb3 68410014 4a3bb111  ...B......Ah..;J
10-22 12:49:33.793 1826-1826/? I/DEBUG:     533cb1d4 5042447a 4478483a 98166e05 28009904  zDBP:HxD.n.....(
10-22 12:49:33.793 1826-1826/? I/DEBUG:     533cb1e4 bf189106 ff05f55d 99059807 28009106  ....]..........(
10-22 12:49:33.793 1826-1826/? I/DEBUG:     533cb1f4 9908bf1c f7ff6181 7908bbc0 bf040700  .....a.....y....
10-22 12:49:33.793 1826-1826/? I/DEBUG: code around lr:
10-22 12:49:33.793 1826-1826/? I/DEBUG:     533cb19c f8cb300f 68680004 1003f8d0 0081eb00  .0....hh........
10-22 12:49:33.793 1826-1826/? I/DEBUG:     533cb1ac 44382101 462871c1 2004f8db f0004639  .!8D.q(F... 9F..
10-22 12:49:33.793 1826-1826/? I/DEBUG:     533cb1bc 6868f8e7 f8d03701 428f1003 f8d9dbb3  ..hh.7.....B....
10-22 12:49:33.793 1826-1826/? I/DEBUG:     533cb1cc 68410014 4a3bb111 5042447a 4478483a  ..Ah..;JzDBP:HxD
10-22 12:49:33.793 1826-1826/? I/DEBUG:     533cb1dc 98166e05 28009904 bf189106 ff05f55d  .n.....(....]...
10-22 12:49:33.793 1826-1826/? I/DEBUG: memory map around fault addr 53cbc000:
10-22 12:49:33.793 1826-1826/? I/DEBUG:     538b9000-53cbc000 /data/data/com.example.embedflutter/lib/libapp.so
10-22 12:49:33.793 1826-1826/? I/DEBUG:     53cbc000-53ee4000 /data/data/com.example.embedflutter/lib/libapp.so
10-22 12:49:33.793 1826-1826/? I/DEBUG:     53ee4000-53ee5000 /data/data/com.example.embedflutter/lib/libapp.so

flutter doctor -v

[√] Flutter (Channel master, v1.10.15-pre.202, on Microsoft Windows [Version 10.0.18362.418], locale pl-PL)
    • Flutter version 1.10.15-pre.202 at c:\Users\BB\AppData\Local\Android\flutter
    • Framework revision 46ea99122b (7 hours ago), 2019-10-21 20:54:02 -0700
    • Engine revision 8882bf3c73
    • Dart version 2.6.0 (build 2.6.0-dev.8.0 a61c775db8)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\BB\AppData\Local\Android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = C:\Users\BB\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    • All Android licenses accepted.

[√] Android Studio (version 3.5)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 39.0.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] Connected device (1 available)
    • 001916c36af19e • 001916c36af19e • android-arm • Android 4.1.2 (API 16)

• No issues found!
@BondarenkoStas BondarenkoStas added a: existing-apps Integration with existing apps via the add-to-app flow platform-android Android applications specifically c: crash Stack traces logged to the console labels Oct 22, 2019
@jason-simmons
Copy link
Member

Bisected this to dart-lang/sdk@8c5236f

@sjindel-google

@jason-simmons
Copy link
Member

I can reproduce this by running any Flutter app in release mode on a Nexus 7 (2012) running Android 4.1.2

@sjindel-google
Copy link
Contributor

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.

@jason-simmons
Copy link
Member

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.

@sjindel-google
Copy link
Contributor

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.

@sjindel-google
Copy link
Contributor

sjindel-google commented Nov 1, 2019

The root cause is an issue in Android 4.1's "Bionic" dynamic linker:

https://github.com/aosp-mirror/platform_bionic/blob/94963af28e445384e19775a838a29e6a71708179/linker/linker.c#L1991-L2001

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.

dart-bot pushed a commit to dart-lang/sdk that referenced this issue Nov 7, 2019
… 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>
@bDev10
Copy link
Author

bDev10 commented Nov 12, 2019

Thank you! I confirm it is fixed on master channel :).

@github-actions
Copy link

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 flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: existing-apps Integration with existing apps via the add-to-app flow c: crash Stack traces logged to the console platform-android Android applications specifically
Projects
None yet
Development

No branches or pull requests

4 participants