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

Crash on startup #22568

Closed
creativecreatorormaybenot opened this Issue Oct 2, 2018 · 38 comments

Comments

Projects
None yet
@creativecreatorormaybenot
Contributor

creativecreatorormaybenot commented Oct 2, 2018

Since my latest flutter upgrade, I am experiencing the following crash on Android on start up, which I cannot make sense of:

[ +114 ms] D/skia    (22259): Program linking failed.
[  +40 ms] E/emuglGLESv2_enc(22259): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glLinkProgram:1525 GL error 0x501
[   +6 ms] E/emuglGLESv2_enc(22259): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetProgramBinary:4058 GL error 0x502
[  +12 ms] F/libc    (22259): /buildbot/src/android/ndk-release-r17/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:73: abort_message: assertion "terminating with uncaught exception of type std::bad_alloc: std::bad_alloc" failed
[        ] F/libc    (22259): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 22284 (1.gpu), pid 22259 (com.example)
[  +54 ms] *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
[   +1 ms] Build fingerprint: 'google/sdk_gphone_x86/generic_x86:9/PSR1.180720.012/4923214:user/release-keys'
[   +1 ms] Revision: '0'
[        ] ABI: 'x86'
[        ] pid: 22259, tid: 22284, name: 1.gpu  >>> com.example <<<
[        ] signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
[        ] Abort message: '/buildbot/src/android/ndk-release-r17/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:73: abort_message: assertion "terminating with uncaught exception of type std::bad_alloc: std::bad_alloc" failed'
[        ]     eax 00000000  ebx 000056f3  ecx 0000570c  edx 00000006
[        ]     edi 000056f3  esi 00000000
[        ]     ebp cc2bf804  esp cc2bf798  eip ecb68b59
[        ] backtrace:
[        ]     #00 pc 00000b59  [vdso:ecb68000] (__kernel_vsyscall+9)
[        ]     #01 pc 0001fdf8  /system/lib/libc.so (syscall+40)
[        ]     #02 pc 00022ed3  /system/lib/libc.so (abort+115)
[        ]     #03 pc 00023388  /system/lib/libc.so (__assert2+56)
[   +1 ms]     #04 pc 0067fba4  /data/app/com.example-bGvekLbZ40S0ooRG3ziF4w==/lib/x86/libflutter.so (offset 0x616000)

# I cut out many lines here, which where nearly identical to the one above, but had a different number after "pc"

[        ]     #36 pc 00012a77  /system/lib/libutils.so (android::SimpleLooperCallback::handleEvent(int, int, void*)+39)
[        ]     #37 pc 00013896  /system/lib/libutils.so (android::Looper::pollInner(int)+998)
[   +2 ms]     #38 pc 0001340b  /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+43)
[        ]     #39 pc 0000e220  /system/lib/libandroid.so (ALooper_pollOnce+96)

# again

[        ]     #43 pc 0008f065  /system/lib/libc.so (__pthread_start(void*)+53)
[        ]     #44 pc 0002485b  /system/lib/libc.so (__start_thread+75)

Flutter Doctor

[√] Flutter (Channel master, v0.9.6-pre.52, on Microsoft Windows [Version 10.0], locale en-US)
    • Flutter version 0.9.6-pre.52 at flutterRoot
    • Framework revision d89604d85c (58 minutes ago), 2018-10-02 18:31:55 +0100
    • Engine revision f6af1f20ba
    • Dart version 2.1.0-dev.6.0.flutter-8a919426f0

[!] Android toolchain - develop for Android devices (Android SDK 28.0.2)
    • Android SDK at androidRoot
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.2
    • Java binary at: javaRoot
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    X Android license status unknown.

[√] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
@creativecreatorormaybenot

This comment has been minimized.

Contributor

creativecreatorormaybenot commented Oct 2, 2018

This might be related to Internal error in Firestore (0.6.6-dev)., which is very strange. I will conduct some more testing and only reopen this if I think that the Flutter team can do something about it.

@creativecreatorormaybenot

This comment has been minimized.

Contributor

creativecreatorormaybenot commented Oct 2, 2018

I feel like the upgrade of Flutter could be the only cause for this.

@SankaCoffee

This comment has been minimized.

SankaCoffee commented Oct 3, 2018

I'm having the same issue, but not consistent. I'm not using Firestore, so it can't be related to that.
The crash can appear with just a restart of the app, without changing code. Completely uninstalling the App from the device and performing flutter clean usually fixes the problem, until i have to completly rebuild the app (when Hot reload isn't sufficient).

@djwelch

This comment has been minimized.

djwelch commented Oct 6, 2018

Hi, I also had this error on a simple app created from flutter create. I am using the master channel. It flutter run'ed first time, but when I stopped flutter and did flutter run again I got the above error. It was fixed by running my emulator like emulator @Pixel_XL -gpu angle_indirect.

My setup is a bit odd because I code in hyperv on linux but the emulator is running on windows. Do you think that might be an issue? It used to work anyway. Might be related to opengl, since I think angle uses direct3d?

@jpgpuyo

This comment has been minimized.

jpgpuyo commented Oct 6, 2018

Hi, I have the same crash here (I have windows 10). I'm in the master branch. The workaround is close emulator, wipe emulator data and restart emulator. But if you reopen the app, crash appears another time.

@leedstyh

This comment has been minimized.

leedstyh commented Oct 10, 2018

Facing same issue here.

If I uninstall or clear storage to my app before flutter run, the app start and works fine, but still print some message in the console:

Launching lib\main.dart on Android SDK built for x86 in debug mode...
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
Built build\app\outputs\apk\debug\app-debug.apk.
E/EnhancedIntentService(25615): binding to the service failed
W/Firestore(25615): (0.6.6-dev) [Firestore]: The behavior for java.util.Date objects stored in Firestore is going to change AND YOUR APP MAY BREAK.
W/Firestore(25615): To hide this warning and ensure your app does not break, you need to add the following code to your app before calling any other Cloud Firestore methods:
W/Firestore(25615):
W/Firestore(25615): FirebaseFirestore firestore = FirebaseFirestore.getInstance();
W/Firestore(25615): FirebaseFirestoreSettings settings = new FirebaseFirestoreSettings.Builder()
W/Firestore(25615):     .setTimestampsInSnapshotsEnabled(true)
W/Firestore(25615):     .build();
W/Firestore(25615): firestore.setFirestoreSettings(settings);
W/Firestore(25615):
W/Firestore(25615): With this change, timestamps stored in Cloud Firestore will be read back as com.google.firebase.Timestamp objects instead of as system java.util.Date objects. So you will also need to update code expecting a java.util.Date to instead expect a Timestamp. For example:
W/Firestore(25615):
W/Firestore(25615): // Old:
W/Firestore(25615): java.util.Date date = snapshot.getDate("created_at");
W/Firestore(25615): // New:
W/Firestore(25615): Timestamp timestamp = snapshot.getTimestamp("created_at");
W/Firestore(25615): java.util.Date date = timestamp.toDate();
W/Firestore(25615):
W/Firestore(25615): Please audit all existing usages of java.util.Date when you enable the new behavior. In a future release, the behavior will be changed to the new behavior, so if you do not follow these steps, YOUR APP MAY BREAK.
I/.example.htyap(25615): The ClassLoaderContext is a special shared library.
I/chatty  (25615): uid=10101(com.example.htyapp) FirestoreWorker identical 2 lines
I/.example.htyap(25615): The ClassLoaderContext is a special shared library.
W/linker  (25615): Warning: "/system/priv-app/PrebuiltGmsCore/PrebuiltGmsCore.apk!/lib/x86/libconscrypt_gmscore_jni.so" unused DT entry: DT_RPATH (type 0xf arg 0x119) (ignoring)
V/NativeCrypto(25615): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 283 native methods...
W/.example.htyap(25615): Accessing hidden method Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String; (light greylist, reflection)
D/NetworkSecurityConfig(25615): No Network Security Config specified, using platform default
W/.example.htyap(25615): Accessing hidden field Ljavax/net/ssl/SSLSocketFactory;->defaultSocketFactory:Ljavax/net/ssl/SSLSocketFactory; (light greylist, reflection)
W/.example.htyap(25615): Accessing hidden field Ljavax/net/ssl/SSLServerSocketFactory;->defaultServerSocketFactory:Ljavax/net/ssl/SSLServerSocketFactory; (light greylist, reflection)
I/.example.htyap(25615): Background concurrent copying GC freed 28091(6MB) AllocSpace objects, 14(664KB) LOS objects, 49% free, 1943KB/3MB, paused 584us total 105.594ms
I/ProviderInstaller(25615): Installed default security provider GmsCore_OpenSSL
W/.example.htyap(25615): Accessing hidden field Ljava/nio/Buffer;->address:J (light greylist, reflection)
W/.example.htyap(25615): Accessing hidden field Ljava/net/Socket;->impl:Ljava/net/SocketImpl; (light greylist, reflection)
W/.example.htyap(25615): Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (light greylist, linking)
W/.example.htyap(25615): Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (light greylist, linking)
W/.example.htyap(25615): Accessing hidden method Ljava/net/InetAddress;->isNumeric(Ljava/lang/String;)Z (light greylist, reflection)
W/.example.htyap(25615): Accessing hidden field Ljava/io/FileDescriptor;->descriptor:I (light greylist, JNI)
W/.example.htyap(25615): Accessing hidden method Ljava/security/spec/ECParameterSpec;->setCurveName(Ljava/lang/String;)V (light greylist, reflection)
W/.example.htyap(25615): Accessing hidden method Ldalvik/system/BlockGuard;->getThreadPolicy()Ldalvik/system/BlockGuard$Policy; (light greylist, linking)
W/.example.htyap(25615): Accessing hidden method Ldalvik/system/BlockGuard$Policy;->onNetwork()V (light greylist, linking)
D/        (25615): HostConnection::get() New Host Connection established 0xe4420e40, tid 25643
D/EGL_emulation(25615): eglMakeCurrent: 0xe61acc60: ver 3 1 (tinfo 0xe44038c0)

If I flutter run without uninstall or clear storage previous installation, the app crash on start with message in the console:

Launching lib\main.dart on Android SDK built for x86 in debug mode...
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
Built build\app\outputs\apk\debug\app-debug.apk.
W/Firestore(25819): (0.6.6-dev) [Firestore]: The behavior for java.util.Date objects stored in Firestore is going to change AND YOUR APP MAY BREAK.
W/Firestore(25819): To hide this warning and ensure your app does not break, you need to add the following code to your app before calling any other Cloud Firestore methods:
W/Firestore(25819):
W/Firestore(25819): FirebaseFirestore firestore = FirebaseFirestore.getInstance();
W/Firestore(25819): FirebaseFirestoreSettings settings = new FirebaseFirestoreSettings.Builder()
W/Firestore(25819):     .setTimestampsInSnapshotsEnabled(true)
W/Firestore(25819):     .build();
W/Firestore(25819): firestore.setFirestoreSettings(settings);
W/Firestore(25819):
W/Firestore(25819): With this change, timestamps stored in Cloud Firestore will be read back as com.google.firebase.Timestamp objects instead of as system java.util.Date objects. So you will also need to update code expecting a java.util.Date to instead expect a Timestamp. For example:
W/Firestore(25819):
W/Firestore(25819): // Old:
W/Firestore(25819): java.util.Date date = snapshot.getDate("created_at");
W/Firestore(25819): // New:
W/Firestore(25819): Timestamp timestamp = snapshot.getTimestamp("created_at");
W/Firestore(25819): java.util.Date date = timestamp.toDate();
W/Firestore(25819):
W/Firestore(25819): Please audit all existing usages of java.util.Date when you enable the new behavior. In a future release, the behavior will be changed to the new behavior, so if you do not follow these steps, YOUR APP MAY BREAK.
I/.example.htyap(25819): The ClassLoaderContext is a special shared library.
I/chatty  (25819): uid=10101(com.example.htyapp) FirestoreWorker identical 1 line
I/.example.htyap(25819): The ClassLoaderContext is a special shared library.
I/.example.htyap(25819): The ClassLoaderContext is a special shared library.
W/linker  (25819): Warning: "/system/priv-app/PrebuiltGmsCore/PrebuiltGmsCore.apk!/lib/x86/libconscrypt_gmscore_jni.so" unused DT entry: DT_RPATH (type 0xf arg 0x119) (ignoring)
V/NativeCrypto(25819): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 283 native methods...
W/.example.htyap(25819): Accessing hidden method Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String; (light greylist, reflection)
D/NetworkSecurityConfig(25819): No Network Security Config specified, using platform default
W/.example.htyap(25819): Accessing hidden field Ljavax/net/ssl/SSLSocketFactory;->defaultSocketFactory:Ljavax/net/ssl/SSLSocketFactory; (light greylist, reflection)
W/.example.htyap(25819): Accessing hidden field Ljavax/net/ssl/SSLServerSocketFactory;->defaultServerSocketFactory:Ljavax/net/ssl/SSLServerSocketFactory; (light greylist, reflection)
I/ProviderInstaller(25819): Installed default security provider GmsCore_OpenSSL
W/.example.htyap(25819): Accessing hidden field Ljava/nio/Buffer;->address:J (light greylist, reflection)
W/.example.htyap(25819): Accessing hidden field Ljava/net/Socket;->impl:Ljava/net/SocketImpl; (light greylist, reflection)
W/.example.htyap(25819): Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (light greylist, linking)
W/.example.htyap(25819): Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (light greylist, linking)
W/.example.htyap(25819): Accessing hidden method Ljava/net/InetAddress;->isNumeric(Ljava/lang/String;)Z (light greylist, reflection)
W/.example.htyap(25819): Accessing hidden field Ljava/io/FileDescriptor;->descriptor:I (light greylist, JNI)
W/.example.htyap(25819): Accessing hidden method Ljava/security/spec/ECParameterSpec;->setCurveName(Ljava/lang/String;)V (light greylist, reflection)
W/.example.htyap(25819): Accessing hidden method Ldalvik/system/BlockGuard;->getThreadPolicy()Ldalvik/system/BlockGuard$Policy; (light greylist, linking)
W/.example.htyap(25819): Accessing hidden method Ldalvik/system/BlockGuard$Policy;->onNetwork()V (light greylist, linking)
D/        (25819): HostConnection::get() New Host Connection established 0xe2568cc0, tid 25845
D/EGL_emulation(25819): eglMakeCurrent: 0xe17d8d80: ver 3 1 (tinfo 0xe29e7b80)
D/skia    (25819): Program linking failed.
E/emuglGLESv2_enc(25819): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glLinkProgram:1525 GL error 0x501
E/emuglGLESv2_enc(25819): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetProgramBinary:4058 GL error 0x502
F/libc    (25819): /buildbot/src/android/ndk-release-r17/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:73: abort_message: assertion "terminating with uncaught exception of type std::bad_alloc: std::bad_alloc" failed
F/libc    (25819): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 25845 (1.gpu), pid 25819 (.example.htyapp)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/sdk_gphone_x86/generic_x86:9/PSR1.180720.012/4923214:userdebug/dev-keys'
Revision: '0'
ABI: 'x86'
pid: 25819, tid: 25845, name: 1.gpu  >>> com.example.htyapp <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '/buildbot/src/android/ndk-release-r17/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:73: abort_message: assertion "terminating with uncaught exception of type std::bad_alloc: std::bad_alloc" failed'
eax 00000000  ebx 000064db  ecx 000064f5  edx 00000006
edi 000064db  esi 00000000
ebp cdc9bb04  esp cdc9ba98  eip eed0db59
backtrace:
#00 pc 00000b59  [vdso:eed0d000] (__kernel_vsyscall+9)
#01 pc 0001fdf8  /system/lib/libc.so (syscall+40)
#02 pc 00022ed3  /system/lib/libc.so (abort+115)
#03 pc 00023388  /system/lib/libc.so (__assert2+56)
#04 pc 00681da4  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#05 pc 00682217  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#06 pc 00682019  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#07 pc 006818ce  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#08 pc 00681823  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#09 pc 00684f58  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#10 pc 00684f90  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#11 pc 00894e9c  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#12 pc 00890b66  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#13 pc 00891e65  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#14 pc 0080127c  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#15 pc 00803906  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#16 pc 00838ff9  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#17 pc 00811297  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#18 pc 00811129  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#19 pc 007fc3ab  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#20 pc 007fcb0c  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#21 pc 008a60d5  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#22 pc 008a5fe5  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#23 pc 0070debd  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#24 pc 006a42ce  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#25 pc 006eff9f  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#26 pc 006e645b  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#27 pc 006e68bc  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#28 pc 006e6c18  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#29 pc 006e6769  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#30 pc 006ea7b8  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#31 pc 006b008b  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#32 pc 006affd6  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#33 pc 006b2196  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#34 pc 00012a77  /system/lib/libutils.so (android::SimpleLooperCallback::handleEvent(int, int, void*)+39)
#35 pc 00013896  /system/lib/libutils.so (android::Looper::pollInner(int)+998)
#36 pc 0001340b  /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+43)
#37 pc 0000e220  /system/lib/libandroid.so (ALooper_pollOnce+96)
#38 pc 006b2299  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#39 pc 006ae766  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#40 pc 006b08f3  /data/app/com.example.htyapp-8AJFZ5PUXxMySHuBBKC2eQ==/lib/x86/libflutter.so (offset 0x618000)
#41 pc 0008f065  /system/lib/libc.so (__pthread_start(void*)+53)
#42 pc 0002485b  /system/lib/libc.so (__start_thread+75)
Lost connection to device.
Exited (sigterm)

And my packages.yaml is:

name: htyapp
description: A new Flutter project.

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter

  shared_preferences: ^0.4.3
  http: ^0.12.0
  google_sign_in: ^3.2.1
  firebase_auth: ^0.5.20
  path_provider: ^0.4.1
  timezone: ^0.5.0-dev-3
  zefyr: ^0.1.2
  ulid: ^1.0.1
  cloud_firestore: ^0.8.1

dev_dependencies:
  flutter_test:
    sdk: flutter

flutter:
  uses-material-design: true
  assets:
  - assets/2018c.tzf

And flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel dev, v0.10.0, on Microsoft Windows [Version 10.0.17134.2
86], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.1)
[√] Android Studio (version 3.2)
[√] Connected device (1 available)

