Author |
Topic |
pedro123a
Senior Member
45 Posts |
Posted - Feb 28 2018 : 1:16:41 PM
|
Hi,
can you please stop VA from messing with what I enter. I enter slowly letter by letter in a new line exactly these chars:
#include <string>
if I have VA enabled I end up with this mess:
#include <string.h>
why is it doing all these random fixups. In one project it constantly was changing `i` into `I`. Personally I cannot use VS without VA, but for some reason I start to hate these issues commit from VA more and more. |
|
pedro123a
Senior Member
45 Posts |
Posted - Feb 28 2018 : 3:15:36 PM
|
if for whatever reason VA decides to mess with user's input it should possibly only do that if whatever entered is an error.
if I enter "int i=0;" it cannot possibly be an error, and should never be changed to "int I=0;" if I have somewhere a `#define I` in a header or something like that. I have no idea how possibly VA decides to change <string> to <string.h>, this doesn't make sense.
Also, all the time VA just pisses me off completely when I enter correct include line as-is and VA ****s up it with double ending bracket, from:
#include <something.h>
ends up as:
#include <something.h>>
|
Edited by - pedro123a on Feb 28 2018 3:17:55 PM |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Feb 28 2018 : 5:42:27 PM
|
Which IDE and version of VA are you using?
Are you seeing any listboxes in either case? If you were accepting a listbox then it would make sense that what you are typing is replaced / added to, but this should be obvious, since you are accepting a listbox.
Which OS are you using? If you are using Windows 10 can you please check Windows Update, and see if there are any new updates available for your system, and install them if they are? There is a known problem with the Windows Fall Creators update to Windows 10 that can cause VA to fail to show listboxes and other windows sometimes. So if this was happening, it might explain why you are not seeing any listboxes, but VA thinks you are accepting a listbox. This problem has been fixed by a later Windows 10 patch, but if you have the Creators Fall update, but not the later patch, you may be vulnerable to the problem. |
zen is the art of being at one with the two'ness |
|
|
pedro123a
Senior Member
45 Posts |
Posted - Mar 01 2018 : 04:14:59 AM
|
vs2015 sp3 (all updates), VA_X.dll file version 10.9.2237.0 built 2017.10.03, Win10 all updates, not sure if I have that fix for listboxes, I've seen links somewhere and when I followed I wasn't able to find anything that I could download and install.
When I type that stuff I do so very slowly and there is a box shows up, and I'm not accepting anything. After I enter "include <" at this point closing ">" is added and I type string already enclosed in angled brackets. When I complete typing "string" and press trailing ">" at this point VA adds up ".h" before final closing ">". I believe I've had these kind of annoyances with VA for a very long time. |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Mar 01 2018 : 07:32:26 AM
|
Knowing you are seeing the listbox helps to explain what is happening here. The closing > is being taken as meaning you want to accept the listbox, along with the currently selected item in it, which I suspect is always "string.h" in this example. To stop this happening, close the IDE and edit the following registry key setting:
https://support.wholetomato.com/default.asp?W769
this will tell VA to stop offering listboxes by default when typing in #include statements.
This does not explain why "i" is constantly being turned into "I" though, especially when creating a new variable. If you turn Off the setting:
VA Options -> Editor -> Repair case
does this make any difference? If it does, this is a useful clue, but I would still like to understand why VA is making this correction at this point. |
zen is the art of being at one with the two'ness |
|
|
pedro123a
Senior Member
45 Posts |
Posted - Mar 03 2018 : 06:43:22 AM
|
the i -> I is something that I've seen in the past and it was extremely annoying. All my loops were broken all the time and required fixing and most importantly VA is super freaking annoying that it insist to **** up this `i` even when I fix it, I had to Ctrl+Z and press space or something like that otherwise even when I edit VA ****s it up again. I don't have the problem now, most of these issues from VA show up randomly. I guess using smart pointers' and their .get() method is the same never ending annoyance from VA: it always insists to correct it to ->get() and you always need to fight with VA. Totally hate dealing with this **** when your line of thoughts gets interrupted by this nonsense.
Regarding include and suggestions. I do want suggestions from VA (in fact sometimes I type some header name that I'm not sure about and I ask myself, where is VA suggestion?), but in general I absolutely DO WANT to be able to type any code as-is on my own. Sometimes I type fast some code without even looking at the screen and it ends up messed up crap because VA spiced it up with random errors. IMO ">" as an "accept listbox" is total WTF. The box shows up offers suggestions, reflects live when I type more (e.g. filters for only matching includes) and only when I press TAB, UP or DOWN the selection in the box should be made and only at that point VA may consider that something was accepted.
I would probably even opt out from VA suggestions if I typed less than first leading 3 chars. If something is this short to type then I don't want any suggestions, when I have some freaking long variable name that resembles a short novel then yes, please do complete that novel for me. |
|
|
pedro123a
Senior Member
45 Posts |
|
pedro123a
Senior Member
45 Posts |
Posted - Mar 04 2018 : 03:42:36 AM
|
Another case when suggestions that VA offers are totally out of whack:
https://image.ibb.co/dw0U3S/image.png
This is the only ctor that Image has: Image(Texture::Type type, Texture::Format format, unsigned int width, unsigned int height, unsigned int depth, unsigned int mipLevels, unsigned int arraySize);
What are these 10 random suggestions that VA offers? Maybe there are some Image classes elsewhere, but in the file that I'm working with there is only a single Image class available.
Alt+G leads to correct Image class. I assume that this shortcut is VA thing and brings me to location of the class where VA believes the class is located. So, WTF are these random suggestions that VA offers? Also, I use more and more "find definition" from VS itself, as it's usually correct and whatever VA offers is 50% of the time some random crap.
|
Edited by - pedro123a on Mar 04 2018 03:45:32 AM |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Mar 05 2018 : 10:48:49 AM
|
I am seeing the same problem with the "scale_argb.cc" code file, thank you for the very helpful example. I am currently shrinking the file, to try and find out why this is going wrong. If you look at VA Outline, instead of the Alt-m list, are you seeing all of the functions you expect to see? I am just making sure I know all the problems to search for here. |
zen is the art of being at one with the two'ness |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Mar 05 2018 : 12:41:57 PM
|
It took me a little while before I spotted the pattern here. Its the "enum" keyword in the parameter list that is causing some functions to be missing from the Alt-m list, which is definitely a parser bug:
case=114839
Apologies for this. I am just surprised it has not come up before. |
zen is the art of being at one with the two'ness |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Mar 05 2018 : 12:53:07 PM
|
I don't know what is going wrong with the Image constructors. Is this also happening in the Chromium code base? I am wondering, if I download a copy of the Chromium code, would I be able to see this problem, and the problem with i being converted to I? I can then try to understand what is going wrong, and put in a clear bug report for these problems. |
zen is the art of being at one with the two'ness |
Edited by - feline on Mar 05 2018 12:57:21 PM |
|
|
pedro123a
Senior Member
45 Posts |
Posted - Mar 13 2018 : 5:29:04 PM
|
Can you also please check why that huge annoyance happens with i -> I correction suggestion? Somehow randomly VA sometimes prevents me from using something[i] in loops, it just corrects it to "I" even though this code is inside a for loop that has this "i" variable. Even when I fixed all md5.c instances in my codebase not to #define I, I still wasn't able to use i in loops, this time VA offered me another I from rapidjason's document.h that has this code:
union Number { #if RAPIDJSON_ENDIAN == RAPIDJSON_LITTLEENDIAN struct I { int i; char padding[4]; }i; ...
it's just crazy, I have this loop:
for (int i=0; i<N; ++i) { children[I] = StartChild("start0", 1000, [&](int pid, const char *str) { ... });; }
and I cannot type children[i], VA corrects it to I because some file (possibly included though precompiled headers maybe?) has that struct I. That suggestion doesn't even make sense. Also, #define I from md5.c was a .c file, not even a header, that suggestion totally didn't make sense.
|
|
|
pedro123a
Senior Member
45 Posts |
Posted - Mar 13 2018 : 5:46:28 PM
|
the because my project uses harfbuzz\src\hb-ot-shape-complex-use-table.cc I cannot many single letter vars, VA constantly annoys me with these bogus suggestions. Can it be configured not to correct single letter vars? |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Mar 14 2018 : 07:37:43 AM
|
So far I cannot reproduce this problem. For me "i" is always left as "i", even after adding the line:
#define i I
to my code, to try and encourage this problem. If you tell VA to close suggestion listboxes on an exact match, as explained here:
https://support.wholetomato.com/default.asp?W357
does this make any difference? As soon as you have typed a single letter variable name, and if VA knows there is a matching single letter variable, then the listbox should close, so in theory this should help and fix the problem. It depends on the exact trigger. If the problem is a listbox being accepted then this should fix it. If the problem is VA's "Repair case" setting then this won't help. Which is why I would like to reproduce this here.
I am now looking for the "hb-ot-shape-complex-use-table.cc" file to try and test, and reproduce the problem you are seeing. |
zen is the art of being at one with the two'ness |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Mar 14 2018 : 5:15:28 PM
|
Using Git I have grabbed a copy of the harfbuzz tree:
https://chromium.googlesource.com/external/github.com/harfbuzz/harfbuzz/
and then used a script of mine to generate a testing VS2015 solution that contains all of the .cc, .hh, .c and .h files in this directory tree. Then I opened "hbotshapecomplexusetable.cc" and at the very bottom of this file I added the function:
void testTypingShortVar()
{
int nTot = 0;
int t = 0;
for(int i = 0; i < 10; ++i)
{
nTot += 20;
t += 2;
t = t + 2;
}
} I had no problems at all typing or using the variables "i" "t" or "nTot". Am I testing the right thing?
If you type slowly do you still see this problem with "i" becoming "I", and if so, what are you seeing? Is a listbox appearing and being accepted? Is the text just changing on its own? |
zen is the art of being at one with the two'ness |
|
|
pedro123a
Senior Member
45 Posts |
Posted - Mar 16 2018 : 5:17:02 PM
|
Somehow this happens from time to time, as if VA finally discovers these suggestions and starts to suggest them to me all over the place. I cannot test the registry thing now (for CloseSuggestionListOnExactMatch) as the problem again disappeared (I did clean on all VA databases recently). |
Edited by - pedro123a on Mar 16 2018 5:17:26 PM |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Mar 17 2018 : 10:00:33 AM
|
The registry key setting may help you regardless, if you ever go back to having VA help with #include suggestions, since at the bottom of the description it says:
quote: It also applies to include suggestions - if you type "string" and there is an exact match without an extension, the listbox will close at that point.
When this problem with "i" becoming "I" starts again, can you please try and take note of what exactly happens? Are you seeing a listbox?
The fact it does not happen after a symbol database rebuild is interesting. If the file "hbotshapecomplexusetable.cc" is part of the solution you are normally working on then VA should always be aware of these definitions. If so, this suggests the problem may be coming from something else.
So next time this happens, can you please try pressing Alt-G on the "I" that "i" has been turned into, and see if there is a particular file and definition that might be related to this problem?
Without knowing what is triggering this problem, it is harder than I would like to get to the bottom of it. |
zen is the art of being at one with the two'ness |
|
|
pedro123a
Senior Member
45 Posts |
Posted - Mar 19 2018 : 5:42:48 PM
|
when I had the I problem Alt+G would open md5.c that has defines for I, when I "fixed" md5.c not to have these defines, then VA would lead me rapidjson include where that suggestion doesn't even make sense.
Another annoying issue with VA is that Alt+G constantly offers me totally bogus suggestions: https://i.imgur.com/1pXPC3m.png I have lambda with two params, and RBX::HttpServerResponse is a simple class, with no inheritance, no template mess. Why on earth would VA offer me some random instances where end() method exists?! It seems that there is a clear way to repro this issue where VA offers you everything possible. As you see from screenshot I didn't even complete yet the line, but I wanted to Alt+G to the function to see it. Appears that if I complete the line so that there is no compilation error, then Alt+G will show 2 suggestions in .h and .cpp file of this function. On that screenshot as you see trailing semicolon is still missing, without it I get that giant list of bogus suggestions, with semicolon present I get proper suggestions. IMO VA should be able to show correct function and proper suggestions when I have only this on the line: res.end At this time Alt+G should offer proper suggestions. With F12 for example it doesn't work with just res.end, but when I have res.end() then F12 already works. If I have res.en with cursor positioned at the end of ".en" and press Ctrl+Space, I get it autocompelted to .end, so it knows about end function, and it should be able to offer me to go to it without finishing all args. |
Edited by - pedro123a on Mar 19 2018 5:44:59 PM |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Mar 20 2018 : 09:35:51 AM
|
I have not checked out "md5.c" for any of my tests yet, so I may not be testing "i" being converted to "I" with the right code files. I am happy to try a different test, if you can give me some instructions on what test to set up and run to try and reproduce this problem?
For the alt-g list, your screen shot very clearly shows the problem, but with a pair of simple tests I cannot reproduce this problem here so far. In a .h file I have defined the class:
class simpleFelineTestClass
{
public:
simpleFelineTestClass *start(const char* pszMessage) const;
simpleFelineTestClass *end(const char* pszMessage) const;
}; and then in the matching .cpp file I have the tests:
void testingAltGNoSemiColon()
{
simpleFelineTestClass res;
// very simple test case, alt-g works correctly here for both "end" calls
if (1 > 0)
res.end("file deleted");
else
res.end("error")
// trying for Lamdba syntax test
// alt-g on both calls to "end" works here as well
auto glambda = [](auto a, auto&& b) {
if (a < b)
res.end("file deleted");
else
res.end("error")
return a < b;
};
} if I grab the correct directory tree from Git, will I be able to test the file you are using when you have this alt-g problem, to see if I can reproduce it here? It's clearly going wrong, but I don't know what the trigger for the problem is. Its not quite as simple as no semi-colon, something else has to be happening as well. |
zen is the art of being at one with the two'ness |
|
|
pedro123a
Senior Member
45 Posts |
Posted - Mar 22 2018 : 2:29:04 PM
|
That code is from non-public code. It includes lots of stuff (from precompiled header that pulls in windows.h, std and boost). In my case it's absolutely clearly that if a line isn't valid c++ (e.g. not completed) then I get this nonsense broken result. The moment when I complete result is correct. |
|
|
pedro123a
Senior Member
45 Posts |
Posted - Mar 22 2018 : 2:30:49 PM
|
Another issue with similar wtf: https://image.ibb.co/dVOREc/image.png
when i take that second option it opens me this: https://image.ibb.co/fgvOuc/image.png complete WTF (line is correct, but that suggestion is complete nonsense).
There should have been there IMO two options: class itself and ctor and ctor should have been first options IMO in that context (and possibly, it should have been only option). |
Edited by - pedro123a on Mar 22 2018 3:34:04 PM |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Mar 23 2018 : 06:17:04 AM
|
For the alt-g on a line requiring a semi-colon at the end, is there any chance of getting a copy of the code file for testing purposes? I understand this is often not possible, but it's worth asking on the off chance.
If there is a chance files can be submitted privately via the form:
http://www.wholetomato.com/support/contact.asp
please include this thread ID or URL in the description, so we can match it up.
Agreed, the behaviour here does not make any sense. Is this from anything public that I can download and test here, to try to reproduce?
I notice that there is underlining in the first screen shot, so something, the IDE or VA, is slightly confused by the code, or just thinks there is a missing include line. I have no idea if this is a factor or not though.
There is no doubt that you are encountering problems and bugs, I just wish I could more easily reproduce some of these here, to put in good bug reports for them. VA should not be this unreliable, but clearly something is going wrong here. |
zen is the art of being at one with the two'ness |
|
|
pedro123a
Senior Member
45 Posts |
Posted - Apr 11 2018 : 2:58:08 PM
|
Sorry for late reply, I'll check if I can submit something. I'll also update to latest VA first and see if I have the errors. Meanwhile, there are others from he same series that do not make sense. This is a piece of code in question, and when I hover over `server.listen` I get correct tooltip: https://image.ibb.co/c91Arc/image.png
When I Alt+G however I get nonsense: https://image.ibb.co/gqxiBc/image.png
(not sure if I already mentioned it, but it would be super helpful to be able to post images here inline, especially using ctrl+v without creating files, just like imgbb.com allows). |
|
|
pedro123a
Senior Member
45 Posts |
Posted - Apr 11 2018 : 9:11:58 PM
|
fyi, here's video of the extremely annoying i -> I conversion. https://youtu.be/1mr_YhQ3v_4 I updated to latest VA, deleted all ipch folders and vc db files, in VA I rebuild db and restarted VS and I get exactly the same problem in my project. Then I created empty ConsoleApplication project in VS and there I do not get the problem. Even when I added to the console app project md5.c that defines that 'I' and VA stuffs in every place where I want to use 'i' I did not see that behavior in simple console project. Somehow VA doesn't not behave consistently and something else breaks it.
I changed that CloseSuggestionListOnExactMatch to 01 and I still get that "for (int i=0; I<)" See screenshot, just before I press '<' and when I type '<' VA changes i to I. https://image.ibb.co/gGu07H/image.png
Interestingly, in the ConsoleApp I even get opposite behavior. If I type "for (int i=0; I)" then I'm offered correction to i. However, pressing '<' or ';' does not accept suggestion the way it does in real project. Complete nonsense. I don't understand what could possibly be the a reason of such inconsistent behavior. There is one plugin that I use and I believe that it's hopelessly broken software: p4vs plugin. In that real project p4vs plugin is used, however I tried to disable it temporarily and it doesn't affect the I problem. |
Edited by - pedro123a on Apr 11 2018 9:49:40 PM |
|
|
pedro123a
Senior Member
45 Posts |
Posted - Apr 11 2018 : 10:01:30 PM
|
Can you do something about it? This **** is so annoying that I cannot even use VA. 30 seconds after I was done wasting time with the i-loop I get it again:
https://image.ibb.co/jdLOSH/image.png
This time it's define R that comes from 3 different sources according to Alt-G: sha256.c (from curl), hb-ot-shape-complex-arabic-table.hh/ hb-ot-shape-complex-use-table.cc from harfbuzz |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Apr 12 2018 : 12:10:44 PM
|
For the "server.listen" tooltip vs alt-g, do you have:
VA Options -> Floating Buttons and Icons -> Denote content from Visual Assist with tomato icons
turned On or Off? I am trying to work out if this is an IDE tooltip or a VA tooltip. If this is an IDE tooltip, then this suggests the IDE understands what is going on, but VA does not. What is shown in the VA Context and Definition fields for "server" both on this line, and the line above, where "server" is declared?
This will tell us something about what VA thinks is going on here.
For i being converted to I, mostly I am confused to be honest. It makes sense that there is no listbox when defining the variable "i" at the start of the for loop statement, since when VA thinks you are declaring a new variable, it does not offer suggestions by default.
The listbox I am seeing in the movie has "int" as the selected item, so if this is happening because the listbox is being suggested then "i" should be becoming "int", not "I".
The listbox in your screen shot shows a listbox with "I" as the selected item, so in this case the listbox at least explains why "i" might be becoming "I". |
zen is the art of being at one with the two'ness |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Apr 12 2018 : 12:40:48 PM
|
Is it worth turning off suggestions, so you simply get fewer VA listboxes, and hopefully fewer problems?
VA Options -> Suggestions -> Enable Suggestion Lists
I can see that things are going wrong here, but like you, I am confused by the random nature of these problems. But something needs doing about all of this, we just need somewhere to start. |
zen is the art of being at one with the two'ness |
|
|
pedro123a
Senior Member
45 Posts |
Posted - May 11 2018 : 6:54:54 PM
|
> VA Options -> Floating Buttons and Icons -> Denote content from Visual Assist with tomato icons
both are enabled.
> What is shown in the VA Context and Definition fields for "server" both on this line, and the line above, where "server" is declared?
I have no idea what's "VA Context and Definition". I tried to find it, don't see where it is.
For the server.listen it's very consistently totally wrong stuff. Just like one of those Alg+G that always leads to that total BS namespace x = ... that I posted.
I get that i->I r->R all the time. It's incredibly irritating and I've always had all types off issues like that, I just got used to undo and redo, and I'm absolutely sure that nobody simple bothered to stop right there in the middle of trying to type a loop and report a bug on VA (which requires lots of effort by the way). I got so fed up by all the bugs that I finally decided to report it as the issues seems to stay forever. Every now and then when I get these irritating bugs from VA I come back to post more stuff.
This time I have this problem. I compile code, I get error message in output. I press F4 to open the file. VS open the file, but I get that stupid dialog from VA:
https://image.ibb.co/jh5vBJ/image.png
apologies if I've already reported this one. But sometimes VA gets stuck in some weird mode that I literally see random irritating issues every couple of minutes coming from VA.
|
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - May 12 2018 : 09:15:28 AM
|
Apologies for not explaining, the VA Context and Definition fields are normally at the top of the editor window, and are where the Alt-m list appears from. They show VA's understanding of the current caret position. So if VA is showing the wrong information for the current symbol, this will show up here, and it is quicker and easier to just move the caret around the file to see which symbols VA understands, and which it is confused about, than it is to use and check alt-g on each of them in turn.
You are having a lot of problems here, which is not how things are supposed to work, but so far I have not been able to reproduce or study these problems here, which isn't helping.
At least one bit of good news, the message about VA not being able to edit the file should be fixed in our latest release, 2270:
http://www.wholetomato.com/downloads/default.asp |
zen is the art of being at one with the two'ness |
|
|
Jeff
Whole Tomato Software
USA
260 Posts |
Posted - May 12 2018 : 6:12:14 PM
|
Pedro: Be sure the following is unchecked:
VA Options | Enhanced Listboxes | Commit selection with | Additional characters |
|
|
pedro123a
Senior Member
45 Posts |
Posted - May 14 2018 : 09:14:09 AM
|
> Be sure the following is unchecked:
which ones? |
|
|
Topic |
|