T O P I C R E V I E W |
jameso |
Posted - Feb 02 2007 : 09:45:15 AM Hi
Happily editing code, I got a messagebox with MB_ICONWARNING | MB_OK, no text, and a caption of va_x. Here are the call stacks in VS2005 for the threads with VA_X in...
> ntdll.dll!_KiFastSystemCallRet@0() user32.dll!_NtUserWaitMessage@0() + 0xc bytes user32.dll!_InternalDialogBox@24() + 0xb6 bytes user32.dll!_SoftModalMessageBox@4() + 0x677 bytes user32.dll!_MessageBoxWorker@4() + 0x175 bytes user32.dll!_MessageBoxTimeoutW@24() + 0x7a bytes user32.dll!_MessageBoxTimeoutA@24() + 0x9c bytes user32.dll!_MessageBoxExA@20() + 0x1b bytes user32.dll!_MessageBoxA@16() + 0x45 bytes 0132ac49() VA_X.dll!1ee8b23f() [Frames below may be incorrect and/or missing, no symbols loaded for VA_X.dll] ntdll.dll!_RtlNtStatusToDosError@4() + 0x2f bytes kernel32.dll!_BaseSetLastNTError@4() + 0x17 bytes kernel32.dll!_FindResourceA@12() + 0x26a1b bytes VA_X.dll!1ef62b4c() VA_X.dll!1eea144a() VA_X.dll!1ee8b2e6() VA_X.dll!1ee7b081() ntdll.dll!__except_handler3() + 0x93 bytes ntdll.dll!ExecuteHandler2@20() + 0x26 bytes ntdll.dll!ExecuteHandler@20() + 0x24 bytes ntdll.dll!_KiUserExceptionDispatcher@8() + 0xe bytes 0012cd54()
--- New thread
> ntdll.dll!_KiFastSystemCallRet@0() ntdll.dll!_ZwWaitForSingleObject@12() + 0xc bytes ntdll.dll!_RtlpWaitForCriticalSection@4() + 0x8c bytes ntdll.dll!_RtlEnterCriticalSection@4() + 0x46 bytes VA_X.dll!1ed497c1() [Frames below may be incorrect and/or missing, no symbols loaded for VA_X.dll] ntdll.dll!_ZwClose@4() + 0xc bytes kernel32.dll!_CloseHandle@4() + 0x44 bytes VA_X.dll!1ee82bc1() VA_X.dll!1ed1bb92() ntdll.dll!_RtlAllocateHeap@12() + 0x117 bytes msenv.dll!CExpansionManager::GetTemplateByShortcut() + 0x18f bytes
--- New thread
> ntdll.dll!_KiFastSystemCallRet@0() ntdll.dll!_NtDelayExecution@8() + 0xc bytes kernel32.dll!_SleepEx@8() + 0x51 bytes kernel32.dll!_Sleep@4() + 0xf bytes VA_X.dll!1ed8b8db() [Frames below may be incorrect and/or missing, no symbols loaded for VA_X.dll] kernel32.dll!_GetCurrentThreadId@0() 09fd3f40() VA_X.dll!1ed16dc6() kernel32.dll!_GetCurrentThreadId@0() 211fcf00() VA_X.dll!1ed8c0cd() ntdll.dll!_RtlpWorkerCallout@16() + 0x65 bytes ntdll.dll!_RtlpExecuteWorkerRequest@12() + 0x1a bytes ntdll.dll!_RtlpApcCallout@16() + 0x11 bytes ntdll.dll!_RtlpWorkerThread@4() + 0x16ebc bytes kernel32.dll!_BaseThreadStart@8() + 0x37 bytes
Here's about:
VA_X.dll file version 10.3.1544.0 built 2007.01.10 Licensed to: VA X: [snip] (1-user license) Support ends 2007.03.07 VA.NET 7.1: [snip] (1-user license) VAOpsWin.dll version 1.3.4.2 VATE.dll version 1.0.5.6 DevEnv.exe version 8.0.50727.42 msenv.dll version 8.0.50727.42 Font: Consolas 11(Pixels) Comctl32.dll version 6.0.2900.2982 Windows XP 5.1 Build 2600 Service Pack 2 2 processors
Platform: Win32 Stable Includes: C:\\Program Files\\Microsoft Visual Studio 8\\VC\\include; C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\include; C:\\Program Files\\Microsoft Visual Studio 8\\VC\\PlatformSDK\\include; C:\\Program Files\\Microsoft.NET\\SDK\\v2.0\\include; [snip]
Library Includes: C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\mfc; C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\mfcm; C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\atl; C:\\Program Files\\Microsoft Visual Studio 8\\VC\\crt\\src;
|
30 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - Feb 17 2007 : 07:56:41 AM It would have been nice to find the trigger for this problem for future reference, but I like the sound of everything working
I do hope it stays working. |
jameso |
Posted - Feb 17 2007 : 06:05:55 AM Probably, but I've now got a shiny new desktop where everything seems to be working. (Though this machine has a second physical disk, so I'm no longer substing anything)
James |
feline |
Posted - Feb 13 2007 : 07:57:46 AM Just to double check, you have restarted the IDE after making this change to VA's stable directories list, and let VA rebuild its symbol databases?
Can you try putting the test project into a dummy directory on C:, to remove the subst drive letter completely from the equation?
I should have been testing the same situation as you, but so far I have not been able to reproduce these problems. I am wondering if there is some additional factor we are missing. |
jameso |
Posted - Feb 13 2007 : 07:32:51 AM Unfortunately, it's not fixed the problem. The behaviour is still exactly the same.
James |
feline |
Posted - Feb 09 2007 : 1:09:44 PM *ah* that makes sense. These "strange" things often do make sense, but you need to understand why before they make sense.
Hopefully this change will help, but if not I will try and work out something else to try |
jameso |
Posted - Feb 09 2007 : 12:41:24 PM As would I, but adding it to 80 projects would be rather more hassle than any of us need.
I'll try the change on Monday |
feline |
Posted - Feb 09 2007 : 11:48:00 AM Normally in this situation I would recommend adding these directories to the project's C++ additional include directories setting.
Can you please try the following, in:
VA Options -> Projects -> C/C++ Directories
change the platform to Custom, and then populate this with the IDE directories, but remove all of the S: directories from this list. This will remove one variable, and hopefully it will make a difference. |
jameso |
Posted - Feb 09 2007 : 08:49:59 AM I've rebuilt the database a number of times - if it's caused by a corrupt database, the underlying problem is why the database gets corrupt :)
My S: drive contains a number of directories, each containing a solution. Each solution has a number of projects which may or may not be in subdirectories. This problem only definately occurs when the projects are in subdirectories (I've not checked the others)
The IDE include directories includes the solution directory so we can say
#include "someotherproject\\somefile.h"
without adding .. or $(SolutionDir) as a search directory for each project
James |
feline |
Posted - Feb 09 2007 : 08:39:50 AM I am wondering if the alt-g problem is related to the corrupt database problem.
Are your projects stored under S:\\repro\\ ? Since VA thinks the code inside these directories is stable then placing all of your active code here could cause problems.
Why have you organised your IDE include directories like this? It seems an odd structure to use. |
jameso |
Posted - Feb 09 2007 : 03:55:18 AM I was wrong :/
The directory structure you listed was correct |
jameso |
Posted - Feb 08 2007 : 4:54:55 PM I didn't add a separate directory for the solution, so it's probably this
S:\\repro\\repro.sln S:\\repro\\repro.vcproj S:\\repro\\repro.cpp
I'll confirm tomorrow
James |
feline |
Posted - Feb 08 2007 : 1:20:16 PM jameso which directory is the repro test project stored in on your machine? I have added a S drive to my machine using "subst", and created the basic directory structure, so that I can add the 4 directories on S: to the IDE's stable include directories.
I then placed the "repro" project into "S:\\repro", so I have:
S:\\repro\\repro.sln S:\\repro\\repro\\repro.vcproj S:\\repro\\repro\\repro.cpp
I have told VA to rebuild its symbol database and restarted VS2005. After this finished alt-g on both function calls in _tmain() offer me two destinations.
I am wondering if my directory structure looks anything like yours. |
feline |
Posted - Feb 07 2007 : 09:10:39 AM At the risk of stating the obvious, you should not be seeing corrupt database files like this. Clearly something is going on here that is causing problems, but I am not sure what.
I will do some tests here with a S drive and see if I run into any problems. |
jameso |
Posted - Feb 07 2007 : 06:40:53 AM The main solution didn't load VAX this morning - looking in startup.log, I found this GetSymDef idx c:\\program files\\visual assist x\\vc8\\CPP\\Db1Ds.db is corrupt, fid=0xeb155f, rel=0x145, act=0xbca042 tid=496 uiTid=3704:194 2/7/2007 08:18:09 0x1f0
I deleted the named file and reopened VS and it's working (still jumping to headers though) |
jameso |
Posted - Feb 07 2007 : 03:25:13 AM I opened the existing solution (on s:), rebuilt the symbol databases and closed the IDE, then re-opened the solution in a new IDE from c:\\dev
Once the syntax highlighting had been applied, I tried the same test - alt-g from repro.cpp and again it went to the header.
James |
feline |
Posted - Feb 06 2007 : 12:44:34 PM Can you try accessing the project via C:, perhaps making a new directory "C:\\src\\" to hold the test project, and see if this makes any difference please? |
jameso |
Posted - Feb 06 2007 : 12:29:25 PM The project is on S: which is a substed local drive (C:\\dev). VAX and VS are installed on C, in the default locations.
AV is mcafee corporate, I believe.
The 'stable' includes have been picked up from the default include dirs - I wouldn't really describe them as stable, possibly 'less unstable' than the rest...
James |
feline |
Posted - Feb 06 2007 : 11:31:52 AM Your email with the VA about information has just reached me. Looking over it I am struck by the following lines in your Stable Includes:
S:\\repro; S:\\repro\\SageInclude; S:\\repro\\SBDInclude; S:\\repro\\Include;
"repro" is the directory name holding the test project you sent me. Putting the project into the stable include directory list should not make a difference, but it is an interesting effect. Also S drive is a rather high drive lever for a local drive. |
feline |
Posted - Feb 06 2007 : 11:26:38 AM The good news is that I have the test projects, thank you for this. The interesting news is this:
I have tested the basic source only project on 3 different machines, and I get the same results every time. I have rebuild VA's symbol database, deleted the IDE generated ncb file, and neither action has any effect.
I am opening VS2005, loading the solution, and then opening the single file "repo.cpp" from Solution Explorer. Once VA has finished parsing (enhanced syntax colouring has been applied to the file) I am using alt-g on the two function calls, and I am always offered both destinations.
When you test this, is the project placed on your C drive? Or are you accessing the project from some form of network drive? What anti-virus software are you using?
I am looking for any obvious clue to explain this difference in behaviour. |
jameso |
Posted - Feb 06 2007 : 10:46:49 AM Done
James |
feline |
Posted - Feb 06 2007 : 10:28:56 AM quote: Originally posted by jameso
Better than that, I can reproduce the bug :)
I can zip up the solution & mail it if I've been that unclear
Please can you submit the zip via the form:
http://www.wholetomato.com/support/contact.asp
including this thread ID or URL in the description, so we can match it up.
I have tried this several different ways, in two different test projects using VS2005 and VA 1544 and I simply cannot reproduce this problem.
Your description seems quite clear to me, and I do not see what I am doing differently. |
jameso |
Posted - Feb 06 2007 : 07:55:46 AM I unloaded & reloaded the solution & it was still reproducable. I then added
#include "a.h"
to a.cpp and rebuilt
Now, alt-g on one of the references to the function defined in the header presents a floating menu pointing at the cpp and the h (in that order), which seems correct to me.
James |
jameso |
Posted - Feb 06 2007 : 07:51:14 AM Better than that, I can reproduce the bug :)
I'm using VS2005.
I created a new Win32 console project and added A.cpp and A.h to it. A.h contains:
---- void headerDeclatationOne(); void headerDeclatationTwo(int a, int b, char c); ----
a.cpp contains (note some minor type changes):
----
#include "stdafx.h" void headerDeclatationOne() { }
void headerDeclatationTwo(int a, int b, char c) { }
bool noDeclarationOne() { return true; }
bool noDeclarationTwo(void* a, char * b, int c, char d) { return true; }
static void testCalling() { headerDeclatationOne(); headerDeclatationTwo(0, 0, 0); noDeclarationOne(); noDeclarationTwo(0, 0, 0, 0); }
----
Repro.cpp contains:
---- #include "stdafx.h"
#include "a.h"
int _tmain(int argc, _TCHAR* argv[]) { headerDeclatationOne(); headerDeclatationTwo(1, 1, 1); return 0; }
----
Everything else is untouched.
I did "Build Solution" (ctrl-shift-b) then tried to alt-g from the calls in _tmain to the definitions, but it went straight to the header. From A.cpp, headerDeclatationOne and headerDeclatationTwo go to the header, noDeclarationOne and noDeclarationTwo go to the function definitions.
I can zip up the solution & mail it if I've been that unclear
James |
feline |
Posted - Feb 06 2007 : 07:31:56 AM So far I cannot reproduce any problems with alt-g. using VS2003 and VA 1544 I have a pair of files, "bug_alt_g.cpp" and "bug_alt_g.h"
the cpp file #includes the .h file
in the .h file I have the code:
void headerDeclatationOne();
void headerDeclatationTwo(int a, int b, char c);
and in the cpp file I have the code:
void headerDeclatationOne()
{
}
void headerDeclatationTwo(int a, int b, char c)
{
}
BOOL noDeclarationOne()
{
return TRUE;
}
BOOL noDeclarationTwo(HWND a, LPSTR b, int c, char d)
{
return TRUE;
}
static void testCalling()
{
headerDeclatationOne();
headerDeclatationTwo(0, 0, 0);
noDeclarationOne();
noDeclarationTwo(0, 0, 0, 0);
}
using alt-g on the 4 function calls, I get the alt-g menu for the first 2 items, and I am taken directly to the functions on the second two. All of this seems quite correct, and exactly as I would expect. Can you try the same tests on your machine and see what results you get? |
jameso |
Posted - Feb 06 2007 : 04:49:28 AM The function isn't in a class - the signature is
BOOL Fn(HWND, LPSTR, int, char)
Alt-m works just fine (and, by the way, I really, really like that feature)
I can move around in the CPP without any problems, however, selecting the definition of one of the functions declared in the header and hitting alt-g goes to the header. In case that's not clear:
Alt-O switches correctly between B.CPP and B.H In B.CPP, alt-g on a call to a function defined in B.CPP which isn't declared in B.H goes to the function definition (correctly) In B.CPP, alt-g on a call to a function defined in B.CPP which is declared in B.H goes to the declaration in B.H (incorrectly)
B.H isn't directly included in B.CPP - I've added it on the off chance this might fix it. (After a restart, it doesn't seem to have helped)
James |
feline |
Posted - Feb 05 2007 : 2:55:28 PM This suggests VA is having problems with this cpp file. Is the class inside a namespace? This should not matter in 1544, but it might. In the cpp file does alt-m list all of the methods in the file? Are you seeing any problems with next and previous scope?
I have seen a problem where code like:
static void someFunction()
{
#if 0
{
{
#endif
}
confuses VA, due to the mismatched brackets. But this tends to effect several features, not just alt-g. |
jameso |
Posted - Feb 05 2007 : 2:50:11 PM Alt-g still doesn't work in the header, though F12 does The function isn't overloaded Alt-O works It's persistent across restarts of the IDE |
feline |
Posted - Feb 05 2007 : 2:46:25 PM When you are in the header, on the declaration of this function, what happens when you press alt-g? You should be taken to the implementation.
Is this function overloaded? Does alt-o swap you between the header and cpp files correctly? Does this alt-g problem still show up if you restart the IDE? |
jameso |
Posted - Feb 05 2007 : 05:36:42 AM OK, in file A.cpp, there's a line
Fn(....)
B.h has the declaration B.cpp has the implementation
alt-g on the call goes to the header. F12 goes to the implementation (from both A.cpp and B.h)
There are no "using namespace x" statements in the A.cpp, though there are several functions defined in a namespace.
A.cpp, B.h and B.cpp are all in the same project in a much larger solution
This is during debugging, but there are a couple of EnC changes pending. However, stopping the debug session and recompiling makes no difference.
Anything else I should look for?
James |
jameso |
Posted - Feb 05 2007 : 03:49:55 AM OK, back at work (I love Mondays)
I can't reproduce any of the problems this quickly after a clean boot, but I'll keep an eye out and follow up when they happen.
I don't think I've been affected by the namespace problem - we only have a handful of namespaces and hardly use 'using namespace' like that.
vc8\\errors.log has 300 lines from about the time I had the error message, the unique values are
Exception: EDC::2314 2/2/2007 14:31:33 0xce8 Exception: EDC2::2194 2/2/2007 14:31:39 0xce8 Exception: MP::386 2/2/2007 14:31:52 0xce8 Exception: EDC2::2194 2/2/2007 14:31:53 0xce8 Exception: PT::342 2/2/2007 14:31:59 0x778 Exception: VAP::1089 2/2/2007 14:32:03 0x8c4 Exception: MP::386 2/2/2007 14:34:03 0x8c4 Exception: PT::342 2/2/2007 14:34:04 0x778 Exception: VAP::1089 2/2/2007 14:34:19 0x8c4 Exception: ATT:519 2/2/2007 14:34:59 0xce8 Exception: MP::386 2/2/2007 14:46:36 0x100 Exception: MP::386 2/2/2007 14:47:31 0x504 Exception: FDC::570 2/2/2007 14:47:51 0xce8
Between 14:33:55 and 14:35:43 there were 212 exceptions logged. There's then an 11 minute gap (presumably while I was attaching a debugging and looking at the call stacks, before there were another 65 execptions (when I detached the debugger)
There's some stuff in VAX\\startup.log too, but nothing before I attached the debugger. Let me know if that'd be helpful
James
|