Author |
Topic |
|
solosnake
Starting Member
United Kingdom
1 Posts |
Posted - Dec 15 2004 : 06:52:28 AM
|
Hello
I have encountered this problem often when using VA. When calling a C++ function from within a namespace or class it is considered good modern C++ practise to qualify its scope (this prevents name clashes and makes it explicit which function is being called). It is also sometimes required (see below).
e.g. to call a global scope function from within a class method, prefix the function name with the scope operator ::
// Global function.
void MyFunction();
// Class member function.
void MyClass::MyFunction()
{
// Call the global function MyFunction, not the class method.
::MyFunction();
} ^
^
^
^
App freezes here
This is the error I am having: whenever I try and type the scope operator, I can only insert a single semi-colon. The application freezes as I am typing, and never returns - all work is lost, and I need to kill Visual Studio using CTRL-ALT-DEL. As a result this is a very dangerous bug. It prevents me writing the code I need to write, and also losses all unsaved code up until that point.
I can repeat the bug in my code, however I cannot create a simple example that does it - presumably it is related to the complexity of headers or number of items that are in the global scope, as VA is crashes when attempting to display the list of items?
Thanks for your help,
Daire
Version Info (note: I have removed my e-mailing addess) ======================================================= Language: C++
VA_X.dll file version 10.1.1289.0 Licensed to: VA X: email address removed (1-user license) Support ends 2005.07.28 VA.NET 7.1: VAOpsWin.dll version 1.2.0.4 DevEnv.exe version 7.0.9466.0 msenv.dll version 1.0.5849.1 Font: Courier 12(Pixels) Comctl32.dll version 5.82.2800.1106 WindowsNT 5.1 Build 2600 Service Pack 1 2 processors
Platform: Win32 Stable Includes: C:\\Program Files\\Microsoft DirectX 9.0 SDK (October 2004)\\Include; C:\\Program Files\\Microsoft DirectX 9.0 SDK (Summer 2004)\\Include; c:\\program files\\microsoft visual studio .net\\vc7\\include; c:\\program files\\microsoft visual studio .net\\vc7\\atlmfc\\include; c:\\program files\\microsoft visual studio .net\\vc7\\PlatformSDK\\include\\prerelease; c:\\program files\\microsoft visual studio .net\\vc7\\PlatformSDK\\include; c:\\program files\\microsoft.net\\sdk\\v1.1\\include;
Library Includes: c:\\program files\\microsoft visual studio .net\\vc7\\atlmfc\\src\\mfc; c:\\program files\\microsoft visual studio .net\\vc7\\atlmfc\\src\\atl; c:\\program files\\microsoft visual studio .net\\vc7\\crt\\src;
Other Includes:
|
Edited by - WannabeeDeveloper on Dec 15 2004 12:15:55 PM |
|
LarryLeonard
Tomato Guru
USA
1041 Posts |
Posted - Dec 15 2004 : 09:41:51 AM
|
Maybe you're not being patient enough? I notice that the very first time I type "::" (or, by mistake, ".."), the IDE freezes for as long as a minute while it does whatever it does. I don't know if it's VAX or the IDE. After that first time though, it behaves normally. Try letting it run for 10 minutes once, and see if it ever actually comes back.
Also, when you said "a single semi-colon", did you mean "colon"??
|
|
|
chas
Junior Member
17 Posts |
Posted - Dec 15 2004 : 1:10:15 PM
|
We had that behavior too. Our best hypothesis was that it was VS.NET's default intellisense, so we deleted our project's .ncb file, replaced it with a 0-byte placeholder file of the same name, and marked it as read-only.
We get a mildly obnoxious modal dialog (telling us it's read-only) on project load, but we skip past it and everything works at full speed.
HTH, chas |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Dec 15 2004 : 4:33:36 PM
|
i have seen .NET 2003 freeze like this even without VAX installed when typing ::, or anything else that triggers a completion listbox for the first time. it seems that when the IDE starts parsing it simply will not stop until it has finished *sigh* |
zen is the art of being at one with the two'ness |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Dec 15 2004 : 11:23:01 PM
|
We let the IDE handle :: and it requires a lot of processing the first time it's run. We use the read-only NCB file to avoid the annoyance. Others delete their NCB files once in a while -- they get corrupted quite easily. |
|
|
SuperBug
Starting Member
1 Posts |
Posted - Jan 02 2005 : 07:11:27 AM
|
Hi, I was just googling about this ...
It's definitely a problem with IntelliSense. It's the use of namespaces that causes the IDE to freeze. I can easily "fix" the problem by not using namespaces and I can just as easily recreate the problem by introducing namespaces (two in the same file are enough). I never had this problem when my code wasn't namespaced.
And it's not a problem with Visual Assist, though. I tried VA exactly for that reason, in hopes that it will replace the IntelliSense completely. Just deleting the NCB file also doesn't help in this particular situation.
I'll try the proposed solution - I really hope it works (thanks!).
|
|
|
laeus
New Member
2 Posts |
Posted - Jan 14 2005 : 11:39:54 AM
|
I started having a lock-up problem when trying to work in a particular file. The project I work on is huge, so it's not surprising that some add-ins have issues, but this was the first time I had a reliable freezing problem. I disabled three things in VS.Net's C/C++ text editor options:
General -> Auto list members General -> Parameter information Formatting -> Enable automatic Quick Info ToolTips
This seemed to get rid of the problem for me. Incidentally, a coworker noticed that, at the bottom of that file, we had:
// <classname>::
He says that he removed the "::" and has not experienced a lock-up since. Strange, considering it's in a comment field.
Perhaps something here will prove useful to someone. :)
-- Marcin Szymanski |
|
|
|
Topic |
|