Visual Studio .NET 2003 Hangs when clicking on a function

  • Thread starter Thread starter sam c
  • Start date Start date
S

sam c

I have some code that looks a bit like this (note: this isn't the
actual code, it's just here in an attempt to help me explain what
actions I'm doing):

void foo(int bar1)
{
}

void foo(float bar2)
{

foo(3);
}


If I move the cursor by mouse to the word "foo" on the line "foo(3)"
and then do any of the following:

- press "control-f" to search for this function
- hilite the word "foo" by double clicking it and then right click
with the mouse

Then .NET will hang.

It's actually interesting, because if I use the keyboard it seems to
avoid the hang in most cases.

I thought it was an intellisense problem, but I turned off every
intellisense option I could find, and I even tried making the .ncb file
for the solution read only (suggested somewhere else on this forum).

Anyone have any other ideas? Unfortunately I have the bad habit of
doing silly things like clicking on functions with my mouse and then
searching for them, or trying to right click on them to "go to
definition".


thanks,
sam
 
Hi Dave-


I was able to narrow down the problem. If I make a new project
(default win32 console application) and paste the following code into
the .cpp file containing the default implementation of "main()"(ie,
just replace everything in that file with this)


-------------------- begin cut ------------------

// crash2.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}

namespace BAZ
{

I32 Foo(Bar *byzA, Bar *byzB, Rame *res)
{
}

void Foo(Bar *in_byz, Bop *mosh, Bip *bip)
{
}

void Foo(Bar *in_byz, Bip *bip)
{
Foo(&bez, (Bop *)jojo, bip);
}

} // namespace BAZ


------------------------- end cut -------------------------------

Then here are the steps to cause the hang (I tested this on a few other
people's .NET installations here as well)

1) Find the line "Foo(&bez, (Bop *)jojo, bip);"
2) Double click the word "Foo" part the function name is hilited
3) Press "control f" to initialize the find dialog -OR- right click
on the selected "Foo" string and then select "Go To Definition" (I have
the option to initialize the find dialog based on what is hilited, so
that might be part of the reason it crashes when i hit "control-f" --
not positive about that though)
4) Sit and wonder why .NET is hanging and if it is a part of
microsoft's secure computing initiative


Like I said, I've tried this on multiple different computers here and
it hangs on all of them.. The key part seems to be the fact that the
functions are sitting inside the namespace-- if I remove the namespace,
then it doesn't cause a hang.

Are you able to reproduce this at all on your end? I'm still trying to
find an option somewhere that will prevent the hang... argh!

And just to be complete, here is the version info in the "About" window
for my visual studio .net install:

Microsoft Development Environment 2003 Version 7.1.3088
Microsoft .NET Framework 1.1 Version 1.1.4322 SP1
Microsoft Visual C++ .NET 69462-112-0090057-18350

-sam
 
Hi Dave-


I was able to narrow down the problem. If I make a new project
(default win32 console application) and paste the following code into
the .cpp file containing the default implementation of "main()"(ie,
just replace everything in that file with this)

Then here are the steps to cause the hang (I tested this on a few other
people's .NET installations here as well)

1) Find the line "Foo(&bez, (Bop *)jojo, bip);"
2) Double click the word "Foo" part the function name is hilited
3) Press "control f" to initialize the find dialog -OR- right click
on the selected "Foo" string and then select "Go To Definition" (I have
the option to initialize the find dialog based on what is hilited, so
that might be part of the reason it crashes when i hit "control-f" --
not positive about that though)
4) Sit and wonder why .NET is hanging and if it is a part of
microsoft's secure computing initiative


Like I said, I've tried this on multiple different computers here and
it hangs on all of them.. The key part seems to be the fact that the
functions are sitting inside the namespace-- if I remove the namespace,
then it doesn't cause a hang.

Are you able to reproduce this at all on your end? I'm still trying to
find an option somewhere that will prevent the hang... argh!

And just to be complete, here is the version info in the "About" window
for my visual studio .net install:

Microsoft Development Environment 2003 Version 7.1.3088
Microsoft .NET Framework 1.1 Version 1.1.4322 SP1
Microsoft Visual C++ .NET 69462-112-0090057-18350

I haven't tested your particular program, but browse information can
cause some weird stuff. If your project is build with browse info,
rebuild the entire thing. If *parts* of your project are, but others
not, turn it all on or all off.

Also beware of any files on network drives that are unavailable; these
can cause seemingly interminable hangs just about anytime anywhere.
 
I was able to narrow down the problem.

Thanks Sam. I can repro it too.
Then here are the steps to cause the hang (I tested this on a few other
people's .NET installations here as well)

1) Find the line "Foo(&bez, (Bop *)jojo, bip);"

The first time I tried it, It hung for me even before this stage - all
I did was paste your code into the editor, switch to my newsreader to
read your instructions and then click back to VS and it was dead!

You might want to try a similar move yourself.
Like I said, I've tried this on multiple different computers here and
it hangs on all of them.. The key part seems to be the fact that the
functions are sitting inside the namespace-- if I remove the namespace,
then it doesn't cause a hang.

I'd suspect Intellisense as the culprit, but disabling the statement
completion settings doesn't resolve the problem for me - however,
trying the repro again, it then hung when I pressed Ctrl+F as you
described. I suspect the precise hang point may be timing as much as
anything else.

The only good news I have is that it doesn't occur in VS2005 B1.

I suggest that you contact MS support (phone). I'd be pretty confident
it's a bug so you shouldn't be charged, and they may know of a
work-around or have a patch available.

Dave
 
Just wanted to follow up on the thread.. I talked to Microsoft, it is
indeed a bug, and it will be fixed in visual studio service pack 1.
Until then, you're basically SOL!

-sam
 
Just wanted to follow up on the thread.. I talked to Microsoft, it is
indeed a bug, and it will be fixed in visual studio service pack 1.
Until then, you're basically SOL!

Thanks for the confirmation Sam.

I guess we'll see VS2005 RTM way before a VS2003 service pack.

Dave
 
Back
Top