Crash while scrolling through uploads
- Dominant language
- Kotlin
- Stars
- 5.6k
- Forks
- 2k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 92
Description
### ⚠️ Before posting ⚠️
- [x] This is a **bug**, not a question or an enhancement.
- [x] I've [searched for similar issues](https://github.com/nextcloud/android/issues) and didn't find a duplicate.
- [x] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
- [x] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).
### Steps to reproduce
I opened the uploads screen and saw the file status updating. I tried to scroll down a litte bit and it crashed.
### Cause of error
```java
Exception in thread "main" java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 56(offset:56).state:57 com.owncloud.android.ui.EmptyRecyclerView{d03eb32 VFED..... ......ID 0,0-1080,1936 #102000a android:id/list}, adapter:com.owncloud.android.ui.adapter.UploadListAdapter@883cf88, layout:androidx.recyclerview.widget.GridLayoutManager@7009083, context:com.owncloud.android.ui.activity.UploadListActivity@4b65345
at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6821)
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:22496)
at android.view.ViewGroup.layout(ViewGroup.java:6528)
at androidx.swiperefreshlayout.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:704)
at android.view.View.layout(View.java:22496)
at android.view.ViewGroup.layout(ViewGroup.java:6528)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:334)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:22496)
at android.view.ViewGroup.layout(ViewGroup.java:6528)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1103)
at android.view.View.layout(View.java:22496)
at android.view.ViewGroup.layout(ViewGroup.java:6528)
at androidx.drawerlayout.widget.DrawerLayout.onLayout(DrawerLayout.java:1263)
at android.view.View.layout(View.java:22496)
at android.view.ViewGroup.layout(ViewGroup.java:6528)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:334)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:22496)
at android.view.ViewGroup.layout(ViewGroup.java:6528)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:334)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:22496)
at android.view.ViewGroup.layout(ViewGroup.java:6528)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:334)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:22496)
at android.view.ViewGroup.layout(ViewGroup.java:6528)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1857)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1701)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1610)
at android.view.View.layout(View.java:22496)
at android.view.ViewGroup.layout(ViewGroup.java:6528)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:334)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at com.android.internal.policy.DecorView.onLayout(DecorView.java:1146)
at android.view.View.layout(View.java:22496)
at android.view.ViewGroup.layout(ViewGroup.java:6528)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3743)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3207)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2166)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8887)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1280)
at android.view.Choreographer.doCallbacks(Choreographer.java:1019)
at android.view.Choreographer.doFrame(Choreographer.java:911)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1248)
at android.os.Handler.handleCallback(Handler.java:900)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8668)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
```
### App information
* ID: `com.nextcloud.client`
* Version: `330000190`
* Build flavor: `generic`
### Device information
* Brand: `HUAWEI`
* Device: `HWSNE`
* Model: `SNE-LX1`
* Id: `HUAWEISNE-L21`
* Product: `SNE-LX1`
### Firmware
* SDK: `29`
* Release: `10`
* Incremental: `10.0.0.245C432`
### Expected behaviour
I can scroll down to the bottom of the page.
### Actual behaviour
The APP crashed while scrolling down un uploads screen.
### Android version
10
### Device brand and model
Huawei SNE-LX1
### Stock or custom OS?
Stock
### Nextcloud android app version
33.0.1
### Nextcloud server version
31.0.14
### Using a reverse proxy?
No
### Android logs
_No response_
### Server error logs
```bash
```
### Additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.