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 not recognized
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Nov 24 2013 :  2:30:18 PM  Show Profile  Reply with Quote
I came across this today. In 2001 and this sample, line 20's "y" in (fp + i)->y is not recognized. VAX will not suggest members there after the "->" is typed.


01: int main(int argc, char* argv[])
02: {
03:     return 0;
04: }
05: 
06: struct foo
07: {
08:     int y;
09: };
10: 
11: int sample(foo* fpRoot)
12: {
13:     int     i;
14:     foo*    fp;
15: 
16: 
17:     fp = fpRoot;
18:     for (i = 1; i < 10; i++)
19:     {
20:         if ((fp + i)->y != fp->y)
21:         {
22:             // Sample failure in the "y" in (fp + i)->y above
23:         }
24:     }
25: }


Visual Studio 2008 Professional.
Ubuntu Mono font.
Microsoft Windows Server 2003.

Edited by - foxmuldr on Nov 27 2013 09:29:48 AM

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 26 2013 :  5:42:37 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=56340
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Dec 07 2013 :  1:55:29 PM  Show Profile  Reply with Quote
I have observed other similar effects under these conditions:

file1.cpp:
01:#include "file1.h"
02:
03:int main(int argc, char* argv[])
04:{
05:    someFunctionInFile2DotCpp(2);
06:}

file1.h:
01:#include "file2.cpp"
02:// Other code

// Update:  I didn't include this code previously, but it is here, and defined along these lines:
file2.cpp
01:void someFunctionInFile2DotCpp(int a)
02:{
03:    printf("%u\\n", a);
04:}


The someFunctionInFile2DotCpp() function is not recognized by VAX, but is showing up with red underlines. I have to explicitly press Ctrl+Space to get a list of auto-completion names to show up, and when I hover there is no popup. It does show up in Visual Studio's "Code Definition Window" correctly, and pressing Alt+G does take me to the correct file and source code line.

Visual Studio 2008 Professional.
VAX 2001.
Ubuntu mono font on Windows 7 64-bit Professional.

Edited by - foxmuldr on Dec 10 2013 04:13:10 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Dec 09 2013 :  7:01:21 PM  Show Profile  Reply with Quote
There is no declaration or implementation for the function someFunctionInFile2DotCpp() in the code sample you have posted, so in this situation its expected that VA will underline the function as a mistyped symbol.

Where does the declaration live, and is the file where this function is defined / implemented part of your solution?

Is this function listed in VA's Find Symbol dialog?

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

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Dec 10 2013 :  04:10:03 AM  Show Profile  Reply with Quote
quote:
Originally posted by feline

There is no declaration or implementation for the function someFunctionInFile2DotCpp() in the code sample you have posted, so in this situation its expected that VA will underline the function as a mistyped symbol.


The body of someFunctionInFile2DotCpp() is defined in file2.cpp, which is included in file1.h as an #include file, so it is/should-already-be defined by its use in the source code.

quote:
Where does the declaration live, and is the file where this function is defined / implemented part of your solution?


There is no header declaration. It is only the body being defined in file2.cpp.

The file is part of my solution, It is marked "do not compile" (because it is an include file to another source file).

quote:
Is this function listed in VA's Find Symbol dialog?


Do you mean Alt+Shift+F? No. It comes up with a message that the symbol is not known. However, right-clicking on the red-underlined symbol and choosing "Goto declaration" or "Goto definition" takes me to the correct line in the correct file in source code.

Also, Alt+G works on that symbol.

Edited by - foxmuldr on Dec 10 2013 04:11:53 AM
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Dec 10 2013 :  04:15:25 AM  Show Profile  Reply with Quote
To see the explicit example of this, load this project:
https://github.com/RickCHodgin/libsf/tree/master/utils/dsf/msvc%2B%2B/dsf/dsf

You can download the ZIP from here, and then extract that one directory:
https://github.com/RickCHodgin/libsf/archive/master.zip

That DSF project contains the files "builder.cpp" and "scale.cpp", both of which contain functions which are known to Visual Studio, compile correctly, but are in some ways not known to VAX.

