Designer crash when opening xml file

RonnyBattyRonnyBatty GBMember
edited September 2013 in Visual Studio

Hi there,

I've tested this with multiple projects and it even happens with the HelloWorld sample. When I open a layout resource file with the layout editor, Xamarin Studio crashes with the following information:

Problem signature:
Problem Event Name: APPCRASH
Application Name: XamarinStudio.exe
Application Version:
Application Timestamp: 5202caca
Fault Module Name: libglib-2.0-0.dll
Fault Module Version:
Fault Module Timestamp: 50b4fecd
Exception Code: 40000015
Exception Offset: 0005e17b
OS Version: 6.1.7601.
Locale ID: 2057
Additional Information 1: 4c60
Additional Information 2: 4c609b9ee6afc206f5625ac60d945848
Additional Information 3: 4485
Additional Information 4: 448588a8947829fb230815c328c1a6d2

I have the latest stable releases of Xamarin Studio (4.0.12) and Xamarin.Android (4.8.1) on Windows 7, I've also tried the latest releases on both the Beta and Alpha channels but the problem still exists. This seems to have started happening from nowhere and I've tried just about everything, including a re-install of both Studio and Xamarin.Android.

The IDE log file also contains this dubious little entry:

ERROR [2013-09-27 15:09:26Z]: Add-in error (MonoDevelop.Xamarin.Ide,4.0.12): Error while getting object for node in path '/MonoDevelop/DesignerSupport/PropertyProviders'.
System.InvalidOperationException: Type 'Xamarin.Ide.Components.ComponentReferencePropertyProvider' not found in add-in 'MonoDevelop.Xamarin.Ide,4.0.12'
at Mono.Addins.RuntimeAddin.GetType(String typeName, Boolean throwIfNotFound)
at Mono.Addins.TypeExtensionNode.get_Type()
at Mono.Addins.TypeExtensionNode.CreateInstance()
at Mono.Addins.InstanceExtensionNode.GetInstance(Type expectedType)
at Mono.Addins.ExtensionNode.GetChildObjectsInternal(Type arrayElementType, Boolean reuseCachedInstance)

Any help would be greatly appreciated.



  • RonnyBattyRonnyBatty GBMember
    edited September 2013

    Took a LOT longer than expected but have finally got the designer working again.

    I had tried re-installing everything (Xamarin Studio, Xamarin.Android, GTK Sharp, the ADT bundle) and also upgraded the JDK to the latest version, but none of this made any difference.

    Turns out, that after uninstalling Xamarin Studio there are still files left behind in the %USER%\AppData\Local and Roaming folders (inside Xamarin and XamarinStudio-4.0 folders). Deleting these folders before re-installing Studio gave me a completely clean install.

    I still have no idea which of these files was causing the problem or how the corruption occurred (possibly EditingLayout.xml in the Config folder?). Maybe the error info I supplied means a bit more to one of the Xamarin guys as it didn't really help me much :(

    Up and running again though, hopefully this proves useful to someone.

  • mhutchmhutch USMember, Xamarin Team Xamurai

    Thanks for the update. I would guess the issue would be in the addin cache in %USER%\AppData\Local\XamarinStudio-4.0\Cache so in future I would suggest trying to remove this first.

  • Rex232Rex232 USMember ✭✭

    i had same problem and i tried to remove the cache, it still happen~~ please helppp

  • LluisSanchezLluisSanchez ESXamarin Team Xamurai

    @Rex232 which Xamarin Studio version do you have? Can you attach the IDE log file? (to find it, click on Help -> Open Log Directory)

  • Rex232Rex232 USMember ✭✭

    here is it. I just try to update the gtk-sharp-2.12.22, it still not work

  • mhutchmhutch USMember, Xamarin Team Xamurai

    @Rex232: That's XS 4.0.13, can you try with 4.2.2?

  • JustinTothJustinToth USMember ✭✭

    I had the same issue in Xamarin Studio 4.2.2 (build 2). The steps I took were:

    1. Create an Android application project.
    2. Change a Strings.xml key, in my case "hello" to "hello_android".
    3. Open Resources/layout/Main.axml, which causes the IDE to crash.

    I couldn't figure out how to clear the cache since the path above is for Windows and I'm on OSX. I'm guessing it was crashing because it was looking for Resource.Strings.hello in the layout axml file, whereas I had changed it to Resource.Strings.hello_android. I ended up having to change the "hello_android" key back to "hello", then reopened the app and tried to open the layout axml file. It crashed again, and the next 5 times or so it kept crashing. Then I waited a few minutes, opened it again, and it opened fine. So I think it was the Strings key not existing, plus some caching, that caused the issue.

    It's concerning though because if the issue I ran into isn't isolated, then it means that you can't change String key names once they're used in layout files.

    Hopefully this gives the developers some more information to go on to reproduce the problem.

  • LluisSanchezLluisSanchez ESXamarin Team Xamurai

    @JustinToth Please try 4.2.3. Several designer crashers have been fixed in this release. If after updating the IDE still crashes when changing Strings.xml, please let me know.

  • This update fixed tons of crashes here, my Xamarin was unusable. Yay!

  • SteveHatchSteveHatch USMember ✭✭

    I have this same problem, I have 4.2.3 of Xamarin Studio but am trying to launch the designer from visual studio 2013. The first attempt stalls for a few seconds then says that the designer is not connected and to close and try again. I try again and it crashes visual studio and I have to restart it. I uninstalled all Xamarin products, cleared the cache files and reinstalled everything, still crashes- I really need this to work, I am under the gun, what can I do?

  • SteveHatchSteveHatch USMember ✭✭

    Follow up, this may not be the same problem, I am trying to open a axml file within Visual Studio.

  • JamesMontemagnoJamesMontemagno USForum Administrator, Xamarin Team, Developer Group Leader Xamurai

    Please see: for work around

Sign In or Register to comment.