ABCDBContextSaveMultiValue exception

Originator:futuretap
Number:rdar://9832923 Date Originated:25-Jul-2011 11:34 AM
Status:Closed Resolved:
Product:iPhone Product Version:4.3.4
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
We receive a number of crash reports like the ones attached. An exception like this is thrown:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI length]: unrecognized selector sent to instance 0x2f6540'

It seems to happen under certain circumstances when the user edits a contact's details using the ABAddressBook API.


Steps to Reproduce:
Haven't been able yet.


Regression:
As you see in the attached reports, this happens from iOS 4.2.1 all the way up to 4.3.4 on different hardware.


25-Jul-2011 03:58 PM Patrick Collins :
Engineering has requested the following information in order to further investigate this issue:

Are you also experiencing this issue with iOS 5.0b4 (9A5274d)?

25-Jul-2011 04:16 PM Ortwin Gentz:
The issue doesn't occur frequently (I suspect it's some sort of race condition) so we haven't seen this in the wild with any iOS 5 beta - yet.

02-Aug-2011 07:28 PM Ortwin Gentz:
We're now able to reproduce this issue. It still occurs in iOS 5.0 beta 4.

The reason lies in the way we create the "displayedPerson" object. We basically have an addressDictionary in the format how it is returned by the reverse geocoder. This dictionary seems to be 100% compatible to the keys of a kABPersonAddressProperty but it's not. It contains a "FormattedAddressLines" key that AddressBook does not support. When we make sure, the kABPersonAddressProperty only contains documented keys, the exception does not occur.

It would be desirable if the system would be more fault tolerant here and wouldn't crash on unsupported keys, especially since the addressDictionary returned by MKReverseGeocoder and CLGeocoder looks so similar to ABAddressBook's kABPersonAddressProperty.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!