Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Issue with GoTo in third party source files
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mlaffin
New Member

6 Posts

Posted - Aug 12 2009 :  5:42:24 PM  Show Profile  Reply with Quote
I'm trying to setup third party source files that are not part of my solution for use in a VS2008 project. Unfortunately I am having issues with the GoTo feature. The function implementations in the cpp files are never found. GoTo will take me from the cpp to the h, but not from the h to the cpp.

I've tried:
Clear History, Cache and temporary files
Rebuild Symbol Databases
The setting "Parse all files when opening a project" is turned on
I've tried Reparse Current file

Nothing has worked to find the function implementations in the cpp files.

C/C++ Directories Settings:
Stable Include Files
C:\\Program Files\\Microsoft DirectX 9.0 SDK (April 2005)\\INCLUDE;
C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\include;
C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\include;
C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include;
C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\common\\include;
C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include;
C:\\Program Files\\Microsoft SQL Server\\100\\SDK\\Include;
C:\\Program Files\\BCGSoft\\BCGControlBarPro\\BCGCBPro;

Other Include Files
No paths

Source Files
C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfc;
C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\atl;
C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\crt\\src;
C:\\Program Files\\BCGSoft\\BCGControlBarPro\\BCGCBPro;

I thought that by adding the path BCGSoft... to the Source Files would have fixed this issue. Unfortunately it did not.

Some other comments:

When looking at the cpp file, alt-m works correctly.
When I look at the Open File in Solution dialog, the files from C:\\Program Files\\BCGSoft\\BCGControlBarPro\\BCGCBPro are not present.

Any ideas on how I can get VAX to see the third party source files.

mlaffin
New Member

6 Posts

Posted - Aug 13 2009 :  10:16:51 AM  Show Profile  Reply with Quote
I'm using version 10.5.1727.0.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Aug 13 2009 :  10:41:33 AM  Show Profile  Reply with Quote
It should work, but this parsing is NOT recursive, so the files should be in this directory, and not in subdirs (or the subdirs must be added one-by-one).

Another solution is to check

VA Options -> Performance -> if solution is not empty

It will parse all other unparsed files in the same dir. upon opening a file. So it will work after you open the first external (cpp) file.

Edited by - accord on Aug 13 2009 10:44:20 AM
Go to Top of Page

mlaffin
New Member

6 Posts

Posted - Aug 13 2009 :  10:52:48 AM  Show Profile  Reply with Quote
All of the source files were in the directory...no subdirectories.

However, when I turned on

VA Options -> Performance -> if solution is not empty

and then cleared cache and rebuilt symbol dbs, things started working.

Thanks!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Aug 13 2009 :  5:22:55 PM  Show Profile  Reply with Quote
Something odd is going on here, since all of your settings seem correct. You should not have to turn on this option to make this work.

Did you only have this problem with files in the BCGControlBarPro library, or did it effect other code as well? I am wondering if there is something "odd" about these cpp files.

zen is the art of being at one with the two'ness
Go to Top of Page

mlaffin
New Member

6 Posts

Posted - Aug 13 2009 :  6:22:58 PM  Show Profile  Reply with Quote
This problem does not happen with files in my solution, only with files in the "Source Files" directories. I have turned off the "VA Options -> Performance -> if solution is not empty" setting and tried to see if GoTo would work with files from

C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfc;

GoTo failed for these files also. ( rebuilt my symbol database after turning of the setting)

Also, I've had to rebuild my symbol database three times today as every so often the GoTo stops working. I haven't been able to figure out what I could be doing to make things stop working.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Aug 14 2009 :  3:52:08 PM  Show Profile  Reply with Quote
quote:

I have turned off the "VA Options -> Performance -> if solution is not empty" setting and tried to see if GoTo would work with files from

C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfc;

GoTo failed for these files also. ( rebuilt my symbol database after turning of the setting)



