Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when shared storage not available #70

Open
markkorput opened this issue Sep 23, 2020 · 0 comments · May be fixed by #71
Open

Crash when shared storage not available #70

markkorput opened this issue Sep 23, 2020 · 0 comments · May be fixed by #71

Comments

@markkorput
Copy link

Looks like VideoPickActivity does not check if getExternalCacheDir() returns null.

I'm using a nativescript package that eventually uses MultiType-FilePicker for the android native implementation. See also this comment for more information.

Errlog:

System.err: An uncaught Exception occurred on "main" thread.
System.err: Unable to start activity ComponentInfo{<APP_ID>/com.vincent.filepicker.activity.VideoPickActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object reference
System.err:
System.err: StackTrace:
System.err: java.lang.RuntimeException: Unable to start activity ComponentInfo{<APP_ID>/com.vincent.filepicker.activity.VideoPickActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object reference
System.err: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3449)
System.err: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
System.err: 	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
System.err: 	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
System.err: 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
System.err: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
System.err: 	at android.os.Handler.dispatchMessage(Handler.java:106)
System.err: 	at android.os.Looper.loop(Looper.java:223)
System.err: 	at android.app.ActivityThread.main(ActivityThread.java:7656)
System.err: 	at java.lang.reflect.Method.invoke(Native Method)
System.err: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
System.err: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object reference
System.err: 	at com.vincent.filepicker.activity.VideoPickActivity.initView(VideoPickActivity.java:108)
System.err: 	at com.vincent.filepicker.activity.VideoPickActivity.onCreate(VideoPickActivity.java:78)
System.err: 	at android.app.Activity.performCreate(Activity.java:7995)
System.err: 	at android.app.Activity.performCreate(Activity.java:7979)
System.err: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
System.err: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
System.err: 	... 11 more
markkorput pushed a commit to markkorput/MultiType-FilePicker that referenced this issue Sep 25, 2020
jibon57 added a commit to jibon57/MultiType-FilePicker that referenced this issue Oct 5, 2020
Fixes fishwjy#70 check getExternalCacheDir for null result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant