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
 Find Symbol working only for one of two solutions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ingenious
Senior Member

25 Posts

Posted - Mar 14 2012 :  12:30:28 PM  Show Profile  Reply with Quote
Hi,

I've been having a problem forever, and I decided to finally report it. I have a C++ solution with 4 projects, and I was never able to use the Find Symbol dialog properly. It never finds any symbols unless I uncheck "Show only symbols defined in current solution", but then it also shows me all kinds of symbols from everywhere.

I just tested with a different, much larger, solution, and there Find Symbol works fantastically. What could be the problem? What can I try?

I'm using VS2010 on Windows 7 64-bit, and the latest VAX version (1901).

Edited by - ingenious on Mar 14 2012 12:32:01 PM

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Mar 14 2012 :  4:16:39 PM  Show Profile  Reply with Quote
Is this a normal C++ solution, with C++ projects? Or are the missing / problem projects of some other type?

Are you using custom file extensions for your code files in the problem projects?

Both of these seem unlikely, but there must be something triggering this rather odd behaviour.

If you use Open File in Solution, does VA list the code files in the problem projects?

What do you have:

VA Options -> Performance -> Parse all files when opening a project

set to?

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

ingenious
Senior Member

25 Posts

Posted - Mar 14 2012 :  4:24:52 PM  Show Profile  Reply with Quote
quote:
Originally posted by feline

Is this a normal C++ solution, with C++ projects? Or are the missing / problem projects of some other type?

Are you using custom file extensions for your code files in the problem projects?

Both of these seem unlikely, but there must be something triggering this rather odd behaviour.

If you use Open File in Solution, does VA list the code files in the problem projects?

What do you have:

VA Options -> Performance -> Parse all files when opening a project

set to?



Hey, thanks for the reply!

It's a normal solution with only C++ projects, no custom tools, nothing special. Open File in Solution works nicely and I use it as a work-around to the problem.

Find Symbol does actually show the symbols in my solution, but only if I uncheck "Show only symbols defined in current solution". But not *all* of them. For example, I have some typedefs for uint, ubyte, etc. For these, it only shows me the ones defined in the Windows headers, which actually have different cases (e.g. UINT). Odd indeed...

Edited by - ingenious on Mar 14 2012 4:25:49 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Mar 14 2012 :  6:52:45 PM  Show Profile  Reply with Quote
Can you please check your VA stable include directories:

VA Options -> Projects -> C/C++ Directories

Do these overlap with the directories where this problem solution sits on your hard drive?

This happens occasionally, and can cause some odd problems.

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

ingenious
Senior Member

25 Posts

Posted - Mar 14 2012 :  7:00:58 PM  Show Profile  Reply with Quote
No, it doesn't overlap. Also the option

VA Options -> Performance -> Parse all files when opening a project

is checked. By the way, tested with another 2, unrelated, solutions. Works on one, doesn't work on the other. Very weird. As a last resort, when you run out of suggestions, I can try recreating the solution projects by project to see where it breaks.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Mar 14 2012 :  7:46:24 PM  Show Profile  Reply with Quote
Are you able to add a new, empty cpp file to both the working and problem projects? If so, can you please do so, and add:

void testFelineFindSymbolProjectOne() { }


to the new cpp file in the working project, and add:

void testFelineFindSymbolProjectTwo() { }


to the new cpp file in the problem project.

Are the new files listed in the Open File dialog? They should be. How about the Find Symbol dialog?

I am wondering if there is something in the structure / nature of the files in the problem project that is causing this.

Does saving these changes and restarting the IDE make any difference?

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

ingenious
Senior Member

25 Posts

Posted - Mar 14 2012 :  8:21:16 PM  Show Profile  Reply with Quote
Adding the files and functions doesn't change anything. The working solution still works, the problematic still doesn't. The CPPs show up in the Open File dialog, which has always worked everywhere. Restarting the IDE doesn't help.

I may have found a pattern though. The projects in two of the working solutions have the standard file filters - Header Files, Resource Files, Source Files. Another working solution has different filters, which have likely been created by renaming the default ones VS creates. The projects in the problematic solutions, however, have been created empty, and I've added hierarchical filters that resemble the folder structure on the disk (file system). Could this be the problem?

Edited by - ingenious on Mar 14 2012 8:22:17 PM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Mar 15 2012 :  7:28:58 PM  Show Profile  Reply with Quote
It should not cause any problem. Sometimes I also use such filter trees and they never cause issues. If "Open File in Solution" sees the files, than VA should have been parsed them.
Can you please try what happens if you directly open the project files one-by-one? Does it make any difference for any projects, or is Find Symbol broken for all projects? I'm wondering whether the solution itself confuses VA somehow, or whether there is a specific project that contains something that VA don't like.

Edited by - accord on Mar 15 2012 7:30:25 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Mar 15 2012 :  7:58:58 PM  Show Profile  Reply with Quote
Do you have any idea how the two problem projects were created? Using VS2010, I have just created a new, default "Visual C++ -> General -> Empty Project" project. The project that is produced has the three standard filters added in Solution Explorer, "Header Files", "Resource Files" and "Source Files", along with "External Dependencies".

These can easily be deleted, I am just wondering if the problem projects were created in VS2010, or via some other method.

I have deleted these default filters in my test empty project, and set up a simple test. My solution is here:

