cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alessandro Miliucci (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CB-7743) Multiple calls to navigator.contacts.find crash iOS application
Date Thu, 30 Oct 2014 15:58:34 GMT

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

Alessandro Miliucci edited comment on CB-7743 at 10/30/14 3:58 PM:
-------------------------------------------------------------------

Same issue here with cordova 3.6.3 and Contacts plugin v.0.2.14.
The error log is:
{code}
[__NSDictionaryI objectForKey:]: message sent to deallocated instance 0x1a990170
{code}

The line that trigger the error is [L1397|https://github.com/apache/cordova-plugin-contacts/blob/master/src/ios/CDVContact.m#L1397]
in CDVContact.m:
{code}
id fields = [[CDVContact defaultObjectAndProperties] objectForKey:name];
{code}

With ~300 contacts the app crashes at the second call. I found a workaround editing the {{(NSDictionary*)defaultObjectAndProperties}}
method, returning every time a new dictionary. The same change is needed in {{(NSDictionary*)defaultW3CtoAB}}
and {{(NSSet*)defaultW3CtoNull}}.




was (Author: amil):
Same issue here with cordova 3.6.3 and Contacts plugin v.0.2.14.
The error log is:
{code}
[__NSDictionaryI objectForKey:]: message sent to deallocated instance 0x1a990170
{code}

The line that trigger the error is [L1397|https://github.com/apache/cordova-plugin-contacts/blob/master/src/ios/CDVContact.m#L1397]
in CDVContact.m:
{code}
id fields = [[CDVContact defaultObjectAndProperties] objectForKey:name];
{code}

With ~300 contacts the app crashes at the second call. I found a workaround editing the {{(NSDictionary*)defaultObjectAndProperties}}
method, returning every time a new dictionary. The same change is needed in {{(NSDictionary*)defaultFields}}.



> Multiple calls to navigator.contacts.find crash iOS application
> ---------------------------------------------------------------
>
>                 Key: CB-7743
>                 URL: https://issues.apache.org/jira/browse/CB-7743
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Contacts
>    Affects Versions: 3.5.0
>         Environment: Running on an iPhone 5 running iOS8 with about 200 contacts.
>            Reporter: Jesse Hull
>
> Compile the following http://codepen.io/anon/pen/vlEmL into an iPhone application with
cordova after installing the contacts plugin.
> Click on Load Contacts 5-10 times and the iPhone application will crash.



--
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


Mime
View raw message