iPaulPro / aFileChooser

[DEPRECATED] Android library that provides a file explorer to let users select files on external storage.
Apache License 2.0
1.79k stars 847 forks source link

Crash when choosing pdf file in android 11 #108

Open prosperian opened 2 years ago

prosperian commented 2 years ago

2021-12-26 19:23:23.097 25806-25806/com.parto.podingo E/AndroidRuntime: FATAL EXCEPTION: main Process: com.parto.podingo, PID: 25806 java.lang.NullPointerException: uri at java.util.Objects.requireNonNull(Objects.java:245) at android.content.ContentResolver.query(ContentResolver.java:1171) at android.content.ContentResolver.query(ContentResolver.java:1128) at android.content.ContentResolver.query(ContentResolver.java:1084) at com.parto.podingo.utils.FileUtils.getDataColumn(FileUtils.java:228) at com.parto.podingo.utils.FileUtils.getPath(FileUtils.java:320) at com.parto.podingo.utils.FileUtils.getFile(FileUtils.java:350) at com.parto.podingo.fragments.ApplySupportFragment.singleImageResultLauncher$lambda-11(ApplySupportFragment.kt:309) at com.parto.podingo.fragments.ApplySupportFragment.lambda$TH8lRf487SfLh29t7Z8ZnTgTGe4(Unknown Source:0) at com.parto.podingo.fragments.-$$Lambda$ApplySupportFragment$TH8lRf487SfLh29t7Z8ZnTgTGe4.onActivityResult(Unknown Source:4) at androidx.activity.result.ActivityResultRegistry$1.onStateChanged(ActivityResultRegistry.java:148) at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:354) at androidx.lifecycle.LifecycleRegistry.forwardPass(LifecycleRegistry.java:265) at androidx.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.java:307) at androidx.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.java:148) at androidx.lifecycle.LifecycleRegistry.handleLifecycleEvent(LifecycleRegistry.java:134) at androidx.fragment.app.Fragment.performStart(Fragment.java:3026) at androidx.fragment.app.FragmentStateManager.start(FragmentStateManager.java:589) at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:300) at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:112) at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1647) at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3128) at androidx.fragment.app.FragmentManager.dispatchStart(FragmentManager.java:3079) at androidx.fragment.app.Fragment.performStart(Fragment.java:3030) at androidx.fragment.app.FragmentStateManager.start(FragmentStateManager.java:589) at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:300) at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:112) at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1647) at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3128) at androidx.fragment.app.FragmentManager.dispatchStart(FragmentManager.java:3079) at androidx.fragment.app.FragmentController.dispatchStart(FragmentController.java:262) at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:510) at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:246) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1436) at android.app.Activity.performStart(Activity.java:8188) at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3565) at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221) at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2135) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:236) at android.app.ActivityThread.main(ActivityThread.java:8056) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)