views:

57

answers:

3

Working on a Win32 DLL using Visual Studio 2008 SP1 and, since yesterday, whenever I try to right click on code, to go to a variable definition for example, VS completely locks up and I have to manually kill the process. To make it even weirder, whenever this happens the devenv.exe process uses exactly 25% of the CPU. And I mean exactly, never 24%, never 26%, always 25%

Also, I've run ProcMon to see if devenv is actually doing something, but it's doing absolutely nothing external of the process. No disk, network, registry access. Nothing.

This is getting really aggravating because I have a large code base to deal with and the only other way of jumping to the definition is to first search for it.

Has anyone run into a similar issue? And, better yet, know a fix?

Edit: More info. Other projects (even an older version of the same one) work fine. I diffed the project file and the only differences is added source files and a /D define in the command line params.

Edit 2: So, it seems that now it's actually because intellisense is stuck updating. For some reason the status bar was disabled, but when getting it back I say "Updating Intellisense... (186)" and from what I've read, that 186 means that there are 186 background threads working. 186?! But, procmon still shows no IO whatsoever.

A: 

This is getting really aggravating because I have a large code base to deal with and the only other way of jumping to the definition is to first search for it.

I dont have an answer to your problem, but you can navigate through your code with F12 and ctrl + - quite nicely.

Sdry
+1  A: 

Try deleting all .sbr .bsc and .pdb files.

For the 25% CPU load: I guess it uses one core on your quad core machine.

If you have Visual Assist installed, try disabling it.

Henrik
No luck... deleted all of that. Don't have Visual Assist. Still same thing. And, actually, it's 25% load on one core.
Adam Haile
A: 

On connect, a submitted bug: Visual Studio Hang, seems to closely resemble your issue:

At random times, when I right click in the text editor, in this case C/C++ editor, Visual Studio will just hang. And if I wait it out, it still hangs.

It seems the workaround is to exit Visual Studio and delete the intellisense (.ncb) file in your project directory and reopen it.

The issue you are seeing is an intermittent failure in prior versions of Visual C++ that is hard to diagnose, and has a relatively simple workaround, as you have discussed, which is to delete your NCB. In order to get proper intellisense for header files, they would need to be included by a .cpp file in your project (directly, or indirectly through another header.)

Joshua
Wish that was the solution, but I have deleted the NCB file a million times. Even just ran it on a coworkers machine, completely fresh, no extraneous files and it happens the first time you try the right click.
Adam Haile