Skip to content

App crashes when sorting by newest when choosing files to upload #16192

@JonathanPJL

Description

@JonathanPJL

⚠️ 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. I press the + button and press upload files.
  2. I choose sort by newest first and it crashes.

Expected behaviour

I should be able to sort by newest first without the app crashing.

Actual behaviour

The app crashes when I try to sort by newest first. Some of the files are actually sorted already, but aren't appearing, so when I press newest first, it tries to fetch and load and sort, but immediately crashes.

Android version

16

Device brand and model

Samsung A36

Stock or custom OS?

Stock

Nextcloud android app version

30340190

Nextcloud server version

32.0.3

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:1156)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:651)
    at java.lang.Thread.run(Thread.java:1119)

App information

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

Device information

  • Brand: samsung
  • Device: a36xq
  • Model: SM-A366U1
  • Id: BP2A.250605.031.A3
  • Product: a36xque

Firmware

  • SDK: 36
  • Release: 16
  • Incremental: A366U1UES4BYK3

Server error logs

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions