wasabeef / recyclerview-animators

An Android Animation library which easily add itemanimator to RecyclerView items.
Apache License 2.0
11.51k stars 1.98k forks source link

Animator Crashing #194

Open rtsketo opened 1 year ago

rtsketo commented 1 year ago

Bug Reporting

We recently started getting the crash below on some devices (200 / 7000). I can't even tell at which part of our code is it.

Steps to Reproduce

OS details

Stacktrace

Fatal Exception: java.lang.IllegalStateException: Cannot find wrapper for b{d3fe4d5 position=4 id=-1, oldPos=-1, pLpos:-1 invalid update undefined adapter position no parent}, seems like it is not bound by this adapter: androidx.recyclerview.widget.e@12c523f
       at androidx.recyclerview.widget.ConcatAdapterController.onViewRecycled(ConcatAdapterController.java:51)
       at androidx.recyclerview.widget.ConcatAdapter.onViewRecycled(ConcatAdapter.java:51)
       at androidx.recyclerview.widget.RecyclerView$Recycler.dispatchViewRecycled(RecyclerView.java:76)
       at androidx.recyclerview.widget.RecyclerView$Recycler.recycleViewHolderInternal(RecyclerView.java:202)
       at androidx.recyclerview.widget.RecyclerView.removeAnimatingView(RecyclerView.java:62)
       at androidx.recyclerview.widget.RecyclerView$ItemAnimatorRestoreListener.onAnimationFinished(RecyclerView.java:42)
       at androidx.recyclerview.widget.RecyclerView$ItemAnimator.dispatchAnimationFinished(RecyclerView.java:42)
       at androidx.recyclerview.widget.SimpleItemAnimator.dispatchAddFinished(SimpleItemAnimator.java:22)
       at jp.wasabeef.recyclerview.animators.BaseItemAnimator$DefaultAddAnimatorListener.onAnimationEnd(BaseItemAnimator.java:22)
       at android.view.ViewPropertyAnimator$AnimatorEventListener.onAnimationEnd(ViewPropertyAnimator.java:1116)
       at android.animation.Animator$AnimatorListener.onAnimationEnd(Animator.java:563)
       at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1250)
       at android.animation.ValueAnimator.doAnimationFrame(ValueAnimator.java:1505)
       at android.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:146)
       at android.animation.AnimationHandler.access$100(AnimationHandler.java:37)
       at android.animation.AnimationHandler$1.doFrame(AnimationHandler.java:54)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1221)
       at android.view.Choreographer.doCallbacks(Choreographer.java:1020)
       at android.view.ChoreographerExtImpl.checkScrollOptSceneEnable(ChoreographerExtImpl.java:319)
       at android.view.Choreographer.doFrame(Choreographer.java:909)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1208)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loopOnce(Looper.java:233)
       at android.os.Looper.loop(Looper.java:344)
       at android.app.ActivityThread.main(ActivityThread.java:8191)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034)