Repository navigation
Isolates in --debug mode do not work #5926
Copy link
Copy link
Closed
Labels
c: crashStack traces logged to the consoleStack traces logged to the console
Description
When trying to create an Isolate in --debug mode the Dart VM is unable to fetch the Dart source code for the new Isolate.
The error is thrown when tapping the Start button in the services/isolate.dart example.
This issue was previously reported as #5814 and was partially fixed to work in --release mode but is still failing in the default --debug mode (for different reasons since the earlier fix).
flutter/examples/layers$ flutter run -t services/isolate.dart
Building APK in debug mode (android-arm)...
Warning: signing the APK using the debug keystore.
Built build/app.apk (8.7MB).
Launching loader on Nexus 5X...
--------- beginning of main
Observatory listening on http://127.0.0.1:34521
Diagnostic server listening on http://127.0.0.1:41805
Updating assets... 0.2s
Syncing files to device...
Scanning project files... 0.1s
Scanning package files... 0.5s
Scanning asset files... 0.0s
Scanning for deleted files... 0.0s
No files to remove.
Updating files... 3.2s
Synced 5.7MB.
Connected to view '_flutterView/0xe272bb80'.
Running services/isolate.dart on Nexus 5X...
Application running.
Type "h" or F1 for this help message; type "q", F10, or ctrl-c to quit.
Type "r" or F5 to perform a hot reload of the app, and "R" to restart the app.
Type "w" to print the widget hierarchy of the app, and "t" for the render tree.
Finishing file synchronization...
Syncing files to device...
Scanning project files... 0.0s
Scanning package files... 0.3s
Scanning asset files... 0.0s
Scanning for deleted files... 0.0s
No files to remove.
Updating files...
E/flutter : [ERROR:../../flutter/assets/unzipper_provider.cc(16)] Unable to open zip file: /data/user/0/io.flutter.examples.Layers/cache/layerskphtff/services/isolate.dart
F/flutter : [FATAL:../../flutter/runtime/dart_init.cc(254)] Check failed: zip_asset_store->GetAsBuffer(kSnapshotAssetKey, &snapshot_data).
--------- beginning of crash
W/ActivityManager: Force finishing activity io.flutter.examples.Layers/org.domokit.sky.shell.SkyActivity
W/ActivityManager: Force finishing activity io.flutter.examples.Layers/org.domokit.sky.shell.SkyActivity
W/ActivityManager: Duplicate finish request for ActivityRecord{6531d4d u0 io.flutter.examples.Layers/org.domokit.sky.shell.SkyActivity t99 f}
Application finished.
Here is my flutter doctor output:
[✓] Flutter (on Linux, channel master)
• Flutter at /home/lex/projects/flutter
• Framework revision 2a81391915 (2 days ago), 2016-09-16 23:22:20
• Engine revision e4121f80a9
• Tools Dart version 1.20.0-dev.5.0
[✓] Android toolchain - develop for Android devices (Android SDK 19.1.0)
• Android SDK at /home/lex/projects/Android/Sdk
• Platform android-19, build-tools 19.1.0
• OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-3ubuntu1~16.04.1-b14)
[✓] Atom - a lightweight development environment for Flutter
• flutter plugin version 0.2.4
• dartlang plugin version 0.6.37
[✓] Connected devices
• Nexus 5X • 00dd4847616ed5cd • android-arm
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
c: crashStack traces logged to the consoleStack traces logged to the console
Activity
eseidelGoogle commentedon Sep 19, 2016
CC @johnmccutchan and @jason-simmons
johnmccutchan commentedon Sep 19, 2016
It looks like the isolate spawning code in the engine is written assuming we are running from a snapshot. I'll fix it so that it works when running from source or from a snapshot.
johnmccutchan commentedon Sep 19, 2016
I've got this fixed locally but noticed that the Flutter embedder doesn't let us know when an isolate exists with an error. I'm fixing that at the same time so that this will be easier to diagnose in the future.
eseidelGoogle commentedon Sep 19, 2016
We definitely have bugs with our isolates, likely causing #2182 and other issues. I'm hopeful that fixing #3443 will catch many of these. :)
Roll engine a76054f..76ec93d (3 commits)
Roll engine a76054f..3f46cd2 (4 commits)
Roll engine a76054f..391ac2f (5 commits)
Roll engine a76054f..3b66f20 (6 commits)
github-actions commentedon Sep 6, 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.