Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7A6909266 for ; Mon, 21 May 2012 18:23:41 +0000 (UTC) Received: (qmail 66082 invoked by uid 500); 21 May 2012 18:23:41 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 66055 invoked by uid 500); 21 May 2012 18:23:41 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 66041 invoked by uid 99); 21 May 2012 18:23:41 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 May 2012 18:23:41 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 0AF4814002E for ; Mon, 21 May 2012 18:23:40 +0000 (UTC) Date: Mon, 21 May 2012 18:23:40 +0000 (UTC) From: "Shazron Abdullah (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <155008226.4140.1337624621051.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1173234113.3917.1337621320903.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Updated] (CB-818) Make CDVViewController also implement initWithNibName 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-818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah updated CB-818: -------------------------------- Fix Version/s: 1.8.0 > Make CDVViewController also implement initWithNibName > ----------------------------------------------------- > > Key: CB-818 > URL: https://issues.apache.org/jira/browse/CB-818 > Project: Apache Cordova > Issue Type: Improvement > Components: iOS > Affects Versions: 1.7.0 > Reporter: Matt Goldspink > Assignee: Shazron Abdullah > Priority: Minor > Fix For: 1.8.0 > > > I just got caught upgrading from 1.5.0 to 1.7.0 by this. I extend CDVViewController, but I also use a nib file. The behaviour I was seeing was that the app would crash shortly after startup. When I used Zombie's in Instruments I could see that the CDVLocalStorage class was being allocated and then de-allocated straight away and the EXC_BAD_ACCESS error would be thrown by something trying to access it later on. > After a long time debugging I realised that the init method was not being called on the CDVViewController because I was being initialised from a nib and hence: > -(id) initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil > was being called. Because init was not being called the commandDelegate was not set and hence the line which allocated the CDVViewController to registerPlugins would be doing it on a nil object. If initWithNibName was implemented and just invoked init() this would solve this issue and hopefully not let others extending CDVViewController get caught out either -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira