locked
Visual Studio hangs when editing XAML in C++ project

    Question

  • I am experiencing this a lot in the developer preview, VS11 just hangs (the CPU loading goes 100%) whenever I add a ListView, ComboBox or other containers to XAML in a C++ project. Then I have to end the process from Task Manager, and restart. But the only way to get it work is editing the XAML file in notepad and then open it in VS. Obviously, that is not a solution. Does anyone know a solution to this?

    UPDATE: it is actually XDesProc.exe that is hanging. This is the designer process. After I kill this process, I can reload the designer and then it goes well. Only for a very short while until the designer hangs again.


    Microsoft MVP VC++ | www.mariusbancila.ro/blog | www.codexpert.ro
    Tuesday, September 20, 2011 8:40 PM

All replies

  • Rather than editing in notepad, you can edit the text in VS11 if you maximize the xaml text window.  This also should prevent the designer from hanging your machine.

    Tuesday, September 20, 2011 11:50 PM
  • Hi Marius,

    how long does it max out the CPU?  What are the exact steps to repro when you notice the hange.g.

    1. in VS Create an application that utilizes XAML e.g. WPF, metro Application, etc..

    2. open up one of the XAML files.

    3. Add a control

    4. additional steps?

    We might want to capture a dump of xdesproc.exe while VS11 is in the hang state but let's see if I can reproduce this locally first. 

     

    much appreciated,

    Mike Wong

    Microsoft Developer Support

    Wednesday, September 21, 2011 12:14 AM
    Moderator
  • Marius / Mike, it will be really useful if you can share more details on this scenario with us. You can send the detailed repro steps and dump file to me at navits at microsoft dot com and we will take a look at this on priority.

    Thanks,

    Navit Saxena


    Wednesday, September 21, 2011 12:30 AM
  • I want to note something first: it was the designer, not VS that was hanging. As soon as xdesproc.exe was killed, I could continue working in VS.

    So here is what I did:

    • I created a metro application from the C++ template
    • opened the XAML file that was created by the wizard and started added controls (grid, labels, buttons, textblocks, etc.); when I say adding I mean by directly editing the XAML code in the editor
    • I've noticed that each time I added a ListView or a ComboBox the designer hanged; eventually I realized that I can work around it just by killing xdesproc.exe and reloading the designer from Visual Studio
    • In addition to the listview and combo addition, the designer also seemed to hang "randonly"; just as I was editing something, or scrolling through the code

    I must mentioned that it happened a lot of time. Perhaps 20-30 times in one hour, one hour and a half. At some point it became almost impossible to continue due to the frequency of the hangs.

    I will try to make a dump of xdesproc.exe and I will send it to you.


    Microsoft MVP VC++ | www.mariusbancila.ro/blog | www.codexpert.ro
    Wednesday, September 21, 2011 9:04 PM
  • Hi Marius,

    a dump would be great.  Please send me an email to mikewong at microsoft.com and I will send an upload location since the dump will be too large as an email attachment.  Also, a convenient way of getting the dump is to go to task manager click on more details, details tab, right click on xdesproc.exe and select create dump file.

     

    thanks!

    mike

    Thursday, September 22, 2011 8:11 PM
    Moderator
  • Marius --

     

    Can you share some information with me about your system?  Are you running VS inside virtualization?  If so, which virtualization environment are you using? (Hyper-V, VMWare, Parallels, etc).  Also, if virtualizing, what is the host OS? Windows / Linux / Mac, etc?  Finally, if you're not running in a virtual environment can you tell me what video card and driver you're using?  How about if you were running from the console or from a remote desktop session?

     

    My analysis of a crash dump Navit sent me looks like a similar hang we've seen while rendering to a virtualized graphics card under Parallels, which is why I'm asking so many questions about the environment you're running.

     

    Thanks,

    Brian Pepin, Expression Blend


    Cider Architect, Microsoft
    Tuesday, October 25, 2011 6:57 PM
  • I found your post after having the same problem, though I'm simply using a C# Metro project in the Consumer Preview.  One thing I noticed, I'm running a VM in Virtual Box and it seems like a problem between the video driver and for-mentioned XDesProc.exe process.  I usually RDP into the VM and have had no trouble, but have needed to connect directly to the VM using it own renderer as I'm testing some network error handling code and intentionally cutting off my connection(which would of course kill me RDP session ;)).  Anyway, I put this out there for anyone else running VM's with Virtual Box to suggest RDPing as a work around.

    Regards,

    Mike McAulay

    Wednesday, March 21, 2012 11:35 PM
  • Same problem here as "brosten software".

    1) Create new Metro Split application.

    2) Open Visual Designer for either Splitpage.xaml or ItemsPage.xaml

    3) CPU climbs to 100% of which xdescproc uses between 70 and 80%

    Im running Win8 Customer preview and VS11 Beta on Virtual Box.

    Regards,

    Simon Kavanagh

    Thursday, March 22, 2012 1:28 PM
  • It seems it is a Visual designer+XAML related issue.

    I get the exact same behaviour as the two previous people, but when I choose HTML5/JS Split Application, then everything works fine.

    The CPU does NOT peak and the Blend app is stable.

    Incidentally: When I try to edit a Metro-XAML app in the visual designer, I get no properties for any element. The property window is empty.

    Regards,

    K.


    • Edited by kavrod Thursday, March 22, 2012 2:49 PM
    Thursday, March 22, 2012 2:49 PM
  • Hi,

    We have fixed quite a few issues here and expect these to be available in next public release of VS. It will be very useful if you can share the info Brian Pepin requested in the above thread. This will help us to ensure that these issues are indeed fixed.

    The requested info is:

    Can you share some information with me about your system?  Are you running VS inside virtualization?  If so, which virtualization environment are you using? (Hyper-V, VMWare, Parallels, etc).  Also, if virtualizing, what is the host OS? Windows / Linux / Mac, etc?  Finally, if you're not running in a virtual environment can you tell me what video card and driver you're using?  How about if you were running from the console or from a remote desktop session?

     You can send this directly to me at navits at microsoft dot com and I can take a look.

    -Navit Saxena

    Thursday, March 22, 2012 11:02 PM
  • Hi Navit,

    I have the same problem when opening XAML files of a Metro project.

    - Running VS 11 Beta on Windows 8 Consumer preview,  inside VM Ware

    - My machine has Windows 7 64, Ultimate (with McAffee installed)

    Sometimes it works OK, but then it is just impossible.

    Thanks

    Carlos

    Saturday, March 24, 2012 11:42 PM