Skip to content

Quickly deleting lots of failed uploads triggers an out of bounds exception #16595

@dniku

Description

@dniku

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

  1. Have lots of uploads failed in "Local file not found" state
  2. Quickly tap on the "recycle bin" button for those uploads

Below is the auto-generated error report.

Cause of error

Exception in thread "main" java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionItemViewHolder{f9f6c09 position=7 id=-1, oldPos=-1, pLpos:-1 scrap [attachedScrap] tmpDetached no parent} com.owncloud.android.ui.EmptyRecyclerView{1c1ee0e VFED..... ......I. 0,0-1440,2596 #102000a android:id/list}, adapter:com.owncloud.android.ui.adapter.UploadListAdapter@ca641dc, layout:androidx.recyclerview.widget.GridLayoutManager@2eed02f, context:com.owncloud.android.ui.activity.UploadListActivity@8a5eb50
    at androidx.recyclerview.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition(RecyclerView.java:6590)
    at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6796)
    at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6757)
    at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6753)
    at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2362)
    at androidx.recyclerview.widget.GridLayoutManager.layoutChunk(GridLayoutManager.java:584)
    at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1622)
    at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:687)
    at androidx.recyclerview.widget.GridLayoutManager.onLayoutChildren(GridLayoutManager.java:182)
    at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4645)
    at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:4348)
    at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4919)
    at android.view.View.layout(View.java:26738)
    at android.view.ViewGroup.layout(ViewGroup.java:6815)
    at androidx.swiperefreshlayout.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:704)
    at android.view.View.layout(View.java:26738)
    at android.view.ViewGroup.layout(ViewGroup.java:6815)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:345)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:283)
    at android.view.View.layout(View.java:26738)
    at android.view.ViewGroup.layout(ViewGroup.java:6815)
    at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1131)
    at android.view.View.layout(View.java:26738)
    at android.view.ViewGroup.layout(ViewGroup.java:6815)
    at androidx.drawerlayout.widget.DrawerLayout.onLayout(DrawerLayout.java:1263)
    at android.view.View.layout(View.java:26738)
    at android.view.ViewGroup.layout(ViewGroup.java:6815)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:345)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:283)
    at android.view.View.layout(View.java:26738)
    at android.view.ViewGroup.layout(ViewGroup.java:6815)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:345)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:283)
    at android.view.View.layout(View.java:26738)
    at android.view.ViewGroup.layout(ViewGroup.java:6815)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:345)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:283)
    at android.view.View.layout(View.java:26738)
    at android.view.ViewGroup.layout(ViewGroup.java:6815)
    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891)
    at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1729)
    at android.widget.LinearLayout.onLayout(LinearLayout.java:1638)
    at android.view.View.layout(View.java:26738)
    at android.view.ViewGroup.layout(ViewGroup.java:6815)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:345)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:283)
    at com.android.internal.policy.DecorView.onLayout(DecorView.java:1101)
    at android.view.View.layout(View.java:26738)
    at android.view.ViewGroup.layout(ViewGroup.java:6815)
    at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:5900)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:4977)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:3708)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:12542)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1751)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1760)
    at android.view.Choreographer.doCallbacks(Choreographer.java:1216)
    at android.view.Choreographer.doFrame(Choreographer.java:1142)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1707)
    at android.os.Handler.handleCallback(Handler.java:959)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loopOnce(Looper.java:257)
    at android.os.Looper.loop(Looper.java:342)
    at android.app.ActivityThread.main(ActivityThread.java:9634)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:619)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)

App information

  • ID: com.nextcloud.client
  • Version: 330000090
  • Build flavor: gplay

Device information

  • Brand: samsung
  • Device: b0q
  • Model: SM-S908E
  • Id: AP3A.240905.015.A2
  • Product: b0qxxx

Firmware

  • SDK: 35
  • Release: 15
  • Incremental: S908EXXSCFYI2

Expected behaviour

No crash

Actual behaviour

Crash

Android version

See above

Device brand and model

See above

Stock or custom OS?

Stock

Nextcloud android app version

See above

Nextcloud server version

irrelevant

Using a reverse proxy?

I don't know

Android logs

No response

Server error logs

Additional information

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions