Bug 23731 - Absent Info.plist causes Visual Studio to crash when switching between iOS project property tabs
Summary: Absent Info.plist causes Visual Studio to crash when switching between iOS pr...
Status: CLOSED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 3.7
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-10-10 00:10 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2014-11-11 11:06 UTC (History)
8 users (show)

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


Attachments
Test case (8.88 KB, application/zip)
2014-10-10 00:10 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Details
Screen capture of the steps to crash (628.15 KB, application/x-shockwave-flash)
2014-10-10 00:12 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Details


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 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:
Status:
CLOSED FIXED

Description Brendan Zagaeski (Xamarin Team, assistant) 2014-10-10 00:10:00 UTC
Created attachment 8372 [details]
Test case

Absent Info.plist causes Visual Studio to crash when switching between iOS project property tabs.


## Steps to reproduce

1. Open the attached test case (or create a new template iOS project and delete the `Info.plist` file using Windows Explorer).

2. Open the project properties for iPhoneApp1.

3. Click down through the list of iOS project property tabs, one at a time:

- iOS Build
- iOS Bundle Signing
- iOS IPA Options
- iOS Application
- iOS Run Options
- iOS Crash Reporting

(Screen capture attached)


## Result

Visual Studio crashes with the following managed exception:

> System.NullReferenceException was unhandled
> Message: An unhandled exception of type 'System.NullReferenceException' occurred in Xamarin.VisualStudio.IOS.dll
> Additional information: Object reference not set to an instance of an object.
>    at Xamarin.VisualStudio.IOS.Widgets.PListExtensions.GetUIStatusBarStyle(Xamarin.MacDev.PDictionary dict = null)	
>    at Xamarin.VisualStudio.IOS.Widgets.IPhoneIPodDeploymentInfoPanel.BindControls(Xamarin.MacDev.PDictionary infoPlist = null)	
>    at Xamarin.VisualStudio.IOS.PropertyPages.IOSApplication.OnBindControls()	
>    at Xamarin.VisualStudio.TastyPropertyPage.SetObjects(uint cObjects, object[] ppunk = {object[1]})	
>    at Microsoft.VisualStudio.Editors.PropPageDesigner.PropPageDesignerView.CallPageSetObjects(object[] Objects)	
>    at Microsoft.VisualStudio.Editors.PropPageDesigner.PropPageDesignerView.SetObjectsForSelectedConfigs()	
>    at Microsoft.VisualStudio.Editors.PropPageDesigner.PropPageDesignerView.Init(EnvDTE.Project DTEProject, Microsoft.VisualStudio.OLE.Interop.IPropertyPage PropPage = {Xamarin.VisualStudio.IOS.PropertyPages.IOSApplication}, Microsoft.VisualStudio.Editors.ApplicationDesigner.PropertyPageSite PropPageSite, Microsoft.VisualStudio.Shell.Interop.IVsHierarchy Hierarchy, bool IsConfigPage)	
>    at Microsoft.VisualStudio.Editors.ApplicationDesigner.ApplicationDesignerView.ShowTab(int Index = 8, bool ForceShow)	
>    at Microsoft.VisualStudio.Editors.ApplicationDesigner.ApplicationDesignerView.OnItemClick(Microsoft.VisualStudio.Editors.ApplicationDesigner.ProjectDesignerTabButton item)	
>    at Microsoft.VisualStudio.Editors.ApplicationDesigner.ProjectDesignerTabButton.OnClick(System.EventArgs e)	
>    at System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs mevent = {X = 84 Y = 11 Button = Left})	
>    at System.Windows.Forms.Control.WmMouseUp(ref System.Windows.Forms.Message m, System.Windows.Forms.MouseButtons button, int clicks)	
>    at System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m)	
>    at System.Windows.Forms.ButtonBase.WndProc(ref System.Windows.Forms.Message m)	
>    at System.Windows.Forms.Button.WndProc(ref System.Windows.Forms.Message m)	
>    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m)	
>    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m)	
>    at System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg = 514, System.IntPtr wparam, System.IntPtr lparam)	


## Additional results

In the attached test case, the iOS project property tabs appear _below_ the other project property tabs. When the `Info.plist` file is present, the iOS project property tabs appear _above_ the other tabs.


## Version information

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

Xamarin   3.7.206.0 (0426176befc5e6c73e67669cb2ab2010b9e0f79b)
Xamarin.Android   4.18.0.32 (04399d62cfc00624d575239d1762ea4fd6d012e2)
Xamarin.iOS   8.2.0.0 (ff9d4a06f588a29e1db224ecd4216f68a9106299)
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2014-10-10 00:12:32 UTC
Created attachment 8373 [details]
Screen capture of the steps to crash
Comment 2 Sadik Ali 2014-10-13 05:02:29 UTC
I have checked this issue and I am able to reproduce this issue with the steps provided in bug description.

I have checked this issue with attached sample and I observed when I switch between iOS project property tabs VS is crashed. I have also tried the same by creating an iOS application and deleted the Info.plist file and I observed that VS is also crashed.

Note: VS always crashes when I click on "iOS Application" tab.

Screencast: http://www.screencast.com/t/dYqyn26LyWiw
IDE logs: https://gist.github.com/anonymous/237a953d1bde0382ade2

Environment Info:

Windows Info :

Windows 7
Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.50938
Installed Version: Professional
Xamarin  3.8.13.0 (bac482f9243027fe741cdc40d8b896113d34cf7f)
Xamarin.Android  4.18.0.34 (3b7ef0a796e8744972c48034403a6e7cb7ec189e)
Xamarin.iOS   8.2.0.0 (13fec5ef6bd1d2992ae58cc5147d0e3f988792ca)

Mac Info:

Mac OS X 10.9.5
Xamarin Studio: 5.5 (build 227)
Mono 3.10.0 ((detached/633e444)
GTK+ 2.24.23 (Raleigh theme)
Xcode 6.0.1 (6528)
Xamarin.iOS: 8.2.0.196 (Business Edition)
Comment 3 Juan Marcelo Tondato 2014-10-16 10:35:20 UTC
Wrench: 12bac300effbee09804f2d7d253b4b17ccf104b7
Commit: 31339c4af9f580ac540913d2dba8f13923b17c14
Comment 4 Udham Singh 2014-11-06 12:44:37 UTC
I have checked this issue on builds below.

Windows 8
VS 2013
Xamarin 3.8.113.0
Xamarin.iOS Build Host 8.4.0.28

Now this is working fine, Hence closing this issue.

Screencast : http://www.screencast.com/t/QdJ5dlQUJ
Comment 5 Ian Ceicys 2014-11-11 11:06:54 UTC
This issue has been verified by QA and is fixed. Closing this bug.