cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Shakhnazarov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-11446) Android: app crashes after taking a photo
Date Thu, 07 Jul 2016 13:33:10 GMT

    [ https://issues.apache.org/jira/browse/CB-11446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15366099#comment-15366099
] 

Sergey Shakhnazarov commented on CB-11446:
------------------------------------------

[~Victor Ros], could you please provide the exact {{getPicture}} opts?
The exception could be caused by the [imageUri=null|https://github.com/apache/cordova-plugin-camera/blob/d124e03cb9f00821f64c90849380ef8b40b7c8c8/src/android/CameraLauncher.java#L452]
- could you debug this in Android Studio?

> Android: app crashes after taking a photo
> -----------------------------------------
>
>                 Key: CB-11446
>                 URL: https://issues.apache.org/jira/browse/CB-11446
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Camera
>    Affects Versions: 5.4.1
>         Environment: +*Smartphone:*+ Samsung Galaxy S5 Active
> +*Model:*+ SM-G870F
> +*Android version:*+ 5.0
>            Reporter: Victor Ros
>            Assignee: Sergey Shakhnazarov
>              Labels: Android, triaged
>
> I develop with a framework using cordova for an hybrid application.
> I only produce the Android version for testing the application.
> I'm using *cordova-plugin-camera 2.2.0* to take a picture in my application.
> I use getPicture method to do that.
> I always encounter this bug by following these steps :
> * Take a photo
> * Tap the "Retry" button
> * Take another photo
> * Then validate the photo by tapping the "Ok" button OR by cancelling with the back button
> * ==> App stopped
> I try to debug with Android Studio but even with breakpoints I don't succeed.
> Bellow, the stack from the Java Error when validating the photo:
> {code}
> E/AndroidRuntime: FATAL EXCEPTION: main
> Process: my.application.appXXX.bip.mobileClient, PID: 16960
> java.lang.RuntimeException: Unable to resume activity {my.application.appXXX.bip.mobileClient/my.application.appXXX.bip.mobileClient.MainActivity}:
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=34, result=-1,
data=null} to activity {my.application.appXXX.bip.mobileClient/my.application.appXXX.bip.mobileClient.MainActivity}:
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.toString()'
on a null object reference
>     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3349)
>     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3380)
>     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2731)
>     at android.app.ActivityThread.access$900(ActivityThread.java:172)
>     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421)
>     at android.os.Handler.dispatchMessage(Handler.java:102)
>     at android.os.Looper.loop(Looper.java:145)
>     at android.app.ActivityThread.main(ActivityThread.java:5835)
>     at java.lang.reflect.Method.invoke(Native Method)
>     at java.lang.reflect.Method.invoke(Method.java:372)
>     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)
>     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)
>  Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null,
request=34, result=-1, data=null} to activity {my.application.appXXX.bip.mobileClient/my.application.appXXX.bip.mobileClient.MainActivity}:
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.toString()'
on a null object reference
>     at android.app.ActivityThread.deliverResults(ActivityThread.java:3977)
>     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3335)
>     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3380) 
>     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2731) 
>     at android.app.ActivityThread.access$900(ActivityThread.java:172) 
>     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421) 
>     at android.os.Handler.dispatchMessage(Handler.java:102) 
>     at android.os.Looper.loop(Looper.java:145) 
>     at android.app.ActivityThread.main(ActivityThread.java:5835) 
>     at java.lang.reflect.Method.invoke(Native Method) 
>     at java.lang.reflect.Method.invoke(Method.java:372) 
>     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388) 
>     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183) 
>  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String
android.net.Uri.toString()' on a null object reference
>     at org.apache.cordova.camera.CameraLauncher.processResultFromCamera(CameraLauncher.java:452)
>     at org.apache.cordova.camera.CameraLauncher.onActivityResult(CameraLauncher.java:787)
>     at org.apache.cordova.CordovaInterfaceImpl.onActivityResult(CordovaInterfaceImpl.java:120)
>     at org.apache.cordova.CordovaActivity.onActivityResult(CordovaActivity.java:353)
>     at android.app.Activity.dispatchActivityResult(Activity.java:6475)
>     at android.app.ActivityThread.deliverResults(ActivityThread.java:3973)
>     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3335) 
>     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3380) 
>     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2731) 
>     at android.app.ActivityThread.access$900(ActivityThread.java:172) 
>     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421) 
>     at android.os.Handler.dispatchMessage(Handler.java:102) 
>     at android.os.Looper.loop(Looper.java:145) 
>     at android.app.ActivityThread.main(ActivityThread.java:5835) 
>     at java.lang.reflect.Method.invoke(Native Method) 
>     at java.lang.reflect.Method.invoke(Method.java:372) 
>     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388) 
>     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183) 
> {code}
> Bellow, the stack from the Java Error when cancelling the application:
> {code}
> E/AndroidRuntime: FATAL EXCEPTION: main
> Process: my.application.appXXX.bip.mobileClient, PID: 22777
> java.lang.RuntimeException: Unable to resume activity {my.application.appXXX.bip.mobileClient/my.application.appXXX.bip.mobileClient.MainActivity}:
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=34, result=0,
data=null} to activity {my.application.appXXX.bip.mobileClient/my.application.appXXX.bip.mobileClient.MainActivity}:
java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CallbackContext.error(java.lang.String)'
on a null object reference
>     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3349)
>     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3380)
>     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2731)
>     at android.app.ActivityThread.access$900(ActivityThread.java:172)
>     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421)
>     at android.os.Handler.dispatchMessage(Handler.java:102)
>     at android.os.Looper.loop(Looper.java:145)
>     at android.app.ActivityThread.main(ActivityThread.java:5835)
>     at java.lang.reflect.Method.invoke(Native Method)
>     at java.lang.reflect.Method.invoke(Method.java:372)
>     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)
>     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)
>  Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null,
request=34, result=0, data=null} to activity {my.application.appXXX.bip.mobileClient/my.application.appXXX.bip.mobileClient.MainActivity}:
java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CallbackContext.error(java.lang.String)'
on a null object reference
>     at android.app.ActivityThread.deliverResults(ActivityThread.java:3977)
>     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3335)
>     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3380) 
>     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2731) 
>     at android.app.ActivityThread.access$900(ActivityThread.java:172) 
>     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421) 
>     at android.os.Handler.dispatchMessage(Handler.java:102) 
>     at android.os.Looper.loop(Looper.java:145) 
>     at android.app.ActivityThread.main(ActivityThread.java:5835) 
>     at java.lang.reflect.Method.invoke(Native Method) 
>     at java.lang.reflect.Method.invoke(Method.java:372) 
>     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388) 
>     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183) 
>  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CallbackContext.error(java.lang.String)'
on a null object reference
>     at org.apache.cordova.camera.CameraLauncher.failPicture(CameraLauncher.java:1190)
>     at org.apache.cordova.camera.CameraLauncher.onActivityResult(CameraLauncher.java:797)
>     at org.apache.cordova.CordovaInterfaceImpl.onActivityResult(CordovaInterfaceImpl.java:120)
>     at org.apache.cordova.CordovaActivity.onActivityResult(CordovaActivity.java:353)
>     at android.app.Activity.dispatchActivityResult(Activity.java:6475)
>     at android.app.ActivityThread.deliverResults(ActivityThread.java:3973)
>     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3335) 
>     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3380) 
>     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2731) 
>     at android.app.ActivityThread.access$900(ActivityThread.java:172) 
>     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421) 
>     at android.os.Handler.dispatchMessage(Handler.java:102) 
>     at android.os.Looper.loop(Looper.java:145) 
>     at android.app.ActivityThread.main(ActivityThread.java:5835) 
>     at java.lang.reflect.Method.invoke(Native Method) 
>     at java.lang.reflect.Method.invoke(Method.java:372) 
>     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388) 
>     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183) 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message