AmazeFileManager icon indicating copy to clipboard operation
AmazeFileManager copied to clipboard

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

Open amaze-issue-automation[bot] opened this issue 1 year ago • 7 comments

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)


Hello,

I tried multiple times trying to reproduce this issue, without success. Can you please upload the video that demonstrates how the issue is been reproduced. I have the solution to this issue, but, first need to clear the test case.

Thanks.

professional-lalit avatar Jan 23 '24 06:01 professional-lalit

FWIW, same as #3844. @professional-lalit this is from a version that is not rolled yet, are you building it from the source?

VishnuSanal avatar Jan 24 '24 17:01 VishnuSanal

Yes, my bad, It was built from the source.

professional-lalit avatar Jan 26 '24 13:01 professional-lalit

@professional-lalit Not that it was bad, I was just clarifying! Go ahead with a Pr if you're interested in working on this.

PS: please wait until @seelchen please veries that this haven't already fixed this one of their PRs. :)

VishnuSanal avatar Jan 26 '24 13:01 VishnuSanal

I don't think any of my PRs fixed this, but I also cannot reproduce the issue.

seelchen avatar Jan 26 '24 15:01 seelchen

@VishnuSanal @seelchen I was able to reproduce the issue on 3.9, but, it is not reproducible on 4.0. I can also the see difference in branch where the bug fix is expected to be. From my analysis, the issue is fixed in 4.0

professional-lalit avatar Jan 26 '24 17:01 professional-lalit

@VishnuSanal @seelchen I was able to reproduce the issue on 3.9, but, it is not reproducible on 4.0. I can also the see difference in branch where the bug fix is expected to be. From my analysis, the issue is fixed in 4.0

can you please try from the branch release/3.10 too & report back? that'll be our very next release, before v4.0.

VishnuSanal avatar Jan 27 '24 06:01 VishnuSanal