nextcloud / nextcloud/android

App crashing when selecting multiple identical photos in the media tab

Open
#15,732 2 comments 0 reactions 0 assignees View on GitHub
0. Needs triage bug feature: media tab performance: ISE/IAE :confused:
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

Open app in Android
Go to the media tab
Select one photo
Select the identical photo (its possible, that they are duplicated by auto upload)

### Expected behaviour

In the media tab، I wanted to choose multiple photos, which looks identical, could be duplicate uploads, to delete.
I expected the two photos to be selected .

### Actual behaviour

Every time i choose the second identical photo to delete, the app crashs.

### Android version

16

### Device brand and model

Google pixel 9 pro

### Stock or custom OS?

Stock

### Nextcloud android app version

30340090

### Nextcloud server version

31.0.8

### Using a reverse proxy?

No

### Android logs

### Cause of error
```java
Exception in thread "main" java.lang.IllegalStateException: Two different ViewHolders have the same stable ID. Stable IDs in your adapter MUST BE unique and SHOULD NOT change.
ViewHolder 1:GalleryRowHolder{b28da24 position=60 id=58925, oldPos=-1, pLpos:-1 not recyclable(1)}
View Holder 2:GalleryRowHolder{d89a1b5 position=59 id=58925, oldPos=-1, pLpos:-1} com.owncloud.android.ui.EmptyRecyclerView{f888b23 VFED..... ......ID 0,0-1280,2382 #7f0a02f3 app:id/list_root aid=1073742089}, adapter:com.owncloud.android.ui.adapter.GalleryAdapter@69f3a2b, layout:androidx.recyclerview.widget.GridLayoutManager@79a1820, context:com.owncloud.android.ui.activity.FileDisplayActivity@a697421
at androidx.recyclerview.widget.RecyclerView.handleMissingPreInfoForChangeError(RecyclerView.java:4778)
at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep3(RecyclerView.java:4702)
at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:4367)
at androidx.recyclerview.widget.RecyclerView.consumePendingUpdateOperations(RecyclerView.java:2095)
at androidx.recyclerview.widget.RecyclerView$1.run(RecyclerView.java:468)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1570)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1579)
at android.view.Choreographer.doCallbacks(Choreographer.java:1179)
at android.view.Choreographer.doFrame(Choreographer.java:1104)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1553)
at android.os.Handler.handleCallback(Handler.java:1041)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.dispatchMessage(Looper.java:315)
at android.os.Looper.loopOnce(Looper.java:251)
at android.os.Looper.loop(Looper.java:349)
at android.app.ActivityThread.main(ActivityThread.java:9041)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)

```

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

### Device information
* Brand: `google`
* Device: `caiman`
* Model: `Pixel 9 Pro`
* Id: `BP3A.250905.014`
* Product: `caiman`

### Firmware
* SDK: `36`
* Release: `16`
* Incremental: `13873947`

### Server error logs

```bash

```

### Additional information

_No response_

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.