TeamAmaze / AmazeFileManager

Material design file manager for Android
https://teamamaze.xyz
GNU General Public License v3.0
5.1k stars 1.54k forks source link

NPE on `FileUtils#openWith` #4116

Open bearCHOPPER opened 2 months ago

bearCHOPPER commented 2 months ago

Issue explanation (write below this line)

Exception

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

matkoniecz commented 2 months ago

when you've been trapped in a virtual machine for a few months If it helps they're a member of here, android source, and eclipse.org and violating a ton of rules

This is unclear at best. How you trigger this crash?