TeamAmaze / TeamAmaze/AmazeFileManager

`StaleDataException` on `CloudLoaderAsyncTask#doInBackground`

Open
#3,742 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

From-Email
Dominant language
Kotlin
Stars
6.4k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
1

Description

Issue explanation (write below this line)

Exception

  • App Name: Amaze File Manager
  • Package: com.amaze.filemanager
  • Version: 3.8.5
  • User Action: UI Error
  • Request: Application crash
  • OS: Linux Android 13 - 33
  • Device: t2q
  • Model: SM-G996U
  • Product: t2qsqw
Crash log

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 android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
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: android.database.StaleDataException: Attempted to access a
cursor after it has been closed.
at
android.database.BulkCursorToCursorAdaptor.throwIfCursorIsClosed(BulkCursorToCursorAdaptor.java:63)
at
android.database.BulkCursorToCursorAdaptor.getCount(BulkCursorToCursorAdaptor.java:69)
at android.database.CursorWrapper.getCount(CursorWrapper.java:64)
at
com.amaze.filemanager.asynchronous.asynctasks.CloudLoaderAsyncTask.doInBackground(CloudLoaderAsyncTask.java:73)
at
com.amaze.filemanager.asynchronous.asynctasks.CloudLoaderAsyncTask.doInBackground(CloudLoaderAsyncTask.java:51)
at android.os.AsyncTask$3.call(AsyncTask.java:394)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
... 4 more


It crashed

George A Wheeler

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting CloudLoaderAsyncTask.doInBackground at CloudLoaderAsyncTask.java:73, where the crash log shows a closed cursor is accessed. Trace the cursor lifecycle around that call and verify that the task no longer raises StaleDataException during the reported cloud-loading operation.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.