cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-4632) NPE exception when getting image from gallery.
Date Tue, 08 Oct 2013 08:06:42 GMT

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

David commented on CB-4632:
---------------------------

Do you mean last Phonegap release? I don't know, i'm working with 2.7 and by now I can't migrate
because of some plugins.

But looking at simon mac donald blog it seems it is still going on (http://simonmacdonald.blogspot.com.es/2012/07/change-to-camera-code-in-phonegap-190.html)

> NPE exception when getting image from gallery.
> ----------------------------------------------
>
>                 Key: CB-4632
>                 URL: https://issues.apache.org/jira/browse/CB-4632
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Camera
>    Affects Versions: 2.7.0
>         Environment: Android
>            Reporter: David
>              Labels: patch
>
> When selecting a picture from gallery app crashes with a NPE:
> java.lang.RuntimeException: Unable to resume activity {com.xmile.events/com.xmile.events.MainActivity}:
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=18, result=-1,
data=Intent { dat=content://media/external/images/media/8908 (has extras) }} to activity {com.xmile.events/com.xmile.events.MainActivity}:
java.lang.NullPointerException
> at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2616)
> at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2644)
> at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2130)
> at android.app.ActivityThread.access$600(ActivityThread.java:140)
> at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
> at android.os.Handler.dispatchMessage(Handler.java:99)
> at android.os.Looper.loop(Looper.java:137)
> at android.app.ActivityThread.main(ActivityThread.java:4898)
> at java.lang.reflect.Method.invokeNative(Native Method)
> at java.lang.reflect.Method.invoke(Method.java:511)
> at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
> at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
> at dalvik.system.NativeStart.main(Native Method)
> Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null,
request=18, result=-1, data=Intent { dat=content://media/external/images/media/8908 (has extras)
}} to activity {com.xmile.events/com.xmile.events.MainActivity}: java.lang.NullPointerException
> at android.app.ActivityThread.deliverResults(ActivityThread.java:3182)
> at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2603)
> ... 12 more
> Caused by: java.lang.NullPointerException
> at org.apache.cordova.DroidGap.onActivityResult(DroidGap.java:858)
> at android.app.Activity.dispatchActivityResult(Activity.java:5390)
> at android.app.ActivityThread.deliverResults(ActivityThread.java:3178)
> ... 13 more
> The javascript code is:
> 		/** * Select picture from library */
> 		function selectPicture() {
> 			pictureSource=navigator.camera.PictureSourceType;
> 			destinationType=navigator.camera.DestinationType;
> 			// Retrieve image file location from specified source
> 			navigator.camera.getPicture(
> 				onPhotoURISuccess, onFail, { quality: 100, 
> 				destinationType: destinationType.FILE_URI,
> 				sourceType: pictureSource.PHOTOLIBRARY });
> 		}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message