Bug 3920 - Sample 'Shared Resources' crash in address book feature
Summary: Sample 'Shared Resources' crash in address book feature
Alias: None
Product: iOS
Classification: Xamarin
Component: Samples ()
Version: 5.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Vincent Dondain [MSFT]
Depends on:
Reported: 2012-03-15 15:49 UTC by PJ
Modified: 2014-07-25 12:27 UTC (History)
4 users (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 PJ 2012-03-15 15:49:31 UTC
System.NullReferenceException: Object reference not set to an instance of an object
  at Example_SharedResources.Screens.iPhone.Contacts.AddressBookScreen.BtnAddPhoneNumberTouchUpInside (System.Object sender, System.EventArgs e) [0x00013] in /Users/pjbeaman/GitHubRepositories/monotouch-samples/SharedResources/SharedResources/Screens/iPhone/Contacts/AddressBookScreen.xib.cs:141 
  at MonoTouch.UIKit.UIControlEventProxy.Activated () [0x00000] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIControl.cs:30 
  at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00042] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:29 
  at Example_SharedResources.Application.Main (System.String[] args) [0x00000] in /Users/pjbeaman/GitHubRepositories/monotouch-samples/SharedResources/SharedResources/Application.cs:12 

Steps to reproduce:

1. Run or Debug the app.
2. Go to Address Book
3. Next to 'Number' text box, hit the blue (+) button.
4. Crash.

If you 'Ran' the app, you will have to re-open Application Output to see the trace.
Comment 1 PJ 2012-03-15 15:50:08 UTC
MT 5.2.9
Mono 2.10.9
Comment 2 Oleg Demchenko 2014-01-27 18:31:49 UTC
Fix commit for this issue: eb28f1eba6f599325da852fa0f98fc70ce0451da
Comment 3 Tajinder Singh 2014-03-13 10:00:28 UTC
I have checked this issue with the following builds:

Environment details:
XS 4.2.4 (build 32)
Mono 3.2.6
iPhone 5S -7.1
iPod 6.1

App is still getting crashed by tapping on + button from the address book.This issue still exist with both device and simulator also.I have attached screen cast for the simulator

Screencast Info:http://screencast.com/t/eBhCcfS7b2
Sample Info:monotouch-samples-master440638094561f66c8f24efa1c6cc2992d20b667c

Hence reopening this issue.
Comment 4 Vincent Dondain [MSFT] 2014-07-25 12:27:37 UTC
#Fixed in push: 0817cdf

- We had some missing error messages for the user. Now the user has to select a contact first end then, will be able to edit it or add new phone numbers. With the previous solution we tried to add info to a null contact (not selected by the user).