locked
Visual Studio hangs

    Question

  • Hello,

    Just fyi.

    Up until now vs was working very well.  Today I was prompted to update vs.  After upgrade, vs hangs almost every time I use it.  Usually on exit.  It seems that intellisense is involved but I'm not sure.  There is a background process (c++ pkg svr) which is running at 28% cpu.  This can happen immediately after opening a solution.

    Advice is don't upgrade unless something is broken.  

    VS 2012 hangs with C++ pkg svr at 28%
    Visual Studio 2012 express for Windows 8 apps
    Version 11.0.51106.01
    Hangs frequently especially on exit
    Visual C++ Package server (32bit) 28%
    Intel i5-2320 3GHz
    8gb ram
    • Moved by Jesse Jiang Monday, January 21, 2013 6:35 AM
    Saturday, January 19, 2013 8:59 PM

Answers

  • Okay, this is a familiar bug.  We have a fix for this internally, and it looks like it should be available in the next update to VS 2012.  I don't think I can give exact dates, but it should be available in the next couple of months, and maybe earlier as a CTP.  For now, your best bet is to surround the overloads with the __INTELLISENSE__ guard I described a couple posts up.  The code should appear greyed out in the editor.

    This particular problem is caused by the IntelliSense parser getting stuck in an infinite loop while parsing multiple function overloads (three or more) in a partial class, which the Windows Store App templates make heavy use of to support XAML.

    Please let me know if this helps!

    Jamie Eckman
    Visual C++ Team

    Wednesday, January 30, 2013 1:03 AM

All replies

  • Update...

    I created a simple blankpage app and started copying and pasting code from the old app to the new one.  It seems that every time I paste in code, the C++ pkg svr process goes into action but only up to about 8% and then immediately goes back down.  After pasting in a few more items though, pkg svr would frequently go up to 28% and would not go back down.  That's when I cannot exit from vs.  I hope there is a way I can revert back to the installation I had before the update.

    I would sure appreciate it if some one has a fix for this.  My store app is now on hold.

    Thank you

    Saturday, January 19, 2013 11:23 PM
  • I uninstalled vs and re-installed what I had before (11.0.50727.1 RTMREL).  And I still have the same problem:(

    Disabled intellisense and the problem went away.  But now I'm a little handicapped. 

    Sunday, January 20, 2013 12:01 AM
  • Are you willing to share the code you're pasting into VS that is hanging the vcpkgsrv.exe process?  This is certainly something we'd like to fix.  If you'd like to e-mail me privately with details, my e-mail address is my first name @microsoft.com.

    Thank you very much.

    Jamie Eckman
    Visual C++ Team

    Monday, January 28, 2013 6:26 PM
  • I've got the same problem.

    Because of the background process (c++ pkg svr) is VS freezing.

    It takes about 80% CPU usage on my System. My System configuration is nearly the same as yours.

    Also IntelliSense isn't working at all

    Visual Studio 2012 express for Windows 8 apps
    Version 11.0.51106.01
    Hangs nearly after every start!
    Visual C++ Package server (32bit) 28%
    Intel i5-2500k 3.5GHz
    NVIDIA GeForce GTX570
     8gb RAM

    Monday, January 28, 2013 11:48 PM
  • If you're willing to share your code with me, or at least a snippet of the code that reproduces the hang, please contact me at my first name @microsoft.com.  I can try to find a fix and/or workaround to get IntelliSense working for you again.

    In the meantime, you can disable IntelliSense by going to Tools -> Options..., navigating to Text Editor -> C/C++ -> Advanced, and changing the "Disable IntelliSense" option from false to true.

    Jamie Eckman
    Visual C++ Team

    Tuesday, January 29, 2013 12:06 AM
  • I was just reminded of another potential workaround that would let you keep IntelliSense working for some or most of your project.  You can place the following preprocessor guard around the file or section of code IntelliSense is having trouble with:

    #ifndef __INTELLISENSE__

    //...
    // code causing IntelliSense trouble
    //...

    #endif

    Note that there are two underscores on either side of __INTELLISENSE__.  If vcpkgsrv.exe is already hung when you insert this into your code, you may need to reload your project or Visual Studio (or just end the vcpkgsrv.exe process via Task Manager) before you'll see the benefit.

    Jamie Eckman
    Visual C++ Team

    Tuesday, January 29, 2013 12:51 AM
  • Hi Jamie,

    Thanks for the response.  I will try to come up with a simple scenario which will consistently reproduce the problem.  Won't be able to get to it until this weekend though.

    Gary

    Tuesday, January 29, 2013 2:54 AM
  • Thanks Gary, I look forward to hearing from you.

    Jamie Eckman
    Visual C++ Team

    Tuesday, January 29, 2013 6:38 PM
  • I had an extra few minutes this morning and I found something simple that will reproduce this both on my home computer and at work.

    1) Create a new store app - blank app

    2) paste the following lines in one of the header files (App.xaml.h or MainPage.xaml.h)

    private:
    void AddStatus ( const std::wstring& msg, int val, bool success=true );
    void AddStatus ( const std::wstring& msg, bool success=true );
    void AddStatus ( Platform::String^ smsg, bool success=true );
    void HandleException ( const std::wstring& msg, Platform::Exception^ e );

    3) Watch the vc++ package svr in task mgr

    Tuesday, January 29, 2013 7:09 PM
  • Okay, this is a familiar bug.  We have a fix for this internally, and it looks like it should be available in the next update to VS 2012.  I don't think I can give exact dates, but it should be available in the next couple of months, and maybe earlier as a CTP.  For now, your best bet is to surround the overloads with the __INTELLISENSE__ guard I described a couple posts up.  The code should appear greyed out in the editor.

    This particular problem is caused by the IntelliSense parser getting stuck in an infinite loop while parsing multiple function overloads (three or more) in a partial class, which the Windows Store App templates make heavy use of to support XAML.

    Please let me know if this helps!

    Jamie Eckman
    Visual C++ Team

    Wednesday, January 30, 2013 1:03 AM
  • Great!!  I can work around until the fix.  

    Thanks!


    SAP

    Wednesday, January 30, 2013 1:06 AM
  • Appears to have been fixed in 11.0.60315.01 Update 2.

    SAP

    Monday, April 22, 2013 11:26 PM
  • Don't worry, Update 3 brings it back :)
    Tuesday, August 20, 2013 3:52 PM