• No issues found!

Not sure if these info helps!

@adriancmurray

This comment has been minimized.

adriancmurray commented Oct 15, 2018

@zoechi any updates on this. I too am seeing this issue. It's much more sever on android; it causes the app to crash and fail on Android, iOS seems to manage it fine though.

@jpgpuyo

This comment has been minimized.

jpgpuyo commented Oct 15, 2018

@adriancmurray For me, I only have the crash in the master branch. In beta branch, all is ok.

@adriancmurray

This comment has been minimized.

adriancmurray commented Oct 15, 2018

@jpgpuyo I'm on the most recent beta version and it's still an issue for me

@zoechi

This comment has been minimized.

Contributor

zoechi commented Oct 29, 2018

@leedstyh yours looks more like #23337.
Not sure it is the same issue.

@leedstyh

This comment has been minimized.

leedstyh commented Oct 31, 2018

@zoechi yeah looks same like that issue.

And also when I fall back to 0.9.4, no crash any more.

When I'm using 0.10.1, both debug and release (via flutter install) mode crash on emulator, while release mode (flutter build apk and copy .apk to my phone) works fine on real device.

@tomaszpolanski

This comment has been minimized.

tomaszpolanski commented Nov 7, 2018

Same here, today after updating from 0.9.4 to 0.10.2, I started to get that crash on an Android emulator

