TeamAmaze / TeamAmaze/AmazeFileManager

Crash when changing rapidly between items in drawer

Open
#1,453 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Go to "FTP Server"->"APKs"->"FTP Server"->"Internal Storage"->repeat
After 5 or 6 of drawer presses the app will crash.

10-01 10:55:23.063 com.amaze.filemanager E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
    Process: com.amaze.filemanager, PID: 3642
    java.lang.RuntimeException: An error occurred while executing doInBackground()
        at android.os.AsyncTask$3.done(AsyncTask.java:309)
        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
        at java.util.concurrent.FutureTask.run(FutureTask.java:242)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
        at java.lang.Thread.run(Thread.java:818)
     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'char[] java.lang.String.toCharArray()' on a null object reference
        at java.io.File.fixSlashes(File.java:183)
        at java.io.File.<init>(File.java:130)
        at com.amaze.filemanager.filesystem.RootHelper.getFiles(RootHelper.java:314)
        at com.amaze.filemanager.asynchronous.asynctasks.LoadFilesListTask.doInBackground(LoadFilesListTask.java:193)
        at com.amaze.filemanager.asynchronous.asynctasks.LoadFilesListTask.doInBackground(LoadFilesListTask.java:62)
        at android.os.AsyncTask$2.call(AsyncTask.java:295)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
        at java.lang.Thread.run(Thread.java:818) 

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

Reproduce the FTP Server → APKs → FTP Server → Internal Storage sequence and inspect RootHelper.getFiles at RootHelper.java:314, then follow the loading path in LoadFilesListTask.java:193. Use the reported AsyncTask stack trace to investigate the null path during rapid drawer changes; done means repeating the sequence no longer crashes.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.