TeamAmaze / TeamAmaze/AmazeFileManager

NPE on `TrashBin#deletePermanently`

Open
#4,136 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Crash-NullPointerException From-Email Issue-Bug Issue-Easy (good first issue)
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
  • Package: com.amaze.filemanager
  • Version: 3.10
  • User Action: UI Error
  • Request: Application crash
  • OS: Linux Android 14 - 34
  • Device: gta7litewifi
  • Model: SM-T220
  • Product: gta7litewifixx
Crash log

io.reactivex.exceptions.OnErrorNotImplementedException: The exception was
not handled due to missing onError handler in the subscribe() method call.
Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling |
java.lang.NullPointerException: Attempt to invoke virtual method
'java.lang.String com.amaze.trashbin.TrashBinFile.getPath()' on a null
object reference
at
io.reactivex.internal.observers.EmptyCompletableObserver.onError(EmptyCompletableObserver.java:50)
at
io.reactivex.internal.operators.completable.CompletableSubscribeOn$SubscribeOnObserver.onError(CompletableSubscribeOn.java:74)
at
io.reactivex.internal.operators.completable.CompletableFromRunnable.subscribeActual(CompletableFromRunnable.java:40)
at io.reactivex.Completable.subscribe(Completable.java:2309)
at
io.reactivex.internal.operators.completable.CompletableSubscribeOn$SubscribeOnObserver.run(CompletableSubscribeOn.java:64)
at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
at
io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
at
io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method
'java.lang.String com.amaze.trashbin.TrashBinFile.getPath()' on a null
object reference
at com.amaze.trashbin.TrashBin.deletePermanently(TrashBin.kt:121)
at
com.amaze.filemanager.filesystem.HybridFile.deletePermanentlyFromBin(HybridFile.java:1600)
at com.amaze.filemanager.filesystem.HybridFile.delete(HybridFile.java:1543)
at
com.amaze.filemanager.application.AppConfig.lambda$getTrashBinInstance$2(AppConfig.java:285)
at
com.amaze.filemanager.application.AppConfig.$r8$lambda$hMGiVDvfwwzG3tz2_fRQ8F7OGvY(Unknown
Source:0)
at
com.amaze.filemanager.application.AppConfig$$ExternalSyntheticLambda4.run(Unknown
Source:4)
at
io.reactivex.internal.operators.completable.CompletableFromRunnable.subscribeActual(CompletableFromRunnable.java:36)
... 10 more


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 com.amaze.trashbin.TrashBin.deletePermanently in TrashBin.kt around line 121, then trace the callers in HybridFile.java and AppConfig.java shown in the stack trace. Determine why the TrashBinFile is null and make permanent deletion complete without this crash; verify the delete path no longer raises the reported NullPointerException.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.