@minimalism

This comment has been minimized.

minimalism commented Nov 7, 2018

I was getting the std::bad_alloc crash on the beta branch, specifically these messages:

E/EnhancedIntentService( 4170): binding to the service failed
D/EGL_emulation( 4170): eglMakeCurrent: 0xd3a3fd80: ver 3 0 (tinfo 0xd3a6c9d0)
D/EGL_emulation( 4170): eglCreateContext: 0xd3a3f300: maj 3 min 0 rcv 3
D/EGL_emulation( 4170): eglMakeCurrent: 0xd3a3f300: ver 3 0 (tinfo 0xd3a4df60)
D/EGL_emulation( 4170): eglMakeCurrent: 0xd3a3fd80: ver 3 0 (tinfo 0xd3a6c9d0)
D/EGL_emulation( 4170): eglMakeCurrent: 0xd3a3f300: ver 3 0 (tinfo 0xe65037f0)
D/skia    ( 4170): Program linking failed.
E/emuglGLESv2_enc( 4170): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glLinkProgram:1525 GL error 0x501
E/emuglGLESv2_enc( 4170): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetProgramBinary:4058 GL error 0x502
F/libc    ( 4170): /buildbot/src/android/ndk-release-r17/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:73: abort_message: assertion "terminating with uncaught exception of type std::bad_alloc: std::bad_alloc" failed
F/libc    ( 4170): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 4215 (1.gpu), pid 4170 (po.tlycsflutter)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

