AmazeFileManager
AmazeFileManager copied to clipboard
Check for deleted files before paste operation
We found a NullPointerException when pasting a deleted file in app, and the environment is as follows:
App version: v3.3.2
Android version: 6.0
Device: Nexux_5X
The steps to reproduce:
The Crash log is as follows:
05-12 11:44:05.967 2017-2183/system_process W/InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@a16474c attribute=null, token = android.os.BinderProxy@990c863
05-12 11:44:05.973 12979-13006/com.amaze.filemanager W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'android.net.Uri android.support.v4.provider.DocumentFile.getUri()' on a null object reference
05-12 11:44:05.973 12979-13006/com.amaze.filemanager W/System.err: at com.amaze.filemanager.utils.files.GenericCopyUtil.startCopy(GenericCopyUtil.java:163)
05-12 11:44:05.973 12979-13006/com.amaze.filemanager W/System.err: at com.amaze.filemanager.utils.files.GenericCopyUtil.copy(GenericCopyUtil.java:325)
05-12 11:44:05.973 12979-13006/com.amaze.filemanager W/System.err: at com.amaze.filemanager.asynchronous.services.CopyService$DoInBackground$Copy.copyFiles(CopyService.java:483)
05-12 11:44:05.973 12979-13006/com.amaze.filemanager W/System.err: at com.amaze.filemanager.asynchronous.services.CopyService$DoInBackground$Copy.execute(CopyService.java:387)
05-12 11:44:05.973 12979-13006/com.amaze.filemanager W/System.err: at com.amaze.filemanager.asynchronous.services.CopyService$DoInBackground.doInBackground(CopyService.java:260)
05-12 11:44:05.973 12979-13006/com.amaze.filemanager W/System.err: at com.amaze.filemanager.asynchronous.services.CopyService$DoInBackground.doInBackground(CopyService.java:224)
05-12 11:44:05.973 12979-13006/com.amaze.filemanager W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:295)
05-12 11:44:05.973 12979-13006/com.amaze.filemanager W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
05-12 11:44:05.973 12979-13006/com.amaze.filemanager W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
05-12 11:44:05.973 12979-13006/com.amaze.filemanager W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
05-12 11:44:05.973 12979-13006/com.amaze.filemanager W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
05-12 11:44:05.973 12979-13006/com.amaze.filemanager W/System.err: at java.lang.Thread.run(Thread.java:818)
I can confirm this NPE still throws at 3.7.0 release. Not harmful, won't crash the app (because it's just Exception.printStackTrace()
, but perhaps we can improve the UX a bit by checking the clipboard on file/folder deletion, and also prevent the paste action so this NPE won't throw.
@androidAppGuard why did this get closed?
oh,I reopened it to try and bring the bug to the developer's attention.