TeamAmaze / TeamAmaze/AmazeFileManager
NPE on `HybridFile#toTrashBinRestoreFile`
Open
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 File Manager
- Package: com.amaze.filemanager
- Version: 3.10
- User Action: UI Error
- Request: Application crash
- OS: Linux Android 13 - 33
- Device: oneli
- Model: XT2251-1
- Product: oneli_cn
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: Parameter specified as non-null is null:
method com.amaze.trashbin.TrashBinFile.<init>, parameter fileName
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:1137)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.NullPointerException: Parameter specified as non-null
is null: method com.amaze.trashbin.TrashBinFile.<init>, parameter fileName
at com.amaze.trashbin.TrashBinFile.<init>(Unknown Source:2)
at
com.amaze.filemanager.filesystem.HybridFile.toTrashBinRestoreFile(HybridFile.java:1856)
at
com.amaze.filemanager.filesystem.HybridFile.deletePermanentlyFromBin(HybridFile.java:1596)
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
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 at HybridFile.toTrashBinRestoreFile in HybridFile.java around line 1856, then trace its call from deletePermanentlyFromBin and delete. Inspect how the TrashBinFile constructor receives fileName, and verify that permanently deleting an item from the trash no longer crashes with a null filename.
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