running with the --enable-software-rendering fixed it for me. Running Win10 with a Intel UHD Graphics 620 card.

@pierrekhouryb

This comment has been minimized.

pierrekhouryb commented Nov 7, 2018

Same issue for me (windows 10). Switching to master fixed it a first time using the CLI, but the issue appeared again when I tried running from Android Studio.

Running with the --enable-software-rendering fixed it, both with CLI and Android Studio.

@zoechi

This comment has been minimized.

Contributor

zoechi commented Nov 8, 2018

@minimalism @pierrekhouryb what emulator are you using?
Can you please add the output of flutter doctor -v

@minimalism

This comment has been minimized.

minimalism commented Nov 8, 2018

@zoechi Nexus 5X API 28.
After looking around at similar errors on github, I wonder if maybe my issue was related to the vscode debugger, as opposed to some flutter/opengl driver issue. Starting with software rendering from the terminal solves the problem for me so I haven't investigated further.

Here's the output:
$ flutter doctor -v
[√] Flutter (Channel beta, v0.10.2, on Microsoft Windows [Version 10.0.16299.726], locale sv-SE)
    • Flutter version 0.10.2 at C:\Users\.\dev\flutter
    • Framework revision d8cbb80206 (13 days ago), 2018-10-26 01:30:21 -0400
    • Engine revision 6c2ade9fa2
    • Dart version 2.1.0-dev.8.0.flutter-bf26f760b1

[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at C:\Users\.\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[√] Android Studio (version 3.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 30.0.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[√] VS Code (version 1.28.2)
    • VS Code at C:\Users\.\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 2.20.0

[√] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)

• No issues found!
@pierrekhouryb

This comment has been minimized.

pierrekhouryb commented Nov 8, 2018

Using Nexus 5X API 23.

flutter doctor -v
[√] Flutter (Channel master, v0.10.3-pre.125, on Microsoft Windows [Version 10.0.17134.345], locale en-GB)
    • Flutter version 0.10.3-pre.125 at C:\Projects\flutter
    • Framework revision baf3cf5d3c (27 hours ago), 2018-11-07 03:46:19 -0500
    • Engine revision 824daacf6d
    • Dart version 2.1.0 (build 2.1.0-dev.8.0 bf26f760b1)

[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at C:\Users\pkb\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[√] Android Studio (version 3.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 30.0.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[√] VS Code (version 1.28.2)
    • VS Code at C:\Users\pkb\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 2.20.0

[√] VS Code, 64-bit edition (version 1.28.2)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 2.20.0

[√] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 6.0 (API 23) (emulator)

• No issues found!
@ArtificialPenguins

This comment has been minimized.

ArtificialPenguins commented Nov 8, 2018

@minimalism i'm replicating the error even within the command line. really strange, here's my flutter doctor output. i'm getting nearly the same error as OP.

PS C:\Users\iamth\Desktop\newinitiative\moves2> flutter doctor -v
[√] Flutter (Channel beta, v0.10.2, on Microsoft Windows [Version 10.0.17134.345], locale en-US)
    • Flutter version 0.10.2 at C:\Users\iamth\flutter
    • Framework revision d8cbb80206 (2 weeks ago), 2018-10-26 01:30:21 -0400
    • Engine revision 6c2ade9fa2
    • Dart version 2.1.0-dev.8.0.flutter-bf26f760b1

[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at C:\Users\iamth\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-P, build-tools 27.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
    • All Android licenses accepted.

[√] Android Studio (version 3.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 23.2.1
    • Dart plugin version 171.4424
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[√] IntelliJ IDEA Community Edition (version 2017.3)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.4
    • Flutter plugin version 22.2.2
    • Dart plugin version 173.4548.30

[√] VS Code, 64-bit edition (version 1.28.2)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 2.20.0

[√] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android P (API 27) (emulator)
@morphiak

This comment has been minimized.

morphiak commented Nov 10, 2018

same error here, both VSCode and Android Studio with freshly created project.
Not sure if relevant but seeing as opengl related I just upgraded nvidia drivers
Workaround in VSCode, add debug configuration, intellisense -> arg -> "--enable-software-rendering"

[√] Flutter (Channel beta, v0.10.2, on Microsoft Windows [Version
    10.0.17134.345], locale en-US)
    • Flutter version 0.10.2 at C:\Users\me\Dev\Flutter\flutter
    • Framework revision d8cbb80206 (2 weeks ago), 2018-10-26 01:30:21 -0400
    • Engine revision 6c2ade9fa2
    • Dart version 2.1.0-dev.8.0.flutter-bf26f760b1

[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at C:\\Users\\me\\Dev\\AndroidSDK
    • Android NDK location not configured (optional; useful for native
      profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = C:\Users\me\Dev\AndroidSDK
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[√] Android Studio (version 3.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 30.0.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build
      1.8.0_152-release-1136-b06)

[√] VS Code, 64-bit edition (version 1.28.2)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 2.20.0

[√] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.0.0
      (API 26) (emulator)

• No issues found!
@jitheshkt

This comment has been minimized.

jitheshkt commented Nov 10, 2018

I have the same issue after updating to 0.10.2 and --enable-software-rendering is a working walkaround.

@lordgreg

This comment has been minimized.

lordgreg commented Nov 10, 2018

Exactly the same issue. I've also added flag to VSCode launch.json:

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Flutter",
      "request": "launch",
      "type": "dart",
      "args": [
        "--enable-software-rendering"
      ]
    }
  ]
}

$ flutter doctor -v
[√] Flutter (Channel beta, v0.10.2, on Microsoft Windows [Version 10.0.17134.345], locale sl-SI)
    • Flutter version 0.10.2 at C:\Users\Gregor\flutter
    • Framework revision d8cbb80206 (2 weeks ago), 2018-10-26 01:30:21 -0400
    • Engine revision 6c2ade9fa2
    • Dart version 2.1.0-dev.8.0.flutter-bf26f760b1

[√] Android toolchain - develop for Android devices (Android SDK 28.0.1)
    • Android SDK at C:\Users\Gregor\AppData\Local\Android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.1
    • ANDROID_HOME = C:\Users\Gregor\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_152-release-1024-b02)
    • All Android licenses accepted.

[√] Android Studio (version 3.1)
    • Android Studio at C:\Program Files\Android\Android Studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)

[√] VS Code (version 1.28.2)
    • VS Code at C:\Users\Gregor\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 2.19.0

[√] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)

• No issues found!
@Dispersia

This comment has been minimized.

Dispersia commented Nov 10, 2018

Same issue, an easier fix for me was just uninstalling the app on the emulator fixed it. Uninstall, then just flutter run and everything works like expected.

@eyoeldefare

This comment has been minimized.

eyoeldefare commented Nov 10, 2018

Same issue after I upgraded to the latest Flutter doctor yesterday

@mikron123

This comment has been minimized.

mikron123 commented Nov 11, 2018

Same problem.

@zoenberger

This comment has been minimized.

zoenberger commented Nov 12, 2018

Did what @Dispersia said: uninstall app so it was no longer on emulator. Then when I ran again the issue did not occur. I was working on an app Friday, saw the upgrade notice, this morning and then updated.

I didn't seen the issue at first because I was building APK then transferring to a device that does not support USB debugging (thought it also already had app on it from Friday and I did NOT have to uninstall it from device. New APK files just updated existing app.). Once I tried to run on emulator I had issue.

EDIT: Yep, it crashes on emulator on every start after first install.

@bangindong

This comment has been minimized.

bangindong commented Nov 13, 2018

all is ok before i upgrade yesterday . this error i met before, but when i change to beta channel , all is ok. And now, in dev or master or beta channel, all is fail .

@jitheshkt

This comment has been minimized.

jitheshkt commented Nov 13, 2018

I can confirm that this issue is resolved as of v 0.11.3 (beta channel). No need of --enable-software-rendering when you do a flutter run

@mikron123

This comment has been minimized.

mikron123 commented Nov 13, 2018

@jitheshkt how do we upgrade the flutter SDK to the beta channel from Android Studio?

@Dispersia

This comment has been minimized.

Dispersia commented Nov 13, 2018

@jitheshkt even with 0.11.3, it fails when trying to reopen. It no longer fails on an upgraded run, but if you flutter run, hit the home button on emulator, then go back to app you still get the throw.

@Skquark

This comment has been minimized.

Skquark commented Nov 14, 2018

Having same problem for more than a week on both my projects, frustrating and inconsistent. Running on Dev channel, and would rather not switch to Beta or disable hardware rendering if possible. Want to note that it's not just at startup, but after I run in emulator (uninstalling app first) and running for a minute or so, it still crashes randomly with the bad_alloc exception. Hope there's an upgrade fix soon...

@jitheshkt

This comment has been minimized.

jitheshkt commented Nov 14, 2018

@jitheshkt how do we upgrade the flutter SDK to the beta channel from Android Studio?

I don't use Android studio. I use Visual Studio Code, yesterday the editor showed me a notification that flutter have an update and I did from the editor itself. Otherwise, I usually do by flutter upgrade.

@jitheshkt even with 0.11.3, it fails when trying to reopen. It no longer fails on an upgraded run, but if you flutter run, hit the home button on emulator, then go back to the app you still get the throw.

Haven't noticed it or in other words, I haven't worked enough to replicate the bug again. It could be there. If so, I guess --enable-software-rendering still a good fix?

@zoechi

This comment has been minimized.

Contributor

zoechi commented Nov 14, 2018

#22732 (comment) has a symbolized stack trace

@wiliambuzatto

This comment has been minimized.

wiliambuzatto commented Nov 15, 2018

Environment:

  • Windows 10
  • VScode
  • Android Emulator

Steps:

  1. Execute for the first time: flutter run -d emulator-5554
    -> Install on emultator and run nice

  2. Execute for the second time: flutter run -d emulator-5554
    -> crash with the above (Lost connection to device.)

If I uninstal app from emulator, I can execute successfully for the first time, but for next up, it crash again.

Resume:
If app is already installed = crash
If its first instaltion = ok

@mklim

This comment has been minimized.

Member

mklim commented Nov 15, 2018

Thanks for all the info everyone. This looks like the same root problem as #24058 to me. Just fixed in the engine, should roll out to the framework within the next day or so.

@mklim mklim closed this Nov 15, 2018

@Dispersia

This comment has been minimized.

Dispersia commented Nov 15, 2018

I just did a get on master to try it, and I no longer get the previous error, but I now get

D/skia (11834): Program linking failed.
E/emuglGLESv2_enc(11834): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glLinkProgram:1525 GL error 0x501
E/emuglGLESv2_enc(11834): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetProgramBinary:4058 GL error 0x502
E/emuglGLESv2_enc(11834): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glUseProgram:1771 GL error 0x501
E/emuglGLESv2_enc(11834): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glUseProgram:1771 GL error 0x501

Still can't restart the app after it's been launched.

@mklim

This comment has been minimized.

Member

mklim commented Nov 15, 2018

@Dispersia it's going to take some time still for the fix to roll from flutter/engine to flutter/flutter unfortunately. I'm expecting the fix to roll in within the next day. For now it probably makes the most sense to work around this problem by downgrading to the v0.9.4 release. You could try to use the fix on master now by building and using a local engine binary, but that's an extra amount of overhead to try and do here since the engine can't build Android binaries on Windows. I'd recommend downgrading for now and then picking up the fix when it rolls out.

@Schmerzmittel

This comment has been minimized.

Schmerzmittel commented Nov 15, 2018

Having the same issue. But just like #23337, I have to manually uninstall the app to get it working.

@Dispersia

This comment has been minimized.

Dispersia commented Nov 16, 2018

@mklim it was built and working now when pulling master and everything works great. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment