Repository navigation
Error while initializing the Dart VM #17387
Copy link
Copy link
Closed
Description
When I am running and installing debug version of my app, everything works fine. But when I want to install the release version of my app, it instantly crashes (don't even open) the app on my device.
My whole application is there https://github.com/tenhobi/flashcards/tree/master/flutter
Steps to Reproduce
flutter build apkflutter install- opening the app in the device
Logs
[√] Flutter (Channel master, v0.4.1-pre.27, on Microsoft Windows [Version 10.0.16299.371], locale cs-CZ)
• Flutter version 0.4.1-pre.27 at D:\git\flutter
• Framework revision 19ad6528e8 (5 days ago), 2018-05-03 07:43:04 +0100
• Engine revision 20b286dd42
• Dart version 2.0.0-dev.53.0.flutter-e6d7d67f4b
[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at C:\Users\the\AppData\Local\Android\sdk
• Android NDK at C:\Users\the\AppData\Local\Android\sdk\ndk-bundle
• Platform android-27, 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)
X Android license status unknown.
[√] Android Studio (version 3.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 24.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
[√] IntelliJ IDEA Ultimate Edition (version 2018.1)
• IntelliJ at C:\Users\the\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\181.4668.68
• Flutter plugin version 24.1.2
• Dart plugin version 181.4668.60
[√] VS Code, 64-bit edition (version 1.22.2)
• VS Code at C:\Program Files\Microsoft VS Code
• Dart Code extension version 2.12.1
[√] Connected devices (1 available)
• Redmi 5 Plus • 2b0850fe9805 • android-arm64 • Android 7.1.2 (API 25)
Google play console
Only informations about the issue I have is from Google play console, where no device passes:
For example some logs:
Mate 9 Android 7.0
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'HUAWEI/MHA-L29/HWMHA:7.0/HUAWEIMHA-L29/C567B138:user/release-keys'
Revision: '0'
ABI: 'arm'
pid: 12945, tid: 12945, name: tner.flashcards >>> cz.honzabittner.flashcards <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '[FATAL:flutter/runtime/dart_vm.cc(413)] Error while initializing the Dart VM: Snapshot not compatible with the current VM configuration: the snapshot requires 'product no-type_checks no-asserts no-error_on_bad_type no-error_on_bad_override arm-eabi hardfp' but the VM has 'product no-type_checks no-asserts no-error_on_bad_type no-error_on_bad_override arm-eabi softfp'
'
r0 00000000 r1 00003291 r2 00000006 r3 00000008
r4 ec10358c r5 00000006 r6 ec103534 r7 0000010c
r8 e1f0a300 r9 ffc99584 sl e93c3490 fp e93c3480
ip 00000002 sp ffc99408 lr e953ea37 pc e95412a0 cpsr 600f0010
backtrace:
#00 pc 0004a2a0 /system/lib/libc.so (tgkill+12)
#01 pc 00047a33 /system/lib/libc.so (pthread_kill+34)
#02 pc 0001d925 /system/lib/libc.so (raise+10)
#03 pc 00019471 /system/lib/libc.so (__libc_android_abort+34)
#04 pc 000170b4 /system/lib/libc.so (abort+4)
#05 pc 0014efab /data/app/cz.honzabittner.flashcards-1/lib/arm/libflutter.so
#06 pc 001fd9cd /data/app/cz.honzabittner.flashcards-1/lib/arm/libflutter.so
#07 pc 000754c1 /data/app/cz.honzabittner.flashcards-1/lib/arm/libflutter.so
#08 pc 000757f5 /data/app/cz.honzabittner.flashcards-1/lib/arm/libflutter.so
#09 pc 000757a3 /data/app/cz.honzabittner.flashcards-1/lib/arm/libflutter.so
#10 pc 00505efb /data/app/cz.honzabittner.flashcards-1/lib/arm/libflutter.so
#11 pc 00074ff3 /data/app/cz.honzabittner.flashcards-1/lib/arm/libflutter.so
#12 pc 00074f33 /data/app/cz.honzabittner.flashcards-1/lib/arm/libflutter.so
#13 pc 0007d0e5 /data/app/cz.honzabittner.flashcards-1/lib/arm/libflutter.so
#14 pc 0007c863 /data/app/cz.honzabittner.flashcards-1/lib/arm/libflutter.so
#15 pc 000802f3 /data/app/cz.honzabittner.flashcards-1/lib/arm/libflutter.so
#16 pc 0007cf79 /data/app/cz.honzabittner.flashcards-1/lib/arm/libflutter.so
#17 pc 0004dbab /data/app/cz.honzabittner.flashcards-1/lib/arm/libflutter.so
#18 pc 00053859 /data/app/cz.honzabittner.flashcards-1/lib/arm/libflutter.so
#19 pc 007868d9 /data/app/cz.honzabittner.flashcards-1/oat/arm/base.odex (offset 0x722000)
Pixel Android 8.0
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/sailfish/sailfish:8.0.0/OPR3.170623.008/4294783:user/release-keys'
Revision: '0'
ABI: 'arm'
pid: 8105, tid: 8105, name: tner.flashcards >>> cz.honzabittner.flashcards <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '[FATAL:flutter/runtime/dart_vm.cc(413)] Error while initializing the Dart VM: Snapshot not compatible with the current VM configuration: the snapshot requires 'product no-type_checks no-asserts no-error_on_bad_type no-error_on_bad_override arm-eabi hardfp' but the VM has 'product no-type_checks no-asserts no-error_on_bad_type no-error_on_bad_override arm-eabi softfp'
'
r0 00000000 r1 00001fa9 r2 00000006 r3 00000008
r4 00001fa9 r5 00001fa9 r6 ff7ec2c0 r7 0000010c
r8 e4afd480 r9 ff7ec404 sl f663e150 fp f663e140
ip 00000000 sp ff7ec2b0 lr f3ce5537 pc f3d15c0c cpsr 200f0010
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

Activity
mraleph commentedon May 9, 2018
/cc @cbracken can it be related to recent refactorings around builds? It seems that the engine binary for this configuration is built using HARDFP mode, while VM is asked to generated a SOFTFP snapshot.
Note: device identifies as
android-arm64but we end up running ARM32 code.NMateu commentedon May 9, 2018
I tried to release today version to Google Play, and builds with
flutter build apkdoesn't work on any devices. I generate release apk byflutter run --releasethis apk works on devices withandroid-arm64but not onandroid-armI also tried to install an app byflutter run --releaseon older devices and get an error:FATAL:flutter/runtime/dart_vm.cc(413)] Error while initializing the Dart VM: Snapshot not compatible with the current VM configuration: the snapshot requires 'product no-type_checks no-asserts no-error_on_bad_type no-error_on_bad_override ar m-eabi hardfp' but the VM has 'product no-type_checks no-asserts no-error_on_bad_type no-error_on_bad_override arm-eabi softfp'master and dev channels with the same result
cbracken commentedon May 9, 2018
@mraleph
I'll take a look at this today.
cbracken commentedon May 9, 2018
My money is on #17147.
Talked to @rmacnak-google and while the flag should no longer be necessary if we're using the
gen_snapshotfor the target platform in question, it looks like we're picking up the host platform binary.I'm going to revert that change for now, then look at patching the artifact lookup code to select the appropriate gen_snapshot for the target platform.
mraleph commentedon May 9, 2018
Indeed, you are probably right: I actually misread the error message. Snapshot is built with hardfp - while engine is of course softfp
cbracken commentedon May 10, 2018
This should now be fixed on
master; please shout if you're still seeing after updating to head on the master branch.I'd be interested to hear if anyone has seen this same issue on macOS or Linux hosts. All reports I've seen have been from Windows host machines.
tenhobi commentedon May 10, 2018
@cbracken I confirm it's working now.
cbracken commentedon May 10, 2018
@tenhobi Thank you for verifying!
cbracken commentedon May 10, 2018
@mraleph @rmacnak-google Looking closer at the
getArtifactPathimplementation, looks like we are selecting a target-platform specific gen_snapshot -- the fetch of the host architecture is becausegen_snapshotit in a host-architecture-based subdir (e.g.,bin/cache/artifacts/engine/targetplatform/host_platform/gen_snapshot). I misread.Are we setting the right default for this option for the
android-arm-{profile,release}gen_snapshots on Windows?cbracken commentedon May 10, 2018
After poking around a bit with @rmacnak-google and @aam on a Windows machine, looks like args.gn contains target_os="win" for android-arm profile (and almost certainly others). Taking a look at the build config.
cbracken commentedon May 10, 2018
Looks like we're setting
target_os="android"correctly, but then stomping on it a bit further down the config and overriding it to"win".Eliminating the code that sets
target_osleads to what looks like a day-long yak-shave of configuring the build so I've filed #17489 to fix.minhhung2556 commentedon Jul 27, 2018
Same issue here on MacOS.
Logs
`Flutter 0.5.8-pre.152 • channel master • https://github.com/flutter/flutter.git
Framework • revision 8b05629 (5 hours ago) • 2018-07-26 19:12:04 -0700
Engine • revision 6f7bdc9
Tools • Dart 2.0.0-dev.69.3.flutter-937ee2e8ca
Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v0.5.8-pre.152, on Mac OS X 10.13.5 17F77, locale en-VN)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.1)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.3.1)
[✓] Android Studio (version 3.1)
[✓] Connected devices (2 available)`
Error logs
07-27 14:08:35.003 468-3874/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only 07-27 14:08:35.125 30195-30195/? A/flutter: [FATAL:flutter/runtime/dart_vm.cc(422)] Error while initializing the Dart VM: Snapshot not compatible with the current VM configuration: the snapshot requires 'product no-type_checks no-asserts no-error_on_bad_type no-error_on_bad_override sync_async reify_generic_functions arm-eabi soft' but the VM has 'product no-type_checks no-asserts no-error_on_bad_type no-error_on_bad_override sync_async reify_generic_functions arm64' 07-27 14:08:35.286 30351-30195/? A/google-breakpad: Microdump skipped (uninteresting) 07-27 14:08:35.306 30195-30195/? A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 30195 (vn.senpay.test) 07-27 14:08:35.391 30352-30352/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** Build fingerprint: 'xiaomi/mido/mido:7.0/NRD90M/V9.6.1.0.NCFMIFD:user/release-keys' Revision: '0' ABI: 'arm64' 07-27 14:08:35.392 30352-30352/? A/DEBUG: pid: 30195, tid: 30195, name: vn.senpay.test >>> vn.senpay.test <<< signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr -------- 07-27 14:08:35.393 30352-30352/? A/DEBUG: Abort message: '[FATAL:flutter/runtime/dart_vm.cc(422)] Error while initializing the Dart VM: Snapshot not compatible with the current VM configuration: the snapshot requires 'product no-type_checks no-asserts no-error_on_bad_type no-error_on_bad_override sync_async reify_generic_functions arm-eabi soft' but the VM has 'product no-type_checks no-asserts no-error_on_bad_type no-error_on_bad_override sync_async reify_generic_functions arm64' ' 07-27 14:08:35.394 30352-30352/? A/DEBUG: x0 0000000000000000 x1 00000000000075f3 x2 0000000000000006 x3 0000000000000008 x4 0000000000000100 x5 8000000000000000 x6 0000007f9cb39000 x7 0000000000000000 x8 0000000000000083 x9 ffffffffffffffdf x10 0000000000000000 x11 0000000000000001 x12 ffffffffffffffff x13 0000000000000000 x14 0000000000000000 x15 000777d568818c32 x16 0000007f9bc7ded0 x17 0000007f9bc27510 x18 000000006f2b8648 x19 0000007f9cbedb48 x20 0000000000000006 x21 0000007f9cbedaa0 x22 0000000000000002 x23 0000007f4f5d4430 x24 0000007ff6c6fd80 x25 3510764aad20f7be x26 0000007ff6c71ca8 x27 3510764aad20f7be x28 0000000000000001 x29 0000007ff6c6fc30 x30 0000007f9bc249a0 sp 0000007ff6c6fc10 pc 0000007f9bc27518 pstate 0000000060000000 07-27 14:08:35.401 30352-30352/? A/DEBUG: backtrace: #00 pc 000000000006b518 /system/lib64/libc.so (tgkill+8) #01 pc 000000000006899c /system/lib64/libc.so (pthread_kill+64) #02 pc 0000000000023ee8 /system/lib64/libc.so (raise+24) #03 pc 000000000001c96c /system/lib64/libc.so (abort+52) #04 pc 0000000000316c14 /data/app/vn.senpay.test-1/lib/arm64/libflutter.so #05 pc 000000000031735c /data/app/vn.senpay.test-1/lib/arm64/libflutter.so #06 pc 00000000000ff92c /data/app/vn.senpay.test-1/lib/arm64/libflutter.so #07 pc 00000000000fffc8 /data/app/vn.senpay.test-1/lib/arm64/libflutter.so #08 pc 00000000000ffe90 /data/app/vn.senpay.test-1/lib/arm64/libflutter.so #09 pc 00000000006bf8e8 /data/app/vn.senpay.test-1/lib/arm64/libflutter.so #10 pc 00000000000ff168 /data/app/vn.senpay.test-1/lib/arm64/libflutter.so #11 pc 00000000000feff8 /data/app/vn.senpay.test-1/lib/arm64/libflutter.so #12 pc 000000000010bdd0 /data/app/vn.senpay.test-1/lib/arm64/libflutter.so #13 pc 00000000000bfecc /data/app/vn.senpay.test-1/lib/arm64/libflutter.so #14 pc 00000000000c8704 /data/app/vn.senpay.test-1/lib/arm64/libflutter.so 07-27 14:08:35.402 30352-30352/? A/DEBUG: #15 pc 000000000091d068 /data/app/vn.senpay.test-1/oat/arm64/base.odex (offset 0x86c000) 07-27 14:08:35.995 557-557/? E/lowmemorykiller: Error writing /proc/30195/oom_score_adj; errno=22 07-27 14:08:36.042 1710-3338/? E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ id=381, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ] 07-27 14:08:36.043 1710-3338/? E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ id=380, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ] 07-27 14:08:36.047 468-3874/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 onlyzoechi commentedon Jul 27, 2018
@jt100xu This issue is closed since a while.
Please create a new issue (with a link to this one).
WATER1350 commentedon Jun 27, 2019
I have the same problem, but it on iOS
github-actions commentedon Aug 29, 2021
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 -vand a minimal reproduction of the issue.