Bug 10952 - Designer crashes when opening layout file
Summary: Designer crashes when opening layout file
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Designer ()
Version: 4.2.x
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Lluis Sanchez
URL:
Depends on:
Blocks:
 
Reported: 2013-03-06 18:14 UTC by Bryan Moulton
Modified: 2014-03-27 06:58 UTC (History)
3 users (show)

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


Attachments
ModifyData.axml (5.93 KB, application/octet-stream)
2013-03-06 18:14 UTC, Bryan Moulton
Details
Sample project which demonstrates the crashing behavior (20.74 KB, application/octet-stream)
2013-03-12 10:03 UTC, bvsimmons1204
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 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:
Status:
VERIFIED FIXED

Description Bryan Moulton 2013-03-06 18:14:21 UTC
Created attachment 3543 [details]
ModifyData.axml

Designer crashes when opening attached file.

System.NullReferenceException: Object reference not set to an instance of an object
  at Xamarin.AndroidDesigner.AndroidDesignerSession+<HasChangePropagationConflicts>c__AnonStorey42.<>m__69 (Xamarin.AndroidDesigner.Resources.QualifierValue q) [0x00000] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/c3584fce/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/AndroidDesignerSession.cs:1442 
  at System.Linq.Enumerable.Any[QualifierValue] (IEnumerable`1 source, System.Func`2 predicate) [0x00000] in <filename unknown>:0 
  at Xamarin.AndroidDesigner.AndroidDesignerSession.HasChangePropagationConflicts (Xamarin.AndroidDesigner.ItemData data) [0x0000d] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/c3584fce/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/AndroidDesignerSession.cs:1442 
  at Xamarin.AndroidDesigner.AndroidDesignerSession.PropagateInsertChild (Xamarin.AndroidDesigner.ItemData parentData, Xamarin.AndroidDesigner.ItemData child, Int32 index) [0x00011] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/c3584fce/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/AndroidDesignerSession.cs:1576 
  at Xamarin.AndroidDesigner.AndroidDesignerSession.InsertChild (Xamarin.AndroidDesigner.AndroidDesignerItem parent, System.Xml.Linq.XElement elem, Int32 index, System.String id, System.Collections.Generic.Dictionary`2 overlayProps, Boolean initializeNewItem) [0x0025d] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/c3584fce/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/AndroidDesignerSession.cs:2268 
  at Xamarin.AndroidDesigner.AndroidDesignerSession.InsertChild (Xamarin.AndroidDesigner.AndroidDesignerItem parent, System.Xml.Linq.XElement elem, Int32 index, System.String id) [0x00000] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/c3584fce/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/AndroidDesignerSession.cs:2201 
  at Xamarin.AndroidDesigner.AndroidDesignerSession.InsertChild (Xamarin.AndroidDesigner.AndroidDesignerItem parent, System.Xml.Linq.XElement elem, Int32 index) [0x00000] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/c3584fce/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/AndroidDesignerSession.cs:2196 
  at (wrapper remoting-invoke-with-check) Xamarin.AndroidDesigner.AndroidDesignerSession:InsertChild (Xamarin.AndroidDesigner.AndroidDesignerItem,System.Xml.Linq.XElement,int)
  at Xamarin.AndroidDesigner.Layouts.TableRow.AddMissingPlaceholders (Int32 ncols) [0x00101] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/c3584fce/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner.Layouts/TableRow.cs:308 
  at Xamarin.AndroidDesigner.Layouts.TableLayout.InitializeForDesigner () [0x00039] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/c3584fce/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner.Layouts/TableLayout.cs:123 
  at Xamarin.AndroidDesigner.AndroidDesignerItem.InitializeForDesigner () [0x0001d] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/c3584fce/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/AndroidDesignerItem.cs:100 
  at Xamarin.AndroidDesigner.AndroidDesignerSession.InitializeItem (Xamarin.AndroidDesigner.AndroidDesignerItem item) [0x0000e] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/c3584fce/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/AndroidDesignerSession.cs:1000 
  at Xamarin.AndroidDesigner.AndroidDesignerSession.InitLayoutXml (Xamarin.AndroidDesigner.LayoutInfo layout) [0x0002e] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/c3584fce/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/AndroidDesignerSession.cs:1167 
  at Xamarin.AndroidDesigner.AndroidDesignerSession.LoadLayoutXml (System.String path) [0x000ac] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/c3584fce/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/AndroidDesignerSession.cs:1140 
  at Xamarin.AndroidDesigner.AndroidDesignerSession.InitSession () [0x0017f] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/c3584fce/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/AndroidDesignerSession.cs:1066 
  at Xamarin.AndroidDesigner.AndroidDesignerSession.DoRefresh (Boolean asyncRefresh) [0x00014] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/c3584fce/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/AndroidDesignerSession.cs:911 
  at Xamarin.AndroidDesigner.AndroidDesignerSession.<Refresh>m__54 (System.Object ) [0x00000] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/c3584fce/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/AndroidDesignerSession.cs:901
Comment 1 Lluis Sanchez 2013-03-12 05:33:49 UTC
What's your version of Xamarin Studio or MonoDevelop?
Comment 2 Lluis Sanchez 2013-03-12 05:40:20 UTC
Do you have alternative versions of this layout in other layout_* directories? I so, having them would be helpful.
Comment 3 bvsimmons1204 2013-03-12 10:03:37 UTC
Created attachment 3578 [details]
Sample project which demonstrates the crashing behavior

Yes this is a file with the same name in a different layout-* directory.

Hope this helps
Comment 4 Lluis Sanchez 2013-03-12 11:25:47 UTC
Thanks for the sample project. Fixed in master.
Comment 5 Atin 2014-03-27 06:58:31 UTC
Today, we have checked this issue with:

XS 4.2.4(build 266)- 57fa6b7639703775ae1d5c46536e42ab424cb177
X.Android 4.13.0

Now this issue is not exist, we are successfully able open Android designer of attached file in the bug. Hence marking this as verified.