Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConcurrentModificationError in RunOnceViewManager._flushAll() #27

Closed
izaera opened this issue Jun 19, 2013 · 1 comment
Closed

ConcurrentModificationError in RunOnceViewManager._flushAll() #27

izaera opened this issue Jun 19, 2013 · 1 comment

Comments

@izaera
Copy link

izaera commented Jun 19, 2013

The method starts with code:

for (final View view in _views) {
if (_ignoreDetached && !view.inDocument) {
_views.remove(view); //ignore detached
continue;
}
...

So, when the if is triggered, a child is removed from _views and thus the for-each throws the error.

I will try to submit a pull request if I have time. I suggest just making a copy of the set before iterating (possible optimization: if _ignoreDetached==false and _ignoreSubviews==false no copy is needed).

@tomyeh
Copy link
Member

tomyeh commented Jun 21, 2013

Thanks for your reporting.
Fixed on 2da36b4

@tomyeh tomyeh closed this as completed Jun 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants