nextcloud / nextcloud/android

`IndexOutOfBoundsException: Inconsistency detected.` in `GalleryAdapter`

Open
#14,165 0 comments 0 reactions 0 assignees View on GitHub
0. Needs triage performance: misc stable-3.29
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 18h
Merged PRs (30d)
92

Description

### Cause of error
```java
Exception in thread "main" java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionGalleryRowHolder{e41e43e position=7 id=-1, oldPos=-1, pLpos:-1 no parent} com.owncloud.android.ui.EmptyRecyclerView{674064a VFED..... ........ 0,0-1440,2820 #7f0a02e8 app:id/list_root}, adapter:com.owncloud.android.ui.adapter.GalleryAdapter@b8dd1d2, layout:androidx.recyclerview.widget.GridLayoutManager@8d69bb, context:com.owncloud.android.ui.activity.FileDisplayActivity@586cc47
at androidx.recyclerview.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition(RecyclerView.java:6590)
at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6796)
at androidx.recyclerview.widget.GapWorker.prefetchPositionWithDeadline(GapWorker.java:288)
at androidx.recyclerview.widget.GapWorker.flushTaskWithDeadline(GapWorker.java:345)
at androidx.recyclerview.widget.GapWorker.flushTasksWithDeadline(GapWorker.java:361)
at androidx.recyclerview.widget.GapWorker.prefetch(GapWorker.java:368)
at androidx.recyclerview.widget.GapWorker.run(GapWorker.java:399)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:9063)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:588)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)

```

### App information
* ID: `com.nextcloud.client`
* Version: `30290290`
* Build flavor: `gplay`

### Device information
* Brand: `samsung`
* Device: `dm3q`
* Model: `SM-S918N`
* Id: `UP1A.231005.007`
* Product: `dm3qksx`

### Firmware
* SDK: `34`
* Release: `14`
* Incremental: `S918NKSU5CXK4`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.