T O P I C R E V I E W |
foxmuldr |
Posted - Nov 24 2013 : 2:30:18 PM 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. |
30 L A T E S T R E P L I E S (Newest First) |
foxmuldr |
Posted - Dec 28 2013 : 8:55:28 PM I don't have any co-workers that use Visual Studio 2008. I don't know what the cause is. It has not happened in the past several days of heavy development ... so what can I say? :-) In all honesty, I would chalk it up to this Dell computer if it didn't happen on other machines as well. I don't use Visual Studio 2010, 2012 or 2013 so I can't even say it's not just this version, or a bug with VA and VS2008 only, one that wouldn't appear in other VS versions...
I'm content to let it be. If it becomes troublesome I'll bring it back up. |
accord |
Posted - Dec 28 2013 : 5:56:40 PM An effect like this can be very frustrating. I'm wondering how could we see whether it is a Visual Assist problem or not without disabling it. Do you see any clue if it's a Visual Assist problem or not? First of all, we should know this before doing further investigation.
Do you have co-workers with similar setup (with or without VA)? Do they see similar problems? |
foxmuldr |
Posted - Dec 25 2013 : 1:02:30 PM It happens so sporadically... I could disable VA, but then I might be hours of not using VA without it every making an appearance.
In this case I was able to hover, press Alt+PrtScn, launch GIMP, paste into GIMP (where I saw it did not capture the hover text), go back to VS2008, hit the standard PrtScn key, and then paste again, crop down, edit, and return to VS2008 and it was still there. Only when I began navigating again with scrolling did it finally go away.
The other instances of misdrawing last on a few seconds (two or three at most) and then automatically correct themselves with or without intervention. It seems to be an internal thing that fires on a timer, or when a thread completes, so it redraws itself automatically. |
accord |
Posted - Dec 25 2013 : 09:38:44 AM 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. |
foxmuldr |
Posted - Dec 24 2013 : 09:18:07 AM Note: Still using 2007, with the same settings as the email I sent you. |
foxmuldr |
Posted - Dec 24 2013 : 09:12:08 AM 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.
|
foxmuldr |
Posted - Dec 22 2013 : 11:02:40 AM 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.
|
foxmuldr |
Posted - Dec 20 2013 : 07:05:47 AM 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. |
foxmuldr |
Posted - Dec 20 2013 : 07:04:40 AM 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. |
foxmuldr |
Posted - Dec 19 2013 : 7:45:17 PM 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. |
foxmuldr |
Posted - Dec 19 2013 : 1:52:31 PM 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. |
foxmuldr |
Posted - Dec 19 2013 : 09:31:42 AM 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. :-)
|
foxmuldr |
Posted - Dec 19 2013 : 07:39:34 AM 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. |
accord |
Posted - Dec 18 2013 : 8:59:20 PM Thank you for sending in the files. I have replied to your email. |
foxmuldr |
Posted - Dec 18 2013 : 12:53:47 PM 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. |
foxmuldr |
Posted - Dec 17 2013 : 1:21:47 PM I thank you for going through all of this to track it down.
|
foxmuldr |
Posted - Dec 17 2013 : 1:17:17 PM "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).
|
accord |
Posted - Dec 17 2013 : 11:59:07 AM 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. |
accord |
Posted - Dec 17 2013 : 11:57:14 AM 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. |
foxmuldr |
Posted - Dec 17 2013 : 09:39:53 AM 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. |
accord |
Posted - Dec 17 2013 : 08:25:56 AM 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. |
foxmuldr |
Posted - Dec 14 2013 : 09:15:45 AM 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. |
foxmuldr |
Posted - Dec 14 2013 : 01:20:10 AM 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.
|
accord |
Posted - Dec 13 2013 : 9:57:41 PM 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. |
foxmuldr |
Posted - Dec 11 2013 : 12:17:41 PM 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. |
foxmuldr |
Posted - Dec 11 2013 : 06:00:33 AM 2007 fixes this issue. Thank you. |
foxmuldr |
Posted - Dec 11 2013 : 05:38:04 AM "Can you please try installing VA 2007 and see if this fixes things for you as well?"
Absolutely I can. Let me check. |
feline |
Posted - Dec 10 2013 : 7:29:19 PM 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 |
foxmuldr |
Posted - Dec 10 2013 : 04:15:25 AM 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.
|
foxmuldr |
Posted - Dec 10 2013 : 04:10:03 AM 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.
|