http://forum.wholetomato.com/colin/forumimages/topic_10637_symbol_in_solution_main.zip

Can you try downloading it, and see what the Find Symbol dialog shows please?

Make sure you have "Show only symbols defined in current solution" = On
and "Only classes, structs & namespaces" = Off

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

ingenious
Senior Member

25 Posts

Posted - Mar 15 2012 :  8:37:40 PM  Show Profile  Reply with Quote
OK, I managed to isolate the problem. Here's a zip file with two solutions - on one the Find Symbol works, on the other one it doesn't. The only difference between the two cases is that in the working one, the solution file is in the same directory as the project file. Notice that the directories, the project and the solution files all have the same name.

Here's the ZIP:

https://www.dropbox.com/sh/747gmd0wc5uinud/ERAcjGPhld/VAX_FindSymbol_Test.zip

I really hope you can reproduce the problem with this example.

EDIT: I managed to reproduce the problem on 2 other machines with the test linked above. I hope you can track down the issue. An easy temporary solution will be highly appreciated. Thanks!

Edited by - ingenious on Mar 16 2012 09:43:37 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Mar 16 2012 :  1:44:05 PM  Show Profile  Reply with Quote
I have the zip file, and I am seeing the same problem here, thank you for taking the time to work out the trigger:

case=65394

I am not seeing any other obvious trigger, and I have diff'ed the .SLN and .VCXPROJ files, and the only difference I am seeing is the different directories. This is puzzling, since when I make a new test solution in VS2010, the IDE places the solution and project in separate directories, but VA handles this correctly.

As a temporary work around is moving your solution, or project files in the problem solution an option?

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

ingenious
Senior Member

25 Posts

Posted - Mar 16 2012 :  1:53:58 PM  Show Profile  Reply with Quote
Glad to know that you were able to reproduce the problem too. In the mean time, I just tried something that localized the problem. Notice that the project, solution, and directory all have the exact same name. Now try doing the following:

Go to the _problematic directory, rename the RTfact directory (where the project file resides) to something else (e.g. RTfactt), and then edit the solution file with a text editor to update the name of the project directory. And voila - symbols appear in the dialog. Albeit on the second try - the first time I open the Find Symbol dialog, nothing appears, but then I either check and uncheck the "symbols in solution" checkbox or open the dialog again, and it works.

EDIT: I just tested renaming the project file - doesn't help. I also tried whatever combinations - I even changes the names of solution, projects, and .prop files and the namespaces. The directory RTfact remained the only thing that was named that way, no luck. Only changing the directory name to something different works. Am I going crazy?

Edited by - ingenious on Mar 16 2012 2:16:44 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Mar 16 2012 :  8:12:03 PM  Show Profile  Reply with Quote
We are making progress, one of our developers has had a look, and this is actually a problem with the project configuration.

In both projects property sheets are being used to say that global include directories overlap with the solution include directories. So VA is being told that the symbols in the solution are actually global. Since they are global they cannot be defined only in the current solution, so they are being filtered out of the Find Symbol dialog.

The reason the Find Symbol dialog is working in one of the two solutions is that moving the solution file around has broken the paths in the property sheets. You are probably fixing this with the rename, thus emptying the Find Symbol dialog.

To fix this, load the problem solution, where the property sheet directories are actually working correctly, and use:

IDE View menu -> Property Manager

You now need to edit the three property sheets "RTfactDebug", "RTfactRelease" and "RTfact" by right clicking on them and selecting Properties.

Go to:

Common Properties -> VC++ Directories -> Include Directories

select and cut / delete the two solution paths:

$(SolutionDir)\\Contrib\\Include;$(SolutionDir)\\RTfact\\Source;

and now go to:

Common Properties -> C/C++ -> General -> Additional Include Directories

and paste these two solution directories into this field.

Once you have done this to all three property sheets, tell VA to rebuild its symbol database:

VA Options -> Performance -> Rebuild symbol databases

and restart VS2010. After you have loaded the problem solution the Find Symbol dialog should now work correctly. The same basic steps should also fix your main problem projects in your solution.

I hope this makes sense, and that I have managed to convey what is happening here.

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

ingenious
Senior Member

25 Posts

Posted - Mar 16 2012 :  8:23:55 PM  Show Profile  Reply with Quote
Oh, wow, that worked, thanks a lot!! I can finally use Find Symbol, yey :)

I actually had no idea that the include directories in the VC++ directories section and the additional C++ include directories had different meaning. Is that specific to VAX? Do you actually have idea when to set directories in VC++ directories and when in additional C++ includes? In VS2008 and before it was clear, but now in VS2010 VC++ directories is in the project settings, which frankly seems odd to me.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Mar 16 2012 :  9:47:08 PM  Show Profile  Reply with Quote
In VS2008 it was more clear cut. You have the global include directories in the IDE options dialog, and the project specific additional include directories.

These have now been moved into property sheets, I read something about this a little while ago, it was party to expose the settings to build tools, if I remember correctly.

The settings here, the first set of include directories are the global include directories, that are normally shared across all projects. I suspect the ability to inherit property sheets from each other is connected here somehow, but to be honest I don't know much about property sheets.

The second set of settings are an alternate location for specifying your project specific additional include directories. This makes sense since you can set them once, and then use the same property sheet for many projects.

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