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
 Go To Definition stops working with 1635
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Luke1410
Senior Member

32 Posts

Posted - May 06 2008 :  4:23:22 PM  Show Profile  Reply with Quote
Hi,

I'm testing the latest beta build with our code base (C++) and had some trouble. After using it in VS 2008 for several hours I ended up with the "Go to definition / declaration" features stop to working (couldn't find the corresponding definition/declaration) as did VA's own "Find References" feature which displayed the error message: "Please place the caret on a symbol before running FindReferences.".

After rebuilding VA's symbol library everything worked once again.

I was wondering whether VA has some trouble parsing some of our code correctly. Therefore I enabled VA's logging feature and checked the log file for any suspicious entries and found a lot of entries like the following one:
"IsTemplateCls (1): Brace Mismatch )
{
if (!bCas"

Is VA having problems with some of our code constructs, which might lead to the problems described above, or can those log messages be safely ignored?

Edited by - Luke1410 on May 06 2008 4:29:28 PM

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - May 06 2008 :  5:01:08 PM  Show Profile  Reply with Quote
How are you triggering "Go to definition / declaration" ?
There are two items called this in the IDE right click menu, but these are IDE commands, and should not be effected one way or the other by VA.

The problem with Find References clearly shows a VA problem.

Are you seeing any odd underlining from VA? I am assuming that you have:

VA Options -> Advanced -> Underlines -> Underline mistyped symbols using

turned on. If our parser is getting confused, which sounds likely, then I would expect valid code to start being underlined as mistyped symbols.

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

Luke1410
Senior Member

32 Posts

Posted - May 06 2008 :  6:32:28 PM  Show Profile  Reply with Quote
I trigger the "Go to definition/declaration" stuff by rightclicking on an identifier (method/member variable).

@odd underlining: Yes, I did see a lot of underlined (but valid) identifiers. Furthermore the coloring of identifiers was "incorrect", too (i.e. identifiers which should have been green (local variables) or dark red (methods) were black. Last but not least when writing a "." after an identifier which was a pointer to a class, VA did neither automatically replace the "." with a "->" nor did it show a list of valid member methods.

Edited by - Luke1410 on May 06 2008 6:32:41 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - May 07 2008 :  08:49:48 AM  Show Profile  Reply with Quote
I have no idea why the IDE's commands are having problems, but clearly something is confusing VA's parser in your code.

In a cpp file where you are seeing this problem, if you use Alt-m to get a list of functions in the file is this list correct? If the first few functions are listed, but a problem then shows up, this should give a clue as to what is causing the problem.

If you show VA Outline, does this show the correct information for your files? Or is this having problems as well?

Do you see problems in all files, or only some files?

I am looking for any clues to help explain the problems you are seeing.

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

Luke1410
Senior Member

32 Posts

Posted - May 09 2008 :  07:14:47 AM  Show Profile  Reply with Quote
Unfortunately the problem I expected can't reliably be reproduced and since I rebuilt the symbol files, neither can I check what would have happened if I had used Alt-m nor how the VA Outline looked like.

If I remember correctly, the problem was present in all source files (not only a particular one).

As I was asking in my initial post: Does VA provide any means to display problems it has with parsing our code which could either be used to:
- report the problems here
- adjust the code sections VA has trouble with to work properly?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - May 09 2008 :  09:16:22 AM  Show Profile  Reply with Quote
Sort of. It really depends on the type of problem you are seeing.

If you have code in the 6th function of a file that confuses VA's parser then looking at VA Outline or the Alt-m list should help, since they will be correct for the first 5 functions, and then the problem will show up.

Complex macros are a common source of problems in code, so it is worth looking for macros when problems show up. However given the massive range of things people can and do with complex C / C++ macros I cannot offer any general comments here.

Sometimes log files will help.

It all depends on the nature of the problem.

Most of the time a parser problem is file specific. It may effect most files in a solution, if it is triggered by a common include header file, but there are normally a few files that are not effected.

If the problems appear global then this may be caused by a problem with VA's symbol database. If rebuilding the symbol database fixes the problem then this is a good indicator that is where the problem lay. Our symbol database is not supposed to become corrupt, so tracking down the cause of the problem can be tricky.

We have made some changes for the next build of VA to try and make the symbol database more robust when working with multiple IDE's at the same time.

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

Luke1410
Senior Member

32 Posts

Posted - May 12 2008 :  12:37:29 PM  Show Profile  Reply with Quote
Thanks for the detailed description. If the problem reappears, I'll take a look at the outline list to see if it's caused by something VA had problems parsing correctly.

Furthermore if I may post a feature request: Enterprise Architect from Sparx provides a nice feature to easily identify code its own parser has problems to parse correctly: They simply print out the code lines / files their parser couldn't parse correctly. That helps a lot with identifying troublesome code and report it to their support center. It not only saved us hours of debugging sessions but no doubt helps Sparx a lot to improve the quality of their own parser, since bug reports can be made easier and contain all necessary information to create a suitable test case.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - May 13 2008 :  09:25:18 AM  Show Profile  Reply with Quote
I really like the idea of our parser logging any code it had a problem with

At the same time, VA is designed to scan code as you are editing it, so often the code is invalid, you are still writing it, so it does not always make sense.

*considers* if this only happened when logging was turned on, it should limit any problems due to editing...

I have put in a feature request to see what our developers make of this:

case=16650

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

rittjc
Ketchup Master

USA
84 Posts

Posted - May 13 2008 :  09:46:00 AM  Show Profile  Reply with Quote
quote:
Originally posted by feline

I really like the idea of our parser logging any code it had a problem with

At the same time, VA is designed to scan code as you are editing it, so often the code is invalid, you are still writing it, so it does not always make sense.

*considers* if this only happened when logging was turned on, it should limit any problems due to editing...

I have put in a feature request to see what our developers make of this:

case=16650



Please make this an option. Logging would be good if we have a problem, but I personally wouldn't want it to slow down normal operation, no matter how much benefit it brings to being able to resolve problems.

JMHO
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - May 13 2008 :  10:23:02 AM  Show Profile  Reply with Quote
I suspect this would only be done if VA logging was turned on, and you have to turn this on manually. Plus it turns its self off when you restart the IDE.

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