Bug 7149 - Monodev crashing while loading layout.
Summary: Monodev crashing while loading layout.
Alias: None
Product: Android
Classification: Xamarin
Component: Designer ()
Version: 4.2.x
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: Lluis Sanchez
: 6355 6990 7022 7047 7105 7194 7403 7404 7481 8135 ()
Depends on:
Reported: 2012-09-13 11:31 UTC by Jean-Louis
Modified: 2014-03-27 10:27 UTC (History)
12 users (show)

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

Small example project that crashes (19.19 KB, application/octet-stream)
2012-09-14 12:24 UTC, Jean-Louis

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 Jean-Louis 2012-09-13 11:31:59 UTC
To whom it may concern.

For some reason my monodev is crashing every time I try to open and load a layout (Fatal Error).

This happens with select .axml files and if I delete the file from my system this happens to another random file.

This is not with all my .axml files only a couple for some reason. 

As you can imagine this is very frustrating.

This is the stack trace.

System.NullReferenceException: Object reference not set to an instance of an object.
   at Xamarin.AndroidDesigner.Layouts.TableRow.AddMissingPlaceholders(Int32 ncols)
   at Xamarin.AndroidDesigner.Layouts.TableLayout.InitializeForDesigner()
   at Xamarin.AndroidDesigner.AndroidDesignerItem.InitializeForDesigner()
   at Xamarin.AndroidDesigner.AndroidDesignerItem.InitializeForDesigner()
   at Xamarin.AndroidDesigner.AndroidDesignerSession.InitializeItem(AndroidDesignerItem item)
   at Xamarin.AndroidDesigner.AndroidDesignerSession.InitLayoutXml(LayoutInfo layout)
   at Xamarin.AndroidDesigner.AndroidDesignerSession.LoadLayoutXml(String path)
   at Xamarin.AndroidDesigner.AndroidDesignerSession.InitSession()
   at Xamarin.AndroidDesigner.AndroidDesignerSession.DoRefresh(Boolean asyncRefresh)
   at Xamarin.AndroidDesigner.AndroidDesignerSession.<Refresh>b__1f(Object )
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
Comment 1 Chris Hardy [MSFT] 2012-09-14 10:33:14 UTC
This is the same issue as mentioned here with a repro: https://xamarin.desk.com/agent/case/16510
Comment 2 Dylan 2012-09-14 12:09:55 UTC
I can confirm this is a critical issue. MonoDevelop designer is extremely unstable, especially when working with TableLayouts. I will try post an example project.
Comment 3 Jean-Louis 2012-09-14 12:24:13 UTC
Created attachment 2537 [details]
Small example project that crashes

This is an example project that will crash when you try and open the QQReplyLayout.axml file through the designer. 

(Running monodev and 4.2.5 mono for android)
Comment 5 Lluis Sanchez 2012-09-14 14:57:02 UTC
*** Bug 7022 has been marked as a duplicate of this bug. ***
Comment 6 Lluis Sanchez 2012-09-14 15:07:21 UTC
Fixed in master in 3.0.4 branch
Comment 7 Lluis Sanchez 2012-09-15 12:57:01 UTC
*** Bug 7194 has been marked as a duplicate of this bug. ***
Comment 8 Lluis Sanchez 2012-09-17 11:17:36 UTC
*** Bug 6355 has been marked as a duplicate of this bug. ***
Comment 9 Lluis Sanchez 2012-09-27 13:47:51 UTC
*** Bug 7047 has been marked as a duplicate of this bug. ***
Comment 10 Lluis Sanchez 2012-09-27 13:48:17 UTC
*** Bug 7105 has been marked as a duplicate of this bug. ***
Comment 11 Lluis Sanchez 2012-09-27 13:48:47 UTC
*** Bug 7481 has been marked as a duplicate of this bug. ***
Comment 12 Lluis Sanchez 2012-09-27 13:52:59 UTC
*** Bug 7404 has been marked as a duplicate of this bug. ***
Comment 13 Lluis Sanchez 2012-11-02 13:57:19 UTC
*** Bug 6990 has been marked as a duplicate of this bug. ***
Comment 14 Lluis Sanchez 2012-11-16 11:38:56 UTC
*** Bug 8135 has been marked as a duplicate of this bug. ***
Comment 15 Lluis Sanchez 2012-11-16 11:58:27 UTC
*** Bug 7403 has been marked as a duplicate of this bug. ***
Comment 16 Chris Hardy [MSFT] 2012-11-26 16:21:27 UTC
Lluis - what version of Mono for Android did this make it into?
Comment 17 Danish Akhtar 2014-03-27 10:27:03 UTC
Today, I have checked this issue with:
XS 4.2.4(build 266)
X.Android 4.13.00004
Windows 8

We are successfully able to open the layout file of attached sample project in Bug, without any error.

Hence closing this issue.