Specifically, search in "dsf.cpp" for "builder_createAndInitialize" and you'll see the example. You'll see that "dsf.h" is declared near the top in source code. And that dsf.h includes both scale.cpp and builder.cpp near the top past the comments and other default Windows declarations. VAX should have enough information to recognize them since they are simple nested include files.

Edited by - foxmuldr on Dec 10 2013 04:22:52 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Dec 10 2013 :  7:29:19 PM  Show Profile  Reply with Quote
I have downloaded the "master.zip" file and I am seeing problems with VA 2001, but no problems with VA 2007. Can you please try installing VA 2007 and see if this fixes things for you as well?

http://www.wholetomato.com/downloads/default.asp

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

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Dec 11 2013 :  05:38:04 AM  Show Profile  Reply with Quote
"Can you please try installing VA 2007 and see if this fixes things for you as well?"

Absolutely I can. Let me check.
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Dec 11 2013 :  06:00:33 AM  Show Profile  Reply with Quote
2007 fixes this issue. Thank you.
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Dec 11 2013 :  12:17:41 PM  Show Profile  Reply with Quote
I have observed a related error in 2007. If you rename one of the functions in file2.cpp, it then does not recognize the name again, nor seemingly any of the functions defined in that file.

Edited by - foxmuldr on Dec 11 2013 7:44:11 PM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Dec 13 2013 :  9:57:41 PM  Show Profile  Reply with Quote
quote:
If you rename one of the functions in file2.cpp, it then does not recognize the name again


Do you have a test project that I can look into? I didn't find file2.cpp in master.zip. I have recreated your files in your Dec 07 2013 : 1:55:29 PM post, but wasn't able to reproduce the problem in file2.cpp. Although that file have only 1 function, so probably you're talking about something different.
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Dec 14 2013 :  01:20:10 AM  Show Profile  Reply with Quote
In the same master.zip file from before, rename one of the builder functions. I renamed builder_FreeAndRelease() to builder_freeAndRelease() if I recall correctly.
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Dec 14 2013 :  09:15:45 AM  Show Profile  Reply with Quote
I have observed on repeated days of use following the initial red-underline, that it no longer is red-underlined, however when I position my caret on the builder_createAndInitialize() token and press Ctrl+Alt+R, it dings at me because the symbol is not recognized. If I move to another keyword that is known to VAX, it refactors properly. And Alt+G still works.

It's an odd thing happening there. It's like it works partly, but doesn't work completely.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Dec 17 2013 :  08:25:56 AM  Show Profile  Reply with Quote
I found that function in dfs.sln, but unfortunately, I wasn't able to reproduce the problem here using VS2008 SP1 and VA 2001. Were you using that solution from master.zip?
Are you always able to reproduce the problem or just occasionally? I mean if you rename further symbol, all ceases to be recognized?

Another idea: since all other symbols are recognized, it might be possible that file reparsing is not triggered for some reason.

Can you please try whether reparsing the current file helps or not?

IDE VAssistX menu item -> Tools -> Reparse current file

Is the symbol recognized now?
Can you reproduce the problem now?

If it doesn't help, does it if you rebuild your symbol databases?

VA Options -> Performance -> Rebuild

Is the symbol recognized now?
Can you reproduce the problem now?

Regarding underlines: Visual Assist squiggles unrecognized symbols after you modify the file to save resources. The most reliable way to tell whether a symbol is recognized is to use navigation bar:



If you see something like this, it means the symbol is recognized. If you see something else (e.g. the filename on the left), or Navigation Bar is empty it means that the symbol is not recognized.
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Dec 17 2013 :  09:39:53 AM  Show Profile  Reply with Quote
I am using 2007.

"Are you always able to reproduce the problem or just occasionally?"
Always.
"I mean if you rename further symbol, all ceases to be recognized?
After the first change, all symbols cease being recognized. I cannot rename other symbols after the first Ctrl+Alt+R without manually doing a solution-wide find+replace using Ctrl+L.

Edit: I should note that I am still able to rename other symbols, just not those in builder.cpp. I have also just now tried changing a symbol name in scale.cpp. It worked. So, this is apparently limited to something in builder.cpp.

"IDE VAssistX menu item -> Tools -> Reparse current file"
Nothing changes after reparsing. I tried reparsing both builder.cpp and dsf.cpp.

"Is the symbol recognized now?"
No.
"Can you reproduce the problem now?"
Yes.

"VA Options -> Performance -> Rebuild"
This corrects the problem. Afterward, if I rename one of the functions, then all of them turn red underlined again and none of them are recognized any longer. If I then manually go into the builder.cpp file and reparse, nothing changes. All symbols are still not recognized. If I press Ctrl+Z to undo the mass replace, it reverts to the old name in every file, but it is also still not recognized.

"The most reliable way to tell whether a symbol is recognized is to use navigation bar."
I have not used the navigation bar previously as you have it. I'm not sure how to get it to appear as you show. I see the "Global Scope" portion, and the function name is to its right, stretched out across the width of the file being edited. When I navigate inside of any function in builder.cpp, it highlights the function name in that part of the bar I am able to see. I can use the pulldown to navigate to any function within the file. But I don't know how to make it appear as you have it above the Global Scope row.

When I'm in dsf.cpp with my caret flashing on any of the builder functions, the Code Definition window (which I have always open) navigates properly to the function and shows its definition line, however none of the symbols highlight and repeat to other matching instances in nearby code.

I don't know what I can do to help you. If you want to use TeamViewer or something to check it out ... let me know.

Edited by - foxmuldr on Dec 17 2013 10:20:51 AM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Dec 17 2013 :  11:57:14 AM  Show Profile  Reply with Quote
Thank you for the additional information. It helped to confirm that I'm doing the right test.

I've now redone the same test using VA 2007, but still not able to reproduce the problem. Thank you for offering TeamViewer, it will be a backup plan for developers if I won't be able to reproduce the problem, but first, I would like to try some more tests, because it would be ideal if we could be able to reproduce the problem in-house.

Are you using any other Visual Studio extensions?

Can you please export and send in your Visual Assist and Visual Studio settings? So I can import them here to see if I can expose the bug.

1. VA Options -> Performance -> Export Settings

2. IDE tools menu -> Import and Export Settings -> Export selected environment settings

You can turn on VA Navigation bar here:

VA Options -> Display -> Display Navigation Bar

The other Navigation Bar you're seeing is Visual Studio's alternative. But you don't need to turn it on, if you have reference highlighting, it is also excellent, since VA only highlight recognized symbols. (As you put it: "...however none of the symbols highlight and repeat to other matching instances in nearby code." So we know that the symbols are not recognized by Visual Assist.)
Code definition window is also a Visual Studio feature, so it doesn't matter what you see in it regarding this bug.
Finally, if you modify the file, Visual Assist underlines symbols it cannot recognize.
But this is just FYI, I have enough info for now.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Dec 17 2013 :  11:59:07 AM  Show Profile  Reply with Quote
Forget to add: you can send in your settings using this form:
http://www.wholetomato.com/support/contact.asp

Please paste the URL of the topic to the "Your Request" field, so we can match it up.
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Dec 17 2013 :  1:17:17 PM  Show Profile  Reply with Quote
"Are you using any other Visual Studio extensions?"
It's a native VS2008 install with SP1. The only add-on I use is VAX.

"Can you please export..."
Sent. See vax_2007__foxmuldr__20131217.zip.

"You can turn on VA Navigation bar here: VA Options -> Display -> Display Navigation Bar"
Okay. Cool! Yes, it shows up until I rename it. Then whatever was there before the rename remains until I hit another token it recognizes. Then if I navigate back in dsf.cpp to a line with any of the tokens named in functions in builder.cpp, it goes to blank (all white).

Edited by - foxmuldr on Dec 18 2013 06:28:40 AM
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Dec 17 2013 :  1:21:47 PM  Show Profile  Reply with Quote
I thank you for going through all of this to track it down.
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Dec 18 2013 :  12:53:47 PM  Show Profile  Reply with Quote
Some additional info. I did some refactoring today moving code from one project to another. I copied over scale.cpp and builder.cpp, but then edited the header after adding them to the project, and writing their #include "builder.cpp" lines. After I edited the header, the functions show up in red underlines, and even the VS Code Definition window shows the old location where the function would've been defined had the header not been edited.

I think this relates to a legitimate bug in VS on this particular file for some reason. If there's some troublesome syntax I'm using that could be refactored into something else I'd be happy to do so.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Dec 18 2013 :  8:59:20 PM  Show Profile  Reply with Quote
Thank you for sending in the files. I have replied to your email.
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Dec 19 2013 :  07:39:34 AM  Show Profile  Reply with Quote
I have sent the logs. I could only find va.log and vassist.log, not startup.log or errors.log. They were created in my c:\\ root directory.

The function I renamed was builder_createAndInitialize() to builder_CreateAndInitialize(). It caused the same red-underline errors.

Edited by - foxmuldr on Dec 19 2013 07:41:20 AM
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Dec 19 2013 :  09:31:42 AM  Show Profile  Reply with Quote
I have encountered a condition which is just as odd as these other errors. I was in the process of refactoring some width+height variables into an SSize structure with width and height members, and in the process I commented out two variables I had been using, lnWidth and lnHeight, so they would produce errors during compilation and I could go to each reference and fix it up. All of them showed up with red underlines except for on one source code line, which are the first two references of those variables in the function. See the attached image.

Is there some wonky thing going with my machine? It's a work computer, and it is a Dell. :-)




Edited by - foxmuldr on Dec 19 2013 09:32:28 AM
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Dec 19 2013 :  1:52:31 PM  Show Profile  Reply with Quote
Twice today I've also seen the display where something like this:

lnLeft   = someValue;
lnRight  = someValue;


was shown like this:
ln    Left   = someValue;
ln    Right  = someValue;


I was not able to make a screen shot before it went away. It lasted a few seconds and the first time it took me a few seconds to realize what was going on, and that it wasn't an issue in my code. The second time there was also a small gray rectangle drawn nearby in addition to the expansion. I positioned my mouse over the rectangle to see what it was, and it went away and the two source code lines nearby drew themselves properly.

Some really weird goings on here.

Edited by - foxmuldr on Dec 19 2013 1:53:44 PM
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Dec 19 2013 :  7:45:17 PM  Show Profile  Reply with Quote
The display issue has happened a few more times. It appears like a "jitter" on the screen, lasting only a brief time. It will draw a portion incorrectly, and then within a second or two redraw it correctly without keyboard or mouse interaction.

I have seen this happen during normal editing on entire code blocks, such as when I press PgUp/PgDn through navigation, or when I return to editing after debugging by clicking the "Stop" icon.

Edited by - foxmuldr on Dec 19 2013 7:46:56 PM
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Dec 20 2013 :  07:04:40 AM  Show Profile  Reply with Quote
I noticed this morning that I am also seeing stale symbols in the cache when I press Ctrl+SPACE. For example, if I rename builder_createAndInitialize() to builder_CreateAndInitialize(), then the old version shows up in the suggestion listing, even though it no longer exists. Rather than showing some definition information in the popup, it just says "Accept with: <TAB>" whereas the actual entries show some definition information as well.
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Dec 20 2013 :  07:05:47 AM  Show Profile  Reply with Quote
Note: I'm not trying to flood the forum with posts. I just keep seeing these odd issues which seem to be related to the same root issue. I hope the additional information will help track it down.
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Dec 22 2013 :  11:02:40 AM  Show Profile  Reply with Quote
As per your email, renaming builder.cpp and scale.cpp files to builder.h and scale.h removes the red underlined / unknown token issue, with everything working correctly.
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Dec 24 2013 :  09:12:08 AM  Show Profile  Reply with Quote
Three times this morning I've seen the bug mentioned on Dec 19 at 1:52:31 PM, as well as the improper redrawing. I managed to capture it the second time. It persisted for longer and when I moved my mouse over the rectangle area, you can see VAX responding to hover events. It's just not drawn properly.





Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Dec 24 2013 :  09:18:07 AM  Show Profile  Reply with Quote
Note: Still using 2007, with the same settings as the email I sent you.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Dec 25 2013 :  09:38:44 AM  Show Profile  Reply with Quote
This seems to be a redraw problem. Does it disappear if you scroll this out of the screen and than back? (e.g. via pressing page down and then page up)
I'm wondering if it would happen with VA disabled in the extension manager.
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000