Skip to content

Conversation

@annagrin
Copy link
Contributor

@annagrin annagrin commented Aug 17, 2021

Multiple breakpoints restored at the isolate start can cause
the app to crash in chrome, serialize them using a mutex to
prevent the crash.

Hot restart tries to resume the exiting isolate, and checks if
it resumed before that, which causes various races or chrome
requiring to be in focus, depending on the way the check is done.
Remove the check and just catch the exception in case the isolate
is already running.

Closes: #1381
Closes: Dart-Code/Dart-Code#3518

@google-cla google-cla bot added the cla: yes label Aug 17, 2021
@annagrin annagrin requested a review from grouma August 17, 2021 19:16
@annagrin annagrin force-pushed the annagrin/breakpoint_hang branch from de4e24a to 78051a4 Compare August 18, 2021 17:16
Anna Gringauze added 6 commits August 19, 2021 08:55
Multiple breakpoints restored ad the isolate start can cause
the app to crash in chrome, serialize them using a mutex to
prevent the crash.

Hot restart runs main immediately, followed by createIsolate
that restores breakpoints, sometimes too late, causing non-
removable breakpoints and failures in the UI. Make the dwds
run main after createIsolate is done, to make sure breakpoints
are all set before the run.

Hot restart tries to resume the exiting isolate, and checks if
it resumed before that, which causes various races or chrome
requiring to be in focus, depending on the way the check is done.
Remove the check and just catch exception in case the isolate
is already running.
revert timeout on frontend_server_client tests, it is fixed in another PR.
@annagrin annagrin force-pushed the annagrin/breakpoint_hang branch from 036a9dd to 0ad0b99 Compare August 19, 2021 18:33
@annagrin
Copy link
Contributor Author

@grouma I removed not running main on hot restart, will have a separate fix for that.

@annagrin annagrin requested a review from natebosch August 19, 2021 23:02
Copy link
Contributor

@nshahan nshahan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing it's pretty difficult to create a test case that would lead to the "ahh snap" error? Otherwise, LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Debugger intermittently hangs on start with multiple breakpoints in source [Web] Starting debug with VSCode breaks after a while

4 participants