You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for a similar issue in the project and found none
Issue Info
Info
Value
Device Info
Xiaomi Redmi Note9, Samsung Galaxy A7, etc..
System Version
8.0-14.0
APNG4Android Library Version
2.28.0
Repro rate
sometimes
Repro with our demo project
-
Demo project link
-
Issue Description and Steps
We get the following exception in our project from time to time. It seems to happen when stop and unregisterAnimationCallback are called close to one another.
I can try to write a demo project which reproduces the exception if necessary.
Fatal Exception: java.util.ConcurrentModificationException:
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1441)
at java.util.HashMap$KeyIterator.next(HashMap.java:1465)
at java.util.AbstractCollection.finishToArray(AbstractCollection.java:232)
at java.util.AbstractCollection.toArray(AbstractCollection.java:143)
at java.util.ArrayList.<init>(ArrayList.java:191)
at com.github.penfeizhou.animation.FrameAnimationDrawable$1.handleMessage(FrameAnimationDrawable.java:60)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7366)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:932)
The text was updated successfully, but these errors were encountered:
New Issue Checklist
Issue Info
Issue Description and Steps
We get the following exception in our project from time to time. It seems to happen when
stop
andunregisterAnimationCallback
are called close to one another.My guess is that https://github.com/penfeizhou/APNG4Android/blob/master/frameanimation/src/main/java/com/github/penfeizhou/animation/FrameAnimationDrawable.java#L60 is still not safe since copying over a set to an array most likely involves an iteration. Which can cause an exception if the set is modified at the same time.
I can try to write a demo project which reproduces the exception if necessary.
The text was updated successfully, but these errors were encountered: