Skip to content

[CP] Fix ConcurrentModificationError in DDS #130739

@christopherfujino

Description

@christopherfujino

Issue Link

dart-lang/sdk#52932

Commit Hash

https://dart-review.googlesource.com/c/sdk/+/313782

Target

beta

PR Link

#130740

Changelog Description

Before iterating over debug client breakpoints, copy the URIs to a new list because the handling within the loop is asynchronous, so other code paths could mutate the hash map storing them (leading to a ConcurrentModificationError).

Impacted Users

Any Flutter developers doing debugging

Impact Description

If a user adds/removes a breakpoint while the debugger code is sending the list of breakpoints to an isolate, their flutter tool may crash with a ConcurrentModificationError, and they will lose their entire debugger session (they will have to add their breakpoints from scratch once the tool restarts.

Workaround

Only add/remove breakpoints before the app has started.

Risk

low

Test Coverage

yes

Validation Steps

No response

Metadata

Metadata

Assignees

Labels

cp: approvedApproved cherry-pick requestcp: merge-to-betaCherry-picks that should be merged to betacp: mergedCherry-pick has been merged to the release branch.cp: reviewCherry-picks in the review queue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions