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
 Syntax highlighting of function name fails
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

krones2
Junior Member

Germany
14 Posts

Posted - Jan 04 2012 :  10:20:47 AM  Show Profile  Reply with Quote
As you can see from the screenshot the highlighting of the function name "intensity" fails.
If I add the corresponding class in front it works.

Its not a matter of ordering of the functions, its always "intensity" which fails to be highlighted.

I noticed this error several times with different function names.

Using VS 2008 with VA_X build 1862.




feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jan 05 2012 :  11:07:34 PM  Show Profile  Reply with Quote
This suggests that VA does not realise that intensity on its own is a function. If you place the caret into this intensity function call, into the symbol "intensity" its self, what, if anything, is shown in the VA context and navigation fields? These are normally at the top of the editor, and are where the Alt-M list appears.

If you do a find in the current file, do you have any local variables, or other symbols called "intensity" that might be confusing our colouring code? When the same symbol is used to mean different things our colouring code can get confused sometimes, since it has to run very quickly, and work behind the IDE's back.

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

krones2
Junior Member

Germany
14 Posts

Posted - Jan 09 2012 :  01:44:38 AM  Show Profile  Reply with Quote
As you can see in the screenshot the function is correctly recognized in the Alt-M List. There is no other appearance of "intensity" in the file or in the header. The caret is over intensity, its just not visible in the screenshot.

I recognized, that "intensity" is correctly colored (brown) while I type in the line above. But some 100 ms after I stopped typing, it gets changed to blue. So I guess there are two different versions of your coloring code at work. One "realtime" while you type, and one "offline" when there was no typing for some short time?




Using Win XP SP3, Visual Studio 2008
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jan 09 2012 :  6:36:47 PM  Show Profile  Reply with Quote
Can you please open the Find Symbol dialog, Alt-Shift-S by default. If you search for symbols called or containing "intensity" what do you find?

I am wondering if there is another symbol with the same name somewhere that is causing this colouring.

If you use alt-g on this function call, what happens? Are there any unexpected entries in the alt-g menu?

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

krones2
Junior Member

Germany
14 Posts

Posted - Jan 10 2012 :  01:42:44 AM  Show Profile  Reply with Quote
I attached the two results. Didn't find anything which explains it...
There is just one other method called intensity. Even if he confuses them, it should look brown too.








Using Win XP SP3, Visual Studio 2008
Go to Top of Page

krones2
Junior Member

Germany
14 Posts

Posted - Jan 10 2012 :  02:32:22 AM  Show Profile  Reply with Quote
I found another symbol which is not recognized correctly.







Using Win XP SP3, Visual Studio 2008

Edited by - krones2 on Jan 10 2012 02:35:37 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jan 10 2012 :  12:41:47 PM  Show Profile  Reply with Quote
Since there are no signs of duplicate symbols to explain this colouring problem, I am wondering if something further up the current file might be a factor.

At the very top of the current file, before any #include statements or macros, can you please try adding this simple test function, and see what happens for the colouring of "intensity":

static void felineTestFuncColourForVA()
{
	Halcon::intensity(0, 0, 0, 0);
	intensity(0, 0, 0, 0);
}

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

krones2
Junior Member

Germany
14 Posts

Posted - Jan 11 2012 :  01:26:36 AM  Show Profile  Reply with Quote
That does not work too.




Using Win XP SP3, Visual Studio 2008
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jan 11 2012 :  2:55:33 PM  Show Profile  Reply with Quote
That's a clear result, thank you for this, and it confirms this is not simply caused by something further up the code file. Can you please try adding the line:

// intensity

to a function, and then use Alt-g on the word "intensity". What do you see in the Alt-g menu? The colouring clearly suggests that VA is finding another, non function declaration of "intensity" somewhere, we just need to find it. Hopefully this will help.

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

krones2
Junior Member

Germany
14 Posts

Posted - Jan 12 2012 :  02:40:29 AM  Show Profile  Reply with Quote
It really finds another use of intensity. But those are all functions, so it should be colored like a function, right?



