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

Crash in weak reference iteration #9

Closed
KennyGoers opened this issue Mar 3, 2017 · 4 comments
Closed

Crash in weak reference iteration #9

KennyGoers opened this issue Mar 3, 2017 · 4 comments

Comments

@KennyGoers
Copy link

In the weak references to call backs, when iterating over the CopyOnWriteArrayList and the weak reference is pointing to a null, remove() is called on the iterator, which is not allowed and throws an illegal operation exception, which is buried and the item is never removed. Removal has to happen after iteration is complete.

@wustwg
Copy link

wustwg commented May 12, 2017

I have solve this problem.Please init listener with ArrayList instead of CopyOnWriteArrayList .

@steveliles steveliles mentioned this issue Jul 7, 2017
@steveliles
Copy link
Owner

thx guys, sorry i'm not very active on this project as not working with Android much these days.

will try to push out a fixed build soon.

@steveliles
Copy link
Owner

oops, didn't intend to close ..

@steveliles steveliles reopened this Jul 7, 2017
@steveliles
Copy link
Owner

I pushed a fix that continues to use CopyOnWriteArrayList for its thread safety.

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

3 participants