Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8FD3D10FC5 for ; Tue, 8 Oct 2013 08:06:50 +0000 (UTC) Received: (qmail 89126 invoked by uid 500); 8 Oct 2013 08:06:50 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 88608 invoked by uid 500); 8 Oct 2013 08:06:45 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 88507 invoked by uid 99); 8 Oct 2013 08:06:42 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Oct 2013 08:06:42 +0000 Date: Tue, 8 Oct 2013 08:06:42 +0000 (UTC) From: "David (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-4632) NPE exception when getting image from gallery. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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)