Skip to content

Crash while trying to order photos, to select which to upload #16013

Description

@miguelccoelho

⚠️ 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

While on a folder, try to upload a file from the camera. Select the folder, and try to sort by the earliest first.

Expected behaviour

Photos are sorted in order, and I'm able to select photos to upload

Actual behaviour

A crash happens when sorting

Android version

16, 6.1.155-android14-11-g740e0d504e97

Device brand and model

Google Pixel 8 pro

Stock or custom OS?

Custom (explain in "additional information")

Nextcloud android app version

30340190

Nextcloud server version

Develop-32.0.2rc2-ls153

Using a reverse proxy?

Yes

Android logs

Cause of error

Exception in thread "pool-22-thread-1" java.util.ConcurrentModificationException
    at java.util.ArrayList.sort(ArrayList.java:1823)
    at java.util.Collections.sort(Collections.java:207)
    at kotlin.collections.CollectionsKt__MutableCollectionsJVMKt.sortWith(MutableCollectionsJVM.kt:42)
    at com.owncloud.android.utils.FileSortOrderByDate.sortLocalFiles(FileSortOrderByDate.kt:51)
    at com.owncloud.android.ui.adapter.LocalFileListAdapter.lambda$setSortOrder$6(LocalFileListAdapter.java:392)
    at com.owncloud.android.ui.adapter.LocalFileListAdapter.$r8$lambda$WTDJyclhOx9wYl9P9c9Mv0A876o(Unknown Source:0)
    at com.owncloud.android.ui.adapter.LocalFileListAdapter$$ExternalSyntheticLambda3.run(D8$$SyntheticClass:0)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1154)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:652)
    at java.lang.Thread.run(Thread.java:1365)

App information

  • ID: com.nextcloud.client
  • Version: 30340190
  • Build flavor: generic

Device information

  • Brand: google
  • Device: husky
  • Model: Pixel 8 Pro
  • Id: BP3A.251105.015
  • Product: husky

Firmware

  • SDK: 36
  • Release: 16
  • Incremental: 2025112100

Server error logs

Additional information

I'm using GrapheneOS on a pixel 8 pro. I wasn't being able to upload a file through the gallery, so I tried using the app. When trying to organize the files, it crashed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions