sirhaplo commented on issue #554: Camera plugin crashes Android 9 device URL: https://github.com/apache/cordova-plugin-camera/issues/554#issuecomment-598703161 I see the same problem on our app. On android 8 i see no problems. On android 9 it crashes randomly. To reproduce i need to shoot a lot of photos, but i have reports from users that has the problem more often. The problem is with cordova-camera 4.0.3 and also with 4.1.0. I dint tried lower versions. In other places i read thet my stacktrace could be about permission on disk, but its seem all good. On normal use i save the images correctly, and some rare times i cant. So the permissions are right. My code to call the camera : `navigator.camera.getPicture(onSuccess, onFail, { quality: 50, allowEdit: true, destinationType: Camera.DestinationType.FILE_URI, correctOrientation: true });` Here the trace : `03-13 10:45:10.585 16037 16037 D AndroidRuntime: Shutting down VM 03-13 10:45:10.586 16037 16037 E AndroidRuntime: FATAL EXCEPTION: main 03-13 10:45:10.586 16037 16037 E AndroidRuntime: Process: it.tideup.riquesto, PID: 16037 03-13 10:45:10.586 16037 16037 E AndroidRuntime: java.lang.RuntimeException: Unable to resume activity {it.tideup.riquesto/it.tideup.riquesto.MainActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=34, result=-1, data=null} to activity {it.tideup.riquesto/it.tideup.riquesto.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3830) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3862) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at android.os.Looper.loop(Looper.java:193) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6854) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:860) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=34, result=-1, data=null} to activity {it.tideup.riquesto/it.tideup.riquesto.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at android.app.ActivityThread.deliverResults(ActivityThread.java:4427) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3819) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: ... 11 more 03-13 10:45:10.586 16037 16037 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at android.support.v4.content.FileProvider.parsePathStrategy(FileProvider.java:604) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at android.support.v4.content.FileProvider.getPathStrategy(FileProvider.java:578) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:416) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at org.apache.cordova.camera.CameraLauncher.onActivityResult(CameraLauncher.java:803) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at org.apache.cordova.CordovaInterfaceImpl.onActivityResult(CordovaInterfaceImpl.java:152) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at org.apache.cordova.CordovaActivity.onActivityResult(CordovaActivity.java:358) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at android.app.Activity.dispatchActivityResult(Activity.java:7469) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: at android.app.ActivityThread.deliverResults(ActivityThread.java:4420) 03-13 10:45:10.586 16037 16037 E AndroidRuntime: ... 12 more`
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
