Bug 8662 - ArgumentNullException when enumerating all contacts on a users device
Summary: ArgumentNullException when enumerating all contacts on a users device
Alias: None
Product: Mobile API (Preview)
Classification: Xamarin
Component: Xamarin.iOS ()
Version: Preview 0.6
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Eric Maupin
Depends on:
Reported: 2012-11-29 12:20 UTC by AndyW
Modified: 2012-12-11 21:19 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description AndyW 2012-11-29 12:20:31 UTC
I've hit a ArgumentNullException when enumerating a users addressbook. Please see below the stacktrace below. Please let me know if theres anything else you need, unfortunately this is on a remote users device - so specifics might be difficult.

Type: System.ArgumentNullException
	Message: Argument cannot be null.
	Parameter name: label
	StackTrace:   at MonoTouch.AddressBook.ABAddressBook.LocalizedLabel (MonoTouch.Foundation.NSString label) [0x00000] in <filename unknown>:0 
	  at Xamarin.Contacts.ContactHelper.GetLabel (MonoTouch.Foundation.NSString label) [0x00000] in <filename unknown>:0 
	  at Xamarin.Contacts.ContactHelper.<GetContact>m__9 (ABMultiValueEntry`1 a) [0x00000] in <filename unknown>:0 
	  at (wrapper delegate-invoke) <Module>:invoke_Address__this___ABMultiValueEntry`1<NSDictionary> (MonoTouch.AddressBook.ABMultiValueEntry`1<MonoTouch.Foundation.NSDictionary>)
	  at System.Linq.Enumerable+<CreateSelectIterator>c__Iterator1D`2[MonoTouch.AddressBook.ABMultiValueEntry`1[MonoTouch.Foundation.NSDictionary],Xamarin.Contacts.Address].MoveNext () [0x00000] in <filename unknown>:0 
	  at System.Collections.Generic.List`1[Xamarin.Contacts.Address].AddEnumerable (IEnumerable`1 enumerable) [0x00000] in <filename unknown>:0 
	  at System.Collections.Generic.List`1[Xamarin.Contacts.Address]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0 
	  at Xamarin.Contacts.Contact.set_Addresses (IEnumerable`1 value) [0x00000] in <filename unknown>:0 
	  at Xamarin.Contacts.ContactHelper.GetContact (MonoTouch.AddressBook.ABPerson person) [0x00000] in <filename unknown>:0 
	  at System.Linq.Enumerable+<CreateSelectIterator>c__Iterator1D`2[MonoTouch.AddressBook.ABPerson,Xamarin.Contacts.Contact].MoveNext () [0x00000] in <filename unknown>:0
Comment 1 Eric Maupin 2012-12-11 21:19:57 UTC
Should be fixed in the now-available 0.6.1.