TeamAmaze / TeamAmaze/AmazeFileManager

`IndexOutOfBoundsException`: Inconsistency detected. Invalid view holder adapter `positionViewHolder`

Open
#4,054 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

From-Email Issue-Bug not-yet-rolled
Dominant language
Kotlin
Stars
6.4k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
1

Description

Issue explanation (write below this line)

Hello, I try to find a file repeated times and this exception came up.

Exception

  • App Name: Panel de navegación de ejemplo
  • Package: com.amaze.filemanager
  • Version: 3.9
  • User Action: UI Error
  • Request: Application crash
  • OS: Linux
    motorola/astro_retail/astro:11/RPL31.Q2-63-10-2/50a5c:user/release-keys 11
  • 30
  • Device: astro
  • Model: motorola one fusion
  • Product: astro_retail
Crash log

java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view
holder adapter positionViewHolder{1c449dc position=1 id=-1, oldPos=0,
pLpos:0 scrap [attachedScrap] tmpDetached not recyclable(1) no parent}
androidx.recyclerview.widget.RecyclerView{b47e7c1 VFED..... ......ID
0,409-684,543 #7f090289 app:id/searchRecyclerView},
adapter:com.amaze.filemanager.adapters.SearchRecyclerViewAdapter@5fa28a,
layout:androidx.recyclerview.widget.LinearLayoutManager@cfa70fb,
context:com.amaze.filemanager.ui.activities.MainActivity@976c78
at
androidx.recyclerview.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition(RecyclerView.java:5974)
at
androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6158)
at
androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6118)
at
androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6114)
at
androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2303)
at
androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1627)
at
androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1587)
at
androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:665)
at
androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep1(RecyclerView.java:4085)
at
androidx.recyclerview.widget.RecyclerView.onMeasure(RecyclerView.java:3534)
at android.view.View.measure(View.java:25532)
at
androidx.constraintlayout.widget.ConstraintLayout$Measurer.measure(ConstraintLayout.java:763)
at
androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure.measure(BasicMeasure.java:426)
at
androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure.measureChildren(BasicMeasure.java:105)
at
androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure.solverMeasure(BasicMeasure.java:247)
at
androidx.constraintlayout.solver.widgets.ConstraintWidgetContainer.measure(ConstraintWidgetContainer.java:117)
at
androidx.constraintlayout.widget.ConstraintLayout.resolveSystem(ConstraintLayout.java:1532)
at
androidx.constraintlayout.widget.ConstraintLayout.onMeasure(ConstraintLayout.java:1607)
at android.view.View.measure(View.java:25532)
at
androidx.core.widget.NestedScrollView.measureChildWithMargins(NestedScrollView.java:1792)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at
androidx.core.widget.NestedScrollView.onMeasure(NestedScrollView.java:627)
at android.view.View.measure(View.java:25532)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6957)
at
androidx.coordinatorlayout.widget.CoordinatorLayout.onMeasureChild(CoordinatorLayout.java:760)
at
androidx.coordinatorlayout.widget.CoordinatorLayout.onMeasure(CoordinatorLayout.java:833)
at android.view.View.measure(View.java:25532)
at
androidx.drawerlayout.widget.DrawerLayout.onMeasure(DrawerLayout.java:1156)
at android.view.View.measure(View.java:25532)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6957)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at
androidx.appcompat.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:145)
at android.view.View.measure(View.java:25532)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6957)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.view.View.measure(View.java:25532)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6957)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.view.View.measure(View.java:25532)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6957)
at
android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1552)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:842)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
at android.view.View.measure(View.java:25532)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6957)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at com.android.internal.policy.DecorView.onMeasure(DecorView.java:789)
at android.view.View.measure(View.java:25532)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:3548)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:2387)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2650)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2062)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8424)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972)
at android.view.Choreographer.doCallbacks(Choreographer.java:796)
at android.view.Choreographer.doFrame(Choreographer.java:731)
at
android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:250)
at android.app.ActivityThread.main(ActivityThread.java:7848)
at java.lang.reflect.Method.invoke(Native Method)
at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958)


Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with SearchRecyclerViewAdapter and the searchRecyclerView referenced in the crash, then trace how repeated searches update the displayed results. Reproduce the repeated-search action on Android and verify that the IndexOutOfBoundsException no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.