wordpress-mobile / WordPress-Android

WordPress for Android
http://android.wordpress.org
GNU General Public License v2.0
2.94k stars 1.31k forks source link

IndexOutOfBoundsException: Inconsistency detected. Invalid item position 5(offset:5).state:6 androidx.recyclerview.widget.Re... #20601

Open sentry-io[bot] opened 3 months ago

sentry-io[bot] commented 3 months ago

Sentry Issue: JETPACK-ANDROID-827

IndexOutOfBoundsException: Inconsistency detected. Invalid item position 5(offset:5).state:6 androidx.recyclerview.widget.RecyclerView{2f6ce52 VFED.V... ......ID 0,0-1080,1677 #7f0a0623 app:id/notifications_list}, adapter:org.wordpress.android.ui.notifications.adapters.NotesAdapter@19e131, layout:org.wordpress.android.ui.notifications.NotificationsListFragmentPage$LinearLayoutManagerWrapper@b5f0523, context:dagger.hilt.android.internal.managers.ViewComponentManager$FragmentContextWrapper@8324c43
    at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6752)
    at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6688)
    at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6684)
    at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2362)
    at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1662)
...
(79 additional frame(s) were not displayed)
dangermattic commented 3 months ago

Thanks for reporting! 👍

antonis commented 2 months ago

I'm reopening this since there was 1 occurrence in 24.7. Attaching the stack trace:

java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 3(offset:0).state:4 androidx.recyclerview.widget.RecyclerView{d5022e3 VFED.V... ......ID 0,112-720,1378 #7f0a0494 app:id/layoutsRecyclerView}, adapter:org.wordpress.android.ui.layoutpicker.LayoutCategoryAdapter@e1ae703, layout:androidx.recyclerview.widget.LinearLayoutManager@33233df, context:dagger.hilt.android.internal.managers.ViewComponentManager$FragmentContextWrapper@a51963e
    at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6752)
    at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6688)
    at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6684)
    at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2362)
    at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1662)
    at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1622)
    at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:687)
    at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep1(RecyclerView.java:4550)
    at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:4305)
    at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4873)
    at android.view.View.layout(View.java:22215)
    at android.view.ViewGroup.layout(ViewGroup.java:6340)
    at com.google.android.material.appbar.HeaderScrollingViewBehavior.layoutChild(HeaderScrollingViewBehavior.java:149)
    at com.google.android.material.appbar.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:43)
    at com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:2376)
    at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:953)
    at android.view.View.layout(View.java:22215)
    at android.view.ViewGroup.layout(ViewGroup.java:6340)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:364)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:302)
    at android.view.View.layout(View.java:22215)
    at android.view.ViewGroup.layout(ViewGroup.java:6340)
    at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1125)
    at android.view.View.layout(View.java:22215)
    at android.view.ViewGroup.layout(ViewGroup.java:6340)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:364)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:302)
    at android.view.View.layout(View.java:22215)
    at android.view.ViewGroup.layout(ViewGroup.java:6340)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:364)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:302)
    at android.view.View.layout(View.java:22215)
    at android.view.ViewGroup.layout(ViewGroup.java:6340)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:364)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:302)
    at android.view.View.layout(View.java:22215)
    at android.view.ViewGroup.layout(ViewGroup.java:6340)
    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
    at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
    at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
    at android.view.View.layout(View.java:22215)
    at android.view.ViewGroup.layout(ViewGroup.java:6340)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:364)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:302)
    at com.android.internal.policy.DecorView.onLayout(DecorView.java:912)
    at android.view.View.layout(View.java:22215)
    at android.view.ViewGroup.layout(ViewGroup.java:6340)
    at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3337)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2799)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1911)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7982)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1106)
    at android.view.Choreographer.doCallbacks(Choreographer.java:922)
    at android.view.Choreographer.doFrame(Choreographer.java:852)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1091)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:230)
    at android.app.ActivityThread.main(ActivityThread.java:7875)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:526)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034)