You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Mickael Magniez (JIRA)" <ji...@apache.org> on 2015/09/24 09:26:04 UTC

[jira] [Commented] (CB-9651) Issue in Cordova Camera Plugin

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

Mickael Magniez commented on CB-9651:
-------------------------------------

Hi,

It seems to happen when GC kill cordova Main Activity (for example when camera activity is started, cordova main activity is stopped, and if phone has low memory, android can choose to kill cordova main activity).

To reproduce : check "Don't keep activities" options in developer option menu of your phone, and call camera.getPicture(), application crash when going back from camea to Main Activity

Mickael

> Issue in Cordova Camera Plugin
> ------------------------------
>
>                 Key: CB-9651
>                 URL: https://issues.apache.org/jira/browse/CB-9651
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: , Plugin Battery Status, Plugin Camera, Plugin Contacts, Plugin Device Orientation, Plugin Dialogs, Plugin File, Plugin Geolocation, Plugin Globalization, Plugin InAppBrowser, Plugin Media, Plugin Media Capture, CordovaLib
>    Affects Versions: 5.0.0
>         Environment: Sencha Touch
>            Reporter: Vishwa Deepak
>             Fix For: 5.0.0
>
>
> Hi Team,
> Facing this issue: 
> Please can you help, the plugin of CORDOVA CAMERA the callbackContext is returning NULL and the app get crash..
> Can you help us why this is happening in Android 5.0.0 and 4.4.2  as well as.. Can u do something in codova camera plugin and some try catch where as null value come the app should not crash.
> D/AndroidRuntime(14743): Shutting down VM
> E/AndroidRuntime(14743): FATAL EXCEPTION: main
> E/AndroidRuntime(14743): Process: com.nielsen.nic, PID: 14743
> E/AndroidRuntime(14743): java.lang.RuntimeException: Unable to resume activity {com.nielsen.nic/com.nielsen.nic.NIC}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=33, result=-1, data=null} to activity {com.nielsen.nic/com.nielsen.nic.NIC}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.toString()' on a null object reference
> E/AndroidRuntime(14743): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3346)
> E/AndroidRuntime(14743): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3377)
> E/AndroidRuntime(14743): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2728)
> E/AndroidRuntime(14743): at android.app.ActivityThread.access$900(ActivityThread.java:172)
> E/AndroidRuntime(14743): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1422)
> E/AndroidRuntime(14743): at android.os.Handler.dispatchMessage(Handler.java:102)
> E/AndroidRuntime(14743): at android.os.Looper.loop(Looper.java:145)
> E/AndroidRuntime(14743): at android.app.ActivityThread.main(ActivityThread.java:5832)
> E/AndroidRuntime(14743): at java.lang.reflect.Method.invoke(Native Method)
> E/AndroidRuntime(14743): at java.lang.reflect.Method.invoke(Method.java:372)
> E/AndroidRuntime(14743): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)
> E/AndroidRuntime(14743): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)
> E/AndroidRuntime(14743): Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=33, result=-1, data=null} to activity {com.nielsen.nic/com.nielsen.nic.NIC}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.toString()' on a null object reference
> E/AndroidRuntime(14743): at android.app.ActivityThread.deliverResults(ActivityThread.java:3974)
> E/AndroidRuntime(14743): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3332)
> E/AndroidRuntime(14743): ... 11 more
> E/AndroidRuntime(14743): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.toString()' on a null object reference
> E/AndroidRuntime(14743): at org.apache.cordova.camera.CameraLauncher.processResultFromCamera(CameraLauncher.java:404)
> E/AndroidRuntime(14743): at org.apache.cordova.camera.CameraLauncher.onActivityResult(CameraLauncher.java:678)
> E/AndroidRuntime(14743): at org.apache.cordova.CordovaInterfaceImpl.onActivityResult(CordovaInterfaceImpl.java:120)
> E/AndroidRuntime(14743): at org.apache.cordova.CordovaActivity.onActivityResult(CordovaActivity.java:320)
> E/AndroidRuntime(14743): at android.app.Activity.dispatchActivityResult(Activity.java:6475)
> E/AndroidRuntime(14743): at android.app.ActivityThread.deliverResults(ActivityThread.java:3970)
> E/AndroidRuntime(14743): ... 12 more



--
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