There is another interesting bit I would like to show you.
The int gets colored like a method because the coloring confuses them. The Alt-M Box shows it correctly, its an int not a method.







Using Win XP SP3, Visual Studio 2008

Edited by - krones2 on Jan 12 2012 02:42:35 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jan 12 2012 :  12:55:25 PM  Show Profile  Reply with Quote
That's unexpected, and odd. I had hoped Alt-G on "intensity" in a comment would find a variable.

In your screen shot the variable "felineTestFuncColourForVA" is shown in the same colour both as a function and a variable. This is expected, since our colouring code is getting confused. Without knowing your custom colour scheme I am not sure which colour is being applied, but this is a known limitation, due to our colouring code having to run very fast, so that it can keep up with scrolling and editing. Because of this it cannot perform to deep an analysis.

In your VA options dialog can you please change the colour for "Variables" to something very distinct and clear, perhaps Red, and see how "intensity" is now coloured? Zooming in on your screen shot, "intensity" is currently coloured dark blue, but without knowing your custom colour scheme I don't know what that refers to. I am assuming that is the colour you have set for "Variables" in VA's options dialog, but if so the Alt-G menu should show a variable declaration.

So I am wondering if the colouring is coming from somewhere else.

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

krones2
Junior Member

Germany
14 Posts

Posted - Jan 13 2012 :  01:39:24 AM  Show Profile  Reply with Quote
Something strange happened today when I fired up VS. It works!
As you can see in the screenshot intensity gets colored correctly today. I didn't touch any VA_X Settings since yesterday.

And whats even more suprising is that when I press alt-G on the comment today, I get shown a Variable like you predicted! Which means yesterday VA_X didn't find or recognize that variable!




Using Win XP SP3, Visual Studio 2008
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jan 13 2012 :  12:56:55 PM  Show Profile  Reply with Quote
Very strange. Do you have:

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

turned On or Off?

I am wondering if there is something in your solution that is confusing our parser.

Can you please try pressing:

VA Options -> Performance -> Rebuild symbol databases

and then restart your IDE, and see what effect this has?

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

krones2
Junior Member

Germany
14 Posts

Posted - Jan 16 2012 :  01:30:54 AM  Show Profile  Reply with Quote
When i opened VS today intensity was colored wrong again!
"Parse all files on opening project" is turned on. Its a very large project, about 50.000 files in the repository.

When I did what you told me, clicked rebuild and restartet the IDE it looks like this after VA_X stops parsing:



Which is a mixture of the results before. intensity is colored right, but the variable is not shown in Alt-G. Looks like parsing results are not deterministic...



Using Win XP SP3, Visual Studio 2008
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jan 16 2012 :  1:03:13 PM  Show Profile  Reply with Quote
Can you please make sure that the file "IOx11Window.h" is NOT currently open in the IDE, and then use the Open File in Solution dialog, Alt-Shift-O by default, and see if the file "IOx11Window.h" is listed?

If this header file is not actually part of the solution then VA may not be parsing it on solution load, and only parsing it when the file, or another file that uses this file is loaded.

This would explain these inconsistent results, where this variable declaration is only sometimes found and known about.

If the header file is part of the solution, then I am wondering if there is something about the header file its self that is confusing our parser.

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

krones2
Junior Member

Germany
14 Posts

Posted - Jan 17 2012 :  01:36:16 AM  Show Profile  Reply with Quote
The IOx11... file is part of the solution. It is found in the "open file in solution" dialog from VA_X. Before I opened the dialog I closed all other files currently open in the solution.

The Alt-G Contextmenu of the comment "intensity" looks different again today. This is the third variant without a change in code in any way.






Using Win XP SP3, Visual Studio 2008

Edited by - krones2 on Jan 17 2012 01:38:19 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jan 17 2012 :  10:28:28 AM  Show Profile  Reply with Quote
This is very odd.

Inside the "IOx11Window.h", if you go to line 110, and then down a few more lines to a line where the local variable "intensity" is used, and use alt-g on it, what happens?

If you look at the Alt-m list, and VA Outline, do they appear correct for this header file? I am wondering if there are any signs that our parser is having problems with this file.

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

krones2
Junior Member

Germany
14 Posts

Posted - Jan 18 2012 :  01:44:21 AM  Show Profile  Reply with Quote
Line 110 looks like this:
float hue,saturation,intensity;
and is part of a bigger struct.
Alt-G seems to work properly, it shows just six structs defined in the file.

Using Win XP SP3, Visual Studio 2008
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jan 18 2012 :  2:09:24 PM  Show Profile  Reply with Quote
Strange, a structure member like that in a different file should not have this effect on the function colouring. One last test before we try log files.

Can you please try rebuilding your VA symbol database, and then once the symbol database rebuild has finished make a new, empty .cpp file, and paste in the test function:


static void felineTestFuncColourForVA()
{
	Halcon::intensity(0, 0, 0, 0);
	intensity(0, 0, 0, 0);
}


what colouring do you see here for the two function calls? I am just wondering if somehow something in your normal code files is triggering this confusion, but I am not sure what that something might be.

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

krones2
Junior Member

Germany
14 Posts

Posted - Feb 07 2012 :  05:28:12 AM  Show Profile  Reply with Quote
The problem still exists, but I'm not able to invest more time into its investigation.
I hope you can reproduce the problem and it gets fixed soon, because reliable syntax highlighting is important to us and our 10 user license is due to be extended.

Thanks for the help so far!

Using Win XP SP3, Visual Studio 2008
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Feb 09 2012 :  7:16:32 PM  Show Profile  Reply with Quote
If you have the time, could you try generating some log files of this effect please? The cause is not at all obvious, and I appreciate it is taking to much time to try and find the trigger.

If you have the time, could you please enable VA logging, open a file with the colouring problem with "intensity" and try triggering the alt-g menu on "intensity" in a comment. After doing this please close the IDE to stop the log files from getting to large.

Hopefully the log files will offer some clues as to this problem.

Please see this FAQ for details of turning on VA's logging, and sending us the log files

http://docs.wholetomato.com?W305

zen is the art of being at one with the two'ness

Edited by - feline on Feb 09 2012 7:17:02 PM
Go to Top of Page

krones2
Junior Member

Germany
14 Posts

Posted - Feb 22 2012 :  06:51:15 AM  Show Profile  Reply with Quote
I did enable logging and send the logfile via support request to you. There is an interesting part in the logfile which shows the opening of the Alt-G menu:

GotoDef1
GotoDef4
GotoDef6
GotoDef6
GotoDef6
GotoDef6
GotoDef6
GotoDef6
VaEventPM   AddMenuItem 'P000731\\inspection\\cpp\\src\\pixel\\VI_AnalysisPixelRgb32.h:391    const double intensity ( ) const	&1', id=0x1, flags=0x400, icon=0x0
VaEventPM   AddMenuItem 'P000731\\inspection\\cpp\\src\\pixel\\VI_AnalysisPixelRgb48.h:391    const double intensity ( ) const	&2', id=0x2, flags=0x400, icon=0x0
VaEventPM   AddMenuItem 'P000731\\inspection\\cpp\\src\\pixel\\VI_AnalysisPixelRgb64.h:392    const double intensity ( ) const	&3', id=0x3, flags=0x400, icon=0x0
VaEventPM TrackPopupMenu id=0x0
 (2500 t)
EdMM


The entries are missing the correct entry. But why is the multiple times "GotoDef6"? Looks suspicious to me. I hope the logs help to fin the reason.

Using Win XP SP3, Visual Studio 2008
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Feb 22 2012 :  9:34:24 PM  Show Profile  Reply with Quote
I have the log files, thank you for these. Hopefully they will offer some clues:

case=64845

The multiple "GotoDef6" may be quite normal. Log files tend to be fairly cryptic, by their very nature.

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