TeamAmaze / TeamAmaze/AmazeFileManager
`NPE` on `HybridFile#getName`
Open
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
- User Action: UI Error
- Request: Application crash
- Version: 3.5.3
- OS: Linux Android 10 - 29
- Device: taimen
- Model: Pixel 2 XL
- Product: taimen
Crash log
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$4.done(AsyncTask.java:399)
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:919)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String androidx.documentfile.provider.DocumentFile.getName()' on a null object reference
at com.amaze.filemanager.filesystem.HybridFile.getName(HybridFile.java:336)
at com.amaze.filemanager.filesystem.Operations$1.doInBackground(Operations.java:122)
at com.amaze.filemanager.filesystem.Operations$1.doInBackground(Operations.java:115)
at android.os.AsyncTask$3.call(AsyncTask.java:378)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
... 3 more
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with HybridFile#getName in HybridFile.java at line 336 and trace its call from Operations$1.doInBackground in Operations.java at line 122. Use the supplied Android crash path as the reproduction context, and verify that the UI operation no longer crashes when the DocumentFile reference is null.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100