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

Failure at runtime from version 2.8.0 onwards in release/profile mode #70

Closed
Charlie9830 opened this issue Dec 28, 2021 · 9 comments
Closed
Assignees

Comments

@Charlie9830
Copy link

Specs
Device: Rpi4
Build System: Yocto Dunfell
Note: I don't directly build the flutter-engine with Yocto myself, currently I build the flutter-elinux tools as native and use them to build my application within Yocto.
Runtime Mode: Wayland client with Cage as the compositor.

Problem
Since upgrading to version 2.8.0 and later. My application fails to start on device. Cage boots up successfully but then the flutter application itself seems to be immediately exiting. As far as I can tell it does not reach the main() function of the dart code. Reverting to 2.5.3 solves the issue.

Unfortunately, as of yet I haven't been able to extract an error message, it may be that cage is eating the error messages emitted from the app.

I am going to rebuild with Weston as the compositor and see if the same issue occurs.

@Charlie9830 Charlie9830 changed the title Failure at runtime from version 2.8.0 onwards. [Rpi4 Yocto Wayland Client] Failure at runtime from version 2.8.0 onwards. Dec 28, 2021
@Charlie9830
Copy link
Author

So rebuilding and using Weston as the compositor thankfully gives me an error message emitted from the embedder.

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

The key difference in the configurations listed above is the compressed-pointers property.

@HidenoriMatsubayashi
Copy link
Collaborator

@Charlie9830
(@kono0514)

Thank you for reporting the issue. I confirmed that it will occur in profile/release mode.

@HidenoriMatsubayashi HidenoriMatsubayashi changed the title [Rpi4 Yocto Wayland Client] Failure at runtime from version 2.8.0 onwards. Failure at runtime from version 2.8.0 onwards in release/profile mode Jan 5, 2022
@HidenoriMatsubayashi
Copy link
Collaborator

We've been using gen_snapshot of Android. However, some changes for Android only added in flutter 2.8.0 (flutter/engine#27975). Now, we need to prepare gen_snapshot for elinux.

@HidenoriMatsubayashi HidenoriMatsubayashi self-assigned this Jan 5, 2022
@Taha-Firoz
Copy link
Contributor

Just ran into the same issue when building for gbm, updated my flutter version to 2.8.1 and builds stopped running

@Taha-Firoz
Copy link
Contributor

Taha-Firoz commented Jan 5, 2022

The bug is present for both debug and release mode binaries
Bug isn't present on debug builds

@topolittle
Copy link

As a workaround, I tried to enable the compressed pointers feature in the flutter-engine but I get a segmentation fault error when I try to run it on the target.

@HidenoriMatsubayashi
Copy link
Collaborator

tried to enable the compressed pointers feature in the flutter-engine

Currently, it seems to be supported in Android only.

@Taha-Firoz
Copy link
Contributor

@HidenoriMatsubayashi any update on this? I don't understand the snapshot workaround

@HidenoriMatsubayashi
Copy link
Collaborator

I'm working on this. This issue will be fixed with next release version (2.10.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants