Disable pause-on-exceptions for (outgoing) isolates during hot restart#93411
Merged
fluttergithubbot merged 4 commits intoflutter:masterfrom Nov 19, 2021
DanTup:fix-hot-restart-pause
Merged
Disable pause-on-exceptions for (outgoing) isolates during hot restart#93411fluttergithubbot merged 4 commits intoflutter:masterfrom DanTup:fix-hot-restart-pause
fluttergithubbot merged 4 commits intoflutter:masterfrom
DanTup:fix-hot-restart-pause
Conversation
Contributor
Author
|
The remaining test failures seem to be races, where if we terminate the app while startup code is running (which happens here because we hot restart, then immediately terminate and things are coming back), some errors occur because in-flight requests are aborted as the VM Service shuts down. I'll take a look tomorrow - I suspect the fix will be to ignore these types of error ("Service has disappeared") that if we know we're already shutting down. |
Contributor
Author
|
Tests all green now 👍 |
Contributor
Author
|
@christopherfujino not urgent, but in case you missed this :-) |
Contributor
Thanks, I did (miss this). |
Contributor
Author
|
Thanks! |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a (proper) fix for Dart-Code/Dart-Code#3448. The issue is that during a hot restart, all existing isolates must exit. There was existing code to resume them, and remove all breakpoints (so they don't get stuck), however they were still able to pause on exceptions if the user had enabled this.
This change removes the pause-on-exception behaviour in addition to the breakpoints. A previous fix for this was implemented in Dart-Code's DAP, but that was VS Code-specific, and VS Code will soon move to the Flutter SDK DAP so it needed either reproducing in the DAP or here (here makes more sense because it's the same issue as breakpoints, and the DAP base classes don't currently expose a way to set this only for specific isolates).
This is safe to do because editors need to set this flag per-isolate anyway, so when these isolates disappear and new ones are created, the editors will already re-send this setting.
Fixes Dart-Code/Dart-Code#3448.
Fixes Dart-Code/Dart-Code#3631.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.