TeamAmaze / TeamAmaze/AmazeFileManager

NPE on `HybridFile#getTotal`

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

Nobody has claimed this yet.

Area-Cloud Crash-NullPointerException From-telegram Issue-Bug
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.2
  • User Action: UI Error
  • Request: Application crash
  • OS: Linux samsung/q4quew/q4q:12/SP2A.220305.013/F936U1UEU1AVIG:user/release-keys 12 - 32
  • Device: q4q
  • Model: SM-F936U1
  • Product: q4quew
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 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: java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference
at com.amaze.filemanager.filesystem.HybridFile.getTotal(HybridFile.java:860)
at com.amaze.filemanager.filesystem.files.FileUtils.getSpaces(FileUtils.java:618)
at com.amaze.filemanager.asynchronous.asynctasks.LoadFolderSpaceDataTask.doInBackground(LoadFolderSpaceDataTask.java:85)
at com.amaze.filemanager.asynchronous.asynctasks.LoadFolderSpaceDataTask.doInBackground(LoadFolderSpaceDataTask.java:53)
at android.os.AsyncTask$3.call(AsyncTask.java:394)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
... 3 more


Reporter: ShapeShifter499

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 at HybridFile.java:860, where getTotal is reported in the crash, and trace the call through FileUtils.java:618 to LoadFolderSpaceDataTask.java:85. Reproduce or inspect folder-space loading and determine why the null Long is unboxed; done means this path no longer crashes with an NPE.

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
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.