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

ConcurrentModificationException #198

Open
DenysAliekhanovInveritasoft opened this issue Oct 21, 2020 · 0 comments
Open

ConcurrentModificationException #198

DenysAliekhanovInveritasoft opened this issue Oct 21, 2020 · 0 comments

Comments

@DenysAliekhanovInveritasoft
Copy link

Hello! We're using your library in the project. The project is in production and sometimes we get a crash on the crashlytics.
Could You help us with this crash?

Exception: java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.next(ArrayList.java:860)
at com.yarolegovich.discretescrollview.DiscreteScrollView.a(DiscreteScrollView.java:20)
at com.yarolegovich.discretescrollview.DiscreteScrollView.c(DiscreteScrollView.java:2)
at com.yarolegovich.discretescrollview.DiscreteScrollView$d.b(DiscreteScrollView.java:5)
at com.yarolegovich.discretescrollview.DiscreteScrollLayoutManager.g(DiscreteScrollLayoutManager.java:10)
at androidx.recyclerview.widget.RecyclerView.dispatchOnScrollStateChanged(RecyclerView.java:2)
at androidx.recyclerview.widget.RecyclerView.setScrollState(RecyclerView.java:4)
at androidx.recyclerview.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:65)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
at android.view.Choreographer.doCallbacks(Choreographer.java:761)
at android.view.Choreographer.doFrame(Choreographer.java:693)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6912)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:860)

There are two collections which are not synchronized
private List scrollStateChangeListeners;
private List onItemChangedListeners;

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

1 participant