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 2E5D818BBA for ; Tue, 20 Oct 2015 18:15:31 +0000 (UTC) Received: (qmail 39005 invoked by uid 500); 20 Oct 2015 18:15:28 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 38897 invoked by uid 500); 20 Oct 2015 18:15:28 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 38869 invoked by uid 99); 20 Oct 2015 18:15:27 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Oct 2015 18:15:27 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id B2CC62C1F5E for ; Tue, 20 Oct 2015 18:15:27 +0000 (UTC) Date: Tue, 20 Oct 2015 18:15:27 +0000 (UTC) From: "Richard B Knoll (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=14965494#comment-14965494 ] Richard B Knoll commented on CB-4632: ------------------------------------- Aha! This looks to be the same issue as CB-9189, which is related to the Activity getting killed in the background (same stack trace). I am going to close this because there is much more conversation in the other thread and it is still active. Feel free to reopen if I am mistaken. > 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: > {code:javascript} > /** * 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 }); > } > {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