TeamAmaze / TeamAmaze/AmazeFileManager

Crash on rename file in SD Card

Open
#2,142 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Exception

  • User Action: UI Error
  • Request: Application Crash
  • Version: 3.5.2
  • OS: Linux Android 9 - 28
  • Device: willow
  • Model: Redmi Note 8T
  • Product: willow_eea
Crash log


java.lang.NullPointerException: Attempt to invoke virtual method 'androidx.documentfile.provider.DocumentFile androidx.documentfile.provider.DocumentFile.findFile(java.lang.String)' on a null object reference
 at com.amaze.filemanager.filesystem.FileUtil.getDocumentFile(FileUtil.java:949)
 at com.amaze.filemanager.filesystem.files.FileUtils.scanFile(FileUtils.java:243)
 at com.amaze.filemanager.filesystem.files.FileUtils.lambda$scanFile$1(FileUtils.java:225)
 at com.amaze.filemanager.filesystem.files.-$$Lambda$FileUtils$nQFhhNVP8RswRigIhHzl4wuQz60.run(Unknown Source:4)
 at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
 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:764)

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 with FileUtil.java at line 949 and follow the call from FileUtils.java at lines 225 and 243. Reproduce renaming a file on an SD card under Android 9, then verify the operation completes without the reported NullPointerException.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, kotlin
Domain
mobile, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.