You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Daniel Morgan (JIRA)" <ji...@apache.org> on 2013/08/15 17:13:48 UTC

[jira] [Updated] (CB-4590) chooseContact in CDVContacts crashes app

     [ https://issues.apache.org/jira/browse/CB-4590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Morgan updated CB-4590:
------------------------------

    Description: 
Using Cordova 2.9:

In chooseContact I send the option in JS:

var contactOptions = {allowsEditing: false};

with the chooseContacts call, which then causes on line 194 in CDVContacts:

pickerController.allowsEditing = (BOOL)[options existsValue : @"true" forKey : @"allowsEditing"];

To crash. When you put a breakpoint in to check the options dictionary it comes back with
{ allowsEditing = 0; }

and the crash in the logs from this line is:

-[__NSCFBoolean compare:options:]: unrecognized selector sent to instance 0x3ab59528
2013-08-15 10:46:50.081 in uncaughtExceptionHandler
2013-08-15 10:46:50.082 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFBoolean compare:options:]: unrecognized selector sent to instance 0x3ab59528'
*** First throw call stack:
(0x327ef3e7 0x3a4ea963 0x327f2f31 0x327f164d 0x32749208 0xc1071 0xc33f7 0x11584d 0x1150e1 0x114cd7 0x114e63 0x114d8d 0x331074a1 0x327c48f7 0x327c415d 0x327c2f2f 0x3273623d 0x327360c9 0x3631533b 0x346522b9 0x5cdf9 0x5cdd0)
libc++abi.dylib: terminate called throwing an exception 

If I comment the line out, the code executes with no crashes and I receive the contact viewController, can select a contact and return back successfully with the contacts data. 

UPDATE: Contact I receive back (when that line is commented out) is a different contact than the one I selected. The contact I receive exists in my contacts though, but for example I choose "Chelsea" it brings back "Corey", both are in my contacts, just different contact than anticipated.

  was:
Using Cordova 2.9:

In chooseContact I send the option in JS:

var contactOptions = {allowsEditing: false};

with the chooseContacts call, which then causes on line 194 in CDVContacts:

pickerController.allowsEditing = (BOOL)[options existsValue : @"true" forKey : @"allowsEditing"];

To crash. When you put a breakpoint in to check the options dictionary it comes back with
{ allowsEditing = 0; }

and the crash in the logs from this line is:

-[__NSCFBoolean compare:options:]: unrecognized selector sent to instance 0x3ab59528
2013-08-15 10:46:50.081 in uncaughtExceptionHandler
2013-08-15 10:46:50.082 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFBoolean compare:options:]: unrecognized selector sent to instance 0x3ab59528'
*** First throw call stack:
(0x327ef3e7 0x3a4ea963 0x327f2f31 0x327f164d 0x32749208 0xc1071 0xc33f7 0x11584d 0x1150e1 0x114cd7 0x114e63 0x114d8d 0x331074a1 0x327c48f7 0x327c415d 0x327c2f2f 0x3273623d 0x327360c9 0x3631533b 0x346522b9 0x5cdf9 0x5cdd0)
libc++abi.dylib: terminate called throwing an exception 

If I comment the line out, the code executes with no crashes and I receive the contact viewController, can select a contact and return back successfully with the contacts data. 

    
> chooseContact in CDVContacts crashes app
> ----------------------------------------
>
>                 Key: CB-4590
>                 URL: https://issues.apache.org/jira/browse/CB-4590
>             Project: Apache Cordova
>          Issue Type: Bug
>    Affects Versions: 2.9.0
>         Environment: iOS 6.1.4 on iPhone 5.
>            Reporter: Daniel Morgan
>            Priority: Critical
>              Labels: 2.9.0, contacts
>
> Using Cordova 2.9:
> In chooseContact I send the option in JS:
> var contactOptions = {allowsEditing: false};
> with the chooseContacts call, which then causes on line 194 in CDVContacts:
> pickerController.allowsEditing = (BOOL)[options existsValue : @"true" forKey : @"allowsEditing"];
> To crash. When you put a breakpoint in to check the options dictionary it comes back with
> { allowsEditing = 0; }
> and the crash in the logs from this line is:
> -[__NSCFBoolean compare:options:]: unrecognized selector sent to instance 0x3ab59528
> 2013-08-15 10:46:50.081 in uncaughtExceptionHandler
> 2013-08-15 10:46:50.082 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFBoolean compare:options:]: unrecognized selector sent to instance 0x3ab59528'
> *** First throw call stack:
> (0x327ef3e7 0x3a4ea963 0x327f2f31 0x327f164d 0x32749208 0xc1071 0xc33f7 0x11584d 0x1150e1 0x114cd7 0x114e63 0x114d8d 0x331074a1 0x327c48f7 0x327c415d 0x327c2f2f 0x3273623d 0x327360c9 0x3631533b 0x346522b9 0x5cdf9 0x5cdd0)
> libc++abi.dylib: terminate called throwing an exception 
> If I comment the line out, the code executes with no crashes and I receive the contact viewController, can select a contact and return back successfully with the contacts data. 
> UPDATE: Contact I receive back (when that line is commented out) is a different contact than the one I selected. The contact I receive exists in my contacts though, but for example I choose "Chelsea" it brings back "Corey", both are in my contacts, just different contact than anticipated.

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