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

Error while initializing the Dart VM: Snapshot not compatible with the current VM configuration (on x64 hosts) #246

Closed
diybl opened this issue Jan 16, 2022 · 6 comments · Fixed by sony/flutter-elinux#82
Labels
bug Something isn't working

Comments

@diybl
Copy link

diybl commented Jan 16, 2022

LD_LIBRARY_PATH=./flutter-embedded-linux/build/ ./flutter-embedded-linux/build/flutter-client -b ~/pj/sample/build/elinux/x64/release/bundle

when i run the flutter app

it shows the follow error

[FATAL:flutter/runtime/dart_vm_initializer.cc(22)] Error while initializing the Dart VM: Snapshot not compatible with the current VM configuration: the snapshot requires 'product no-code_comments no-dwarf_stack_traces_mode lazy_async_stacks no-lazy_dispatchers use_bare_instructions dedup_instructions no-asserts x64-sysv compressed-pointers null-safety' but the VM has 'product no-code_comments no-dwarf_stack_traces_mode lazy_async_stacks no-lazy_dispatchers use_bare_instructions dedup_instructions no-asserts x64-sysv no-compressed-pointers null-safety'
Aborted (core dumped)

@HidenoriMatsubayashi
Copy link
Contributor

Thank you for your report.

This is due to gen_snapshot. I guess you use the pre-build data in https://github.com/sony/flutter-embedded-linux/releases/tag/40a99c5951. If so, please use gen_snapshot that you built yourself.

See also: sony/flutter-elinux#70

@Taha-Firoz
Copy link

@HidenoriMatsubayashi can you explain the work around? Debug mode has terrible performance and testing with it for now is very difficult.

@HidenoriMatsubayashi
Copy link
Contributor

can you explain the work around?

Can you replace ${INSTALL_PATH}/flutter-elinux/flutter/bin/cache/artifacts/engine/android-arm64-*/linux-x64/gen_snapshot to your gen_snapshot that you built?
See also: sony/flutter-elinux#75

@psstoyanov
Copy link

psstoyanov commented Jan 21, 2022

Is it strange that I can observe the issue on my x64 desktop but not when compiling on my arm devices 🤔 (with the pre-built snapshots)

@HidenoriMatsubayashi
Copy link
Contributor

Is it strange that I can observe the issue on my x64 desktop but not when compiling on my arm devices

Yes, that's right. This problem will happen when you build on x64 hosts. When building on an arm64 host, gen_snapshot for Linux is used. See: https://github.com/sony/flutter-elinux/blob/main/lib/commands/build.dart#L70

@HidenoriMatsubayashi HidenoriMatsubayashi changed the title Error while initializing the Dart VM: Snapshot not compatible with the current VM configuration Error while initializing the Dart VM: Snapshot not compatible with the current VM configuration (on x64 hosts) Jan 24, 2022
@HidenoriMatsubayashi HidenoriMatsubayashi added the bug Something isn't working label Jan 24, 2022
@Taha-Firoz
Copy link

can you explain the work around?

Can you replace ${INSTALL_PATH}/flutter-elinux/flutter/bin/cache/artifacts/engine/android-arm64-*/linux-x64/gen_snapshot to your gen_snapshot that you built? See also: sony/flutter-elinux#75

I don't fully understand how to do this because I'm not really configuring a lot of stuff. All I do is provide an arm64 sysroot and I run build, how can I do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants