AmazeFileManager icon indicating copy to clipboard operation
AmazeFileManager copied to clipboard

NPE on tab on bookmark when getting document file

Open amaze-issue-automation[bot] opened this issue 3 years ago • 3 comments

Issue explanation (write below this line)

Crashed when i tap on a bookmark

Exception

  • App Name: Amaze File Manager
  • Package: com.amaze.filemanager
  • Version: 3.6.2
  • User Action: UI Error
  • Request: Application crash
  • OS: Linux Android 12 - 31
  • Device: barbet
  • Model: Pixel 5a
  • Product: barbet
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:383)
 at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
 at java.util.concurrent.FutureTask.run(FutureTask.java:271)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
 at java.lang.Thread.run(Thread.java:920)
Caused by: java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter rootUriString
 at com.amaze.filemanager.utils.OTGUtil.getDocumentFiles(Unknown Source:12)
 at com.amaze.filemanager.asynchronous.asynctasks.LoadFilesListTask.listDocumentFiles(LoadFilesListTask.java:570)
 at com.amaze.filemanager.asynchronous.asynctasks.LoadFilesListTask.doInBackground(LoadFilesListTask.java:209)
 at com.amaze.filemanager.asynchronous.asynctasks.LoadFilesListTask.doInBackground(LoadFilesListTask.java:69)
 at android.os.AsyncTask$3.call(AsyncTask.java:394)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 ... 3 more


Reporter: None

@TranceLove this is bad, how do we deal with not getting the uri root? Is there no fallback?

EmmanuelMess avatar Oct 03 '21 17:10 EmmanuelMess

Gracefully handle NPE that's being thrown now, from wherever this method is called. Also, I think in SingletonUsbOtg#setUsbOtgRoot check before setting usb root that it's not null and show toast to user that time iteslf. These two changes should suffice

VishalNehra avatar Mar 11 '22 22:03 VishalNehra

Occurred when attempting to access a bookmark. Likely related to the directory in question, which is a Termux shared folder.

SunDevil311 avatar Aug 08 '23 11:08 SunDevil311