Skip to content

Concurrent modification during iteration in HtmlViewEmbedder.disposeViews #143193

@jacobsimionato

Description

@jacobsimionato

See internal Google bug b/324482476

We're seeing an error like:

Error: Concurrent modification during iteration: Instance of 'JsLinkedHashMap<int, ViewClipChain>'.

  at new f (1898:58)
    at Object.wrapException
    at LinkedHashMapKeyIterator.moveNext$0
    at HtmlViewEmbedder.disposeViews$1 
    at HtmlViewEmbedder.dispose$0 
    at CanvasKitRenderer._onViewDisposed$1 
    at tear_off.<anonymous>
    at _RootZone.runUnaryGuarded$1$2
    at _RootZone.runUnaryGuarded$2
    at _BroadcastSubscription._sendData$1 
    at _BroadcastSubscription._async$_add$1 
    at _SyncBroadcastStreamController__sendData_closure.call$1 
    at _SyncBroadcastStreamController._forEachListener$1
    at _SyncBroadcastStreamController._sendData$1 
    at _SyncBroadcastStreamController.add$1

I'm wondering if the issue is:

  1. in dispose(), we call disposeViews(_viewClipChains.keys);
  2. in disposeViews, we call _viewClipChains.remove(viewId);

This would be from this commit: flutter/engine@70039d3

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: platform-viewsEmbedding Android/iOS views in Flutter appsplatform-webWeb applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions