TeamAmaze / TeamAmaze/AmazeFileManager
NPE on `FileUtils#openWith`
Nobody has claimed this yet.
- 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 Cricket/DEMK4123/SL112C:13/TP1A.220624.014/1685194451:user/release-keys 13 - 33
- Device: SL112C
- Model: SL112C
- Product: DEMK4123
Crash log
java.lang.NullPointerException: Attempt to invoke virtual method 'android.net.Uri androidx.documentfile.provider.DocumentFile.getUri()' on a null object reference
at com.amaze.filemanager.filesystem.files.FileUtils.openWith(FileUtils.java:454)
at com.amaze.filemanager.filesystem.files.FileUtils.openFile(FileUtils.java:747)
at com.amaze.filemanager.filesystem.HybridFile.openFileInternal(HybridFile.java:1917)
at com.amaze.filemanager.filesystem.HybridFile.openFile(HybridFile.java:1733)
at com.amaze.filemanager.ui.fragments.MainFragment.onListItemClicked(MainFragment.java:511)
at com.amaze.filemanager.adapters.RecyclerAdapter.lambda$bindViewHolderList$2(RecyclerAdapter.java:817)
at com.amaze.filemanager.adapters.RecyclerAdapter.$r8$lambda$AZs17VrHIpbKmmzxbKvQw2FTI_E(Unknown Source:0)
at com.amaze.filemanager.adapters.RecyclerAdapter$$ExternalSyntheticLambda3.onClick(Unknown Source:8)
at android.view.View.performClick(View.java:7527)
at android.view.View.performClickInternal(View.java:7500)
at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
at android.view.View$PerformClick.run(View.java:29538)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7955)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:569)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1019)
not many other things to do but crash everything when you've been trapped in a virtual machine for a few months. Whoever it is somebody look into it message me on here and i'll pass along everything i know. If it helps they're a member of here, android source, and eclipse.org and violating a ton of rules
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 FileUtils.java:454, where openWith calls DocumentFile.getUri(), then trace the openFile and HybridFile.openFile callers shown in the stack trace. Determine why the DocumentFile is null and reproduce the crash from the UI path; done means the reported NPE no longer occurs and the affected file-opening behavior is handled.
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
- Needs clarification
- Newbie friendliness
- 25/100