DeveloperPaul123 / FilePickerLibrary

Simple library that allows for the picking of files and/or directories.
Apache License 2.0
79 stars 25 forks source link

Fatal Exception: java.lang.RuntimeException #24

Closed fmeneuhe closed 8 years ago

fmeneuhe commented 8 years ago

One of my users got this error. Can you add a try..catch to avoid exception when doing non-essential tasks? For example getting the size.

Fatal Exception: java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:299) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352) at java.util.concurrent.FutureTask.setException(FutureTask.java:219) at java.util.concurrent.FutureTask.run(FutureTask.java:239) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) at java.lang.Thread.run(Thread.java:856) Caused by java.lang.NullPointerException at com.devpaul.filepickerlibrary.adapter.FileListAdapter$GetFileSizeTask.a(SourceFile:386) at com.devpaul.filepickerlibrary.adapter.FileListAdapter$GetFileSizeTask.a(SourceFile:372) at com.devpaul.filepickerlibrary.adapter.FileListAdapter$GetFileSizeTask.doInBackground(SourceFile:358) at android.os.AsyncTask$2.call(AsyncTask.java:287) at java.util.concurrent.FutureTask.run(FutureTask.java:234) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) at java.lang.Thread.run(Thread.java:856)

DeveloperPaul123 commented 8 years ago

I will def fix this!

DeveloperPaul123 commented 8 years ago

I think I fixed it in version 2.0.0, can you confirm?

fmeneuhe commented 8 years ago

Thx Paul. I will tell you something as far I know it.

fmeneuhe commented 8 years ago

Sure, When I updated to 2.0.0 I got this error: Error:(60, 13) Failed to resolve: com.github.DeveloperPaul123:FilePickerLibrary:2.0.0

DeveloperPaul123 commented 8 years ago

Hello, ok there was an error in the gradle build script that was causing jitpack to fail. I believe I fixed it as I do not get any errors on jitpack anymore. Please use: com.github.DeveloperPaul123:FilePickerLibrary:2.0.1 as the dependency now.

DeveloperPaul123 commented 8 years ago

Did this fix the issue?

fmeneuhe commented 8 years ago

Yes Paul. It seems to be fixed. I haven't got this error again so far. Thanks

DeveloperPaul123 commented 8 years ago

Great sounds good. Please let me know if it happens again.