Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in thread "AsyncTask" on FileSortOrderByName #11049

Closed
4 tasks done
UteHaus opened this issue Nov 17, 2022 · 4 comments
Closed
4 tasks done

Exception in thread "AsyncTask" on FileSortOrderByName #11049

UteHaus opened this issue Nov 17, 2022 · 4 comments
Labels
bug performance: misc lag, ANR, etc and rarer exceptions/errors that don't have their own labels

Comments

@UteHaus
Copy link

UteHaus commented Nov 17, 2022

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

Swap down on the folder view, to update the list.
Or switch from settings to list view.

Expected behaviour

The app not break.

Actual behaviour

The app crashes when updating the list of files.

Android version

30220390

Device brand and model

pixle 4

Stock or custom OS?

Custom (explain in "additional information")

Nextcloud android app version

3.22.3

Nextcloud server version

25.0.1

Using a reverse proxy?

No

Android logs

Cause of error

Exception in thread "AsyncTask #20" java.lang.RuntimeException: An error occurred while executing doInBackground()
    at android.os.AsyncTask$4.done(AsyncTask.java:415)
    at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
    at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
    at java.util.concurrent.FutureTask.run(FutureTask.java:271)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:920)
Caused by: Exception in thread "AsyncTask #20" java.util.ConcurrentModificationException
    at java.util.ArrayList.sort(ArrayList.java:1472)
    at java.util.Collections.sort(Collections.java:206)
    at kotlin.collections.CollectionsKt__MutableCollectionsJVMKt.sortWith(MutableCollectionsJVM.kt:42)
    at com.owncloud.android.utils.FileSortOrderByName.sortServerFiles(FileSortOrderByName.kt:58)
    at com.owncloud.android.utils.FileSortOrderByName.sortCloudFiles(FileSortOrderByName.kt:43)
    at com.owncloud.android.ui.adapter.OCFileListAdapter.setData(OCFileListAdapter.java:694)
    at com.owncloud.android.ui.fragment.OCFileListSearchAsyncTask.doInBackground(OCFileListSearchAsyncTask.kt:70)
    at com.owncloud.android.ui.fragment.OCFileListSearchAsyncTask.doInBackground(OCFileListSearchAsyncTask.kt:33)
    at android.os.AsyncTask$3.call(AsyncTask.java:394)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:920)

App information

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

Device information

  • Brand: google
  • Device: sunfish
  • Model: Pixel 4a
  • Id: SQ3A.220705.004
  • Product: sunfish

Firmware

  • SDK: 32
  • Release: 12
  • Incremental: 8fda5a3502

Server error logs

No response

Additional information

No response

@UteHaus UteHaus added the bug label Nov 17, 2022
@debojyoti452
Copy link

@UteHaus
Is this task available?

@UteHaus
Copy link
Author

UteHaus commented Dec 13, 2022

This bug cam when I selected a folder in the favorites or go back to the favorites. (With this exception the App closed.)

The error came sporadically.

Nexctloud App version: 3.23.1

@Garfonso
Copy link

I get the same behavior. It seems to load the favorites just fine and the suddenly crashes.

This is the log the app shows me:

Cause of error

Exception in thread "AsyncTask #11" java.lang.RuntimeException: An error occurred while executing doInBackground()
    at android.os.AsyncTask$4.done(AsyncTask.java:415)
    at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:381)
    at java.util.concurrent.FutureTask.setException(FutureTask.java:250)
    at java.util.concurrent.FutureTask.run(FutureTask.java:269)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
    at java.lang.Thread.run(Thread.java:1012)
Caused by: Exception in thread "AsyncTask #11" java.util.ConcurrentModificationException
    at java.util.ArrayList.sort(ArrayList.java:1472)
    at java.util.Collections.sort(Collections.java:206)
    at kotlin.collections.CollectionsKt__MutableCollectionsJVMKt.sortWith(MutableCollectionsJVM.kt:42)
    at com.owncloud.android.utils.FileSortOrderByName.sortServerFiles(FileSortOrderByName.kt:58)
    at com.owncloud.android.utils.FileSortOrderByName.sortCloudFiles(FileSortOrderByName.kt:43)
    at com.owncloud.android.ui.adapter.OCFileListAdapter.setData(OCFileListAdapter.java:700)
    at com.owncloud.android.ui.fragment.OCFileListSearchAsyncTask.doInBackground(OCFileListSearchAsyncTask.kt:70)
    at com.owncloud.android.ui.fragment.OCFileListSearchAsyncTask.doInBackground(OCFileListSearchAsyncTask.kt:33)
    at android.os.AsyncTask$3.call(AsyncTask.java:394)
    at java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
    at java.lang.Thread.run(Thread.java:1012)

App information

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

Device information

  • Brand: samsung
  • Device: dm3q
  • Model: SM-S918B
  • Id: TP1A.220624.014
  • Product: dm3qxeea

Firmware

  • SDK: 33
  • Release: 13
  • Incremental: S918BXXS1AWBM

@joshtrichards joshtrichards added the performance: misc lag, ANR, etc and rarer exceptions/errors that don't have their own labels label Oct 11, 2023
@joshtrichards
Copy link
Member

This appears to match most of the traces in #7782, but reliable reproduction steps are hard to come by. Let's consolidate this matter there.

@joshtrichards joshtrichards closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug performance: misc lag, ANR, etc and rarer exceptions/errors that don't have their own labels
Projects
None yet
Development

No branches or pull requests

4 participants