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 F3E7C108A5 for ; Fri, 14 Jun 2013 19:04:21 +0000 (UTC) Received: (qmail 991 invoked by uid 500); 14 Jun 2013 19:04:21 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 960 invoked by uid 500); 14 Jun 2013 19:04:21 -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 828 invoked by uid 99); 14 Jun 2013 19:04:21 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Jun 2013 19:04:21 +0000 Date: Fri, 14 Jun 2013 19:04:21 +0000 (UTC) From: "Joe Bowser (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-3523) Possible NPE on app restart 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-3523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13683666#comment-13683666 ] Joe Bowser commented on CB-3523: -------------------------------- So, can we test this? > Possible NPE on app restart > --------------------------- > > Key: CB-3523 > URL: https://issues.apache.org/jira/browse/CB-3523 > Project: Apache Cordova > Issue Type: Bug > Components: Android > Reporter: Ian Clelland > Assignee: Ian Clelland > > If the cordova activity is suspended while waiting for a callback, it can be woken up in a state where the plugin which should be responsible for that callback is not present, and the app will throw a NullPointerException. > There may be something deeper going on here, but we should probably not throw in any case -- at least we can restart in a stable state. > From the original pull request (https://github.com/apache/cordova-android/pull/58): > bq.I had a situation where the camera application would actually fail and it seems that the onActivityResult method would fall into an unusual state and throw an exception. > bq.The simple fix was to ensure that if the plugin manager returned null for a callback, we didn't then attempt to use the callback. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira