Skip to content

Conversation

@annagrin
Copy link
Contributor

@annagrin annagrin commented Jul 21, 2021

Issue

A race between the app hitting a breakpoint and a hot restart was causing hot restart to hang periodically.

The race sequence was as following:

  • app hits a breakpoint
  • dwds gets the isolate, its eventPaused shows "Resumed", so dwds removes the breakpoints but does
    not resume the isolate.
  • dwds issues hot restart command to the browser
  • now the breakpoint has finished processing and notification is sent to the "Debug" event stream.

As a result, the app is paused and hot restart hangs.

Solution

Pause the app (if it is not already paused) forcefully and wait for the either breakpoint or the pause event on
the debug stream before hot restarting to prevent this from happening.

Closes: #1359

Anna Gringauze added 2 commits July 21, 2021 11:19
A race between app hitting a breakpoint and a hot restart
was causing hot restart to hang.

Pause the app (if it is not already paused) forcefully
before hot restarting to prevent this from happening.

Closes: dart-lang#1359
@google-cla google-cla bot added the cla: yes label Jul 21, 2021
@annagrin annagrin requested a review from grouma July 21, 2021 18:28
@annagrin annagrin merged commit 16d098c into dart-lang:master Jul 21, 2021
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.

Hot restart hangs periodically in webdev and flutter CI

2 participants