Does everything work correctly when this options is turned on? (after you open
Do you use any other Visual Studio plug-ins?
quote:

Also, I've had to rebuild my symbol database three times today as every so often the GoTo stops working.


Did goto stop working also with your source files in your project?
Go to Top of Page

mlaffin
New Member

6 Posts

Posted - Aug 17 2009 :  09:36:09 AM  Show Profile  Reply with Quote
quote:
Does everything work correctly when this options is turned on? (after you open
Do you use any other Visual Studio plug-ins?



Everything works correctly, for a while. Eventually the GoTo feature stops working with the files not in my solution. Also things seem to be slowed down, at least at start up time with the "VA Options -> Performance -> if solution is not empty" option turned on.

The other VS plugin I have are:
Axialsi Icon Workshop
Seapine TestTrack toolbar

quote:
Did goto stop working also with your source files in your project?

No. Goto continues to work for the files in my project.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Aug 17 2009 :  4:20:47 PM  Show Profile  Reply with Quote
Can you post the line / type / class you are using to test GoTo for files in the:

C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfc;

directory? I can then test the same thing here, and see what happens for you.

I don't recognise these other plugin's, so it is possible they are a factor. If they are widely used by other people running VA without any problems then it would be easier to dismiss them.

What anti-virus are you using? Very occasionally we see problems caused by anti-virus programs, so it is just possible something is stopping VA parsing these system header files correctly.

zen is the art of being at one with the two'ness
Go to Top of Page

mlaffin
New Member

6 Posts

Posted - Aug 27 2009 :  11:26:36 AM  Show Profile  Reply with Quote
quote:
Can you post the line / type / class you are using to test GoTo for files in the:

C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfc;

directory? I can then test the same thing here, and see what happens for you.


Since the last time i rebuilt my symbol database, I haven't been able to reproduce issues with the files in

C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfc;

I am, on the other hand, continuing to have intermittent issues with the files in:

C:\\Program Files\\BCGSoft\\BCGControlBarPro\\BCGCBPro;

The files that I'm having the most trouble with is somewhat larger then the rest of the files in that directory (.h is 83KB, .cpp is 514KB). The GoTo works great with this file right after I rebuild my symbol data base, but then at some point after, stops working.

I have noticed one situation where the GoTo never works with the BCGCBPro files:

There are a series of defines like:
#define BlahMFC CBlah::GetInstance ()

and then function calls like:
BlahMFC->OnDrawBlah();

The GoTo for OnDrawBlah never works.

quote:
I don't recognise these other plugin's, so it is possible they are a factor. If they are widely used by other people running VA without any problems then it would be easier to dismiss them.



I'm not actively using these two plugins right now, so unless they are doing something in the background they probably aren't the issue.

quote:
What anti-virus are you using? Very occasionally we see problems caused by anti-virus programs, so it is just possible something is stopping VA parsing these system header files correctly.


Symantec Anitvirus

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Aug 28 2009 :  11:34:33 AM  Show Profile  Reply with Quote
Since the problem only shows up after a while we can probably ignore the other plugin's and the anti virus, at least for now. If this was as "simple" as VA cannot find the 3rd party library files to parse them then you would always see the problem.

Instead it sounds more like something is confusing VA's parser over time, or it is coming across a second definition of a symbol, which is causing problems.

The code example you give, can you try adding this simple test case to a header file and see what happens when you try alt-g?

class FelineTestInstanceMacroAltG
{
	FelineTestInstanceMacroAltG *GetInstance()	{ return NULL; }
	void setChocolateHeight(int nHeight);
	void setChocolateWidth(int nWidth);
};

#define FelineBlaMacroInstance FelineTestInstanceMacroAltG::GetInstance()

void testUsingFelineMacroInstance()
{
	FelineBlaMacroInstance->setChocolateHeight();
}

its not brilliant code, but it should be enough to do an initial test

In your code what does VA show in the context and definition fields when you place the caret into "BlahMFC" and a function called via this #define?

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000