T O P I C R E V I E W |
pedro123a |
Posted - Aug 18 2019 : 9:16:27 PM
So, I type `const std::string` and at this point I'm ready to type `&` char. See what suggestions VA offers, and most importantly I don't understand WTF it accepts this ridiculous first suggestion when I type the `&` character? WTF is that seriously, pure abomination. Since when `&` became char to accept suggestions!? It just drives me crazy then VA offers to change something when whatever was manually entered is already a correct fully qualified type or a variable name. Can you please fix this extreme annoyance?
And can you please fix your forums. It's almost 2020 outside, 20 years since 2000, but you still required some image upload instead of simply Ctrl+V to paste screenshot. |
28 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - Mar 26 2020 : 07:51:45 AM I have put in a bug report for the forum not handling square bracket characters correctly
case=142045
if it is easier, you can always just email us instead at
[email protected] |
feline |
Posted - Mar 26 2020 : 07:25:33 AM Apologies for the problems you are having here. First the code. Can you please look and see if you have:
VA Options -> Editor -> Repair case
turned On or Off. If this is turned On, does turning it Off make any difference here? I would expect VA to understand this local variable, and be happy with you typing "i" but clearly this is not what happens here. Since neither "i" or "I" are in the listbox, we can rule out the listbox being accepted by the ] character.
If you type a simple local function in the same file, e.g.
static void simpleVATestFunction(Symbol testSymbol3gperf)
{
const std::vector<std::string_view> &syms = getAllSymbols();
for(size_t i = 0; i < syms.size(); ++i)
{
// testing loop var with no round brackets
syms[i];
// testing loop var with round brackets but no ASSERT_EQ
if(syms[i] < 1) { }
}
} do you still get the same problem? I am working on the theory that something is triggering this problem, perhaps it is something to do with the TEST macro defining the function. I am just trying to find the trigger. |
feline |
Posted - Mar 26 2020 : 07:05:18 AM Just posting your images without the square brackets in the names, and the surrounding text, to make more sense of the code bug report.
Can you somehow put some hardcoded fix to stop annoying "fixes" in for loops or variables declared right there. It's so freaking annoying that I want to punch my monitor each time I get one of these bogus suggestions that totally breaks my normal typing.
I type this code:
and I'm about to type `i]`, the moment I type `i` I get a list of bullshit suggestions:
and when I type `]` VA replaces `i` with `I` that wasn't even among those bullshit suggestions:
I simply type without accepting any suggestions and end up with this shit. Can you please somehow fix this ridiculous mess? It's extremely annoying. Just in case if you care, the `I` thing comes from some lib that's used by some lib from one of the projects in my solution and that `I` in that code is a define used for md5 code in a .c file. There is no way they can be connected, no idea how VA picks it up. Even though it's a define that survives until the end of the .c file, it shouldn't be used outside of that file where it was defined.
Can't VA parse current scope and see valid vars and not try to offer replacements for them that way if there is var in the function, or for loop it wouldn't try to offer ridiculous fixes like that? |
pedro123a |
Posted - Mar 26 2020 : 01:49:21 AM Can you somehow put some hardcoded fix to stop annoying "fixes" in for loops or variables declared right there. It's so freaking annoying that I want to punch my monitor each time I get one of these bogus suggestions that totally breaks my normal typing.
I type this code:
and I'm about to type `i]`, the moment I type `i` I get a list of bullshit suggestions:
and when I type `]` VA replaces `i` with `I` that wasn't even among those bullshit suggestions:
I simply type without accepting any suggestions and end up with this shit. Can you please somehow fix this ridiculous mess? It's extremely annoying. Just in case if you care, the `I` thing comes from some lib that's used by some lib from one of the projects in my solution and that `I` in that code is a define used for md5 code in a .c file. There is no way they can be connected, no idea how VA picks it up. Even though it's a define that survives until the end of the .c file, it shouldn't be used outside of that file where it was defined.
Can't VA parse current scope and see valid vars and not try to offer replacements for them that way if there is var in the function, or for loop it wouldn't try to offer ridiculous fixes like that?
And yes, you don't see images because your broken forum software manages to break it somehow. I don't want to create screenshots and then upload files. Instead, I paste it online, and get a link. When I attach it in this forum I simply paste url in the upload box. Chrome downloads it to a tmp file and uploads it. While doing so chrome names that file image[1].png:
and it ends up this way in your forum: https://forums.wholetomato.com/forum/uploaded/pedro123a/202032614955_image[1].png However, when your forum tries to display it url encodes square brackets: https://forums.wholetomato.com/forum/uploaded/pedro123a/202032614955_image%201%20.png
and it seems that your server doesn't handle correctly when parts of url are url encoded. That's why you don't see my screenshots. You'll need to copy image url and manually fix to square brackets to see them.
Update2: this forum software is complete trainwreck: it destroys filename completely and irrevocably. It replaces [1] with %201%20 which aren't related in any way. Total bugware. You'll need to fix urls manually and replace %201%20 with [1] in the urls to see uploaded images. This is how it looks like on my end, as you can see URLs are correct when editing it, but when displayed brackets are replaced with %20 which is spaces. Bugware
|
feline |
Posted - Oct 07 2019 : 09:05:39 AM I am sorry you are having so many problems. A small piece of good news, I have some ideas we can start with to try and make sense of what you are seeing, and to at least remove one or two variables from all of this.
You mention there being two sources of intellisense, giving very different results. This is actually probably happening. There is the IDE intellisense parser, there is also VA's intellisense parser, and then there are VA suggestions. So this is actually 3 different sources of listbox content, powered by two different parsers.
The VA setting for the source of listbox content is:
VA Options -> Enhanced Listboxes -> Source of C/C++ content: Visual Assist OR Default Intellisense
if this is set to Default Intellisense then VA will wait for and expect the IDE to produce a listbox. If the IDE does not produce a listbox, then VA will step in to produce one instead. Going back up this thread, I see you have the source set to VA. However, unless you have actually disabled IDE intellisense then it could still be a factor. So, can you please set:
IDE tools menu -> Options -> Text Editor -> C/C++ -> Advanced -> Disable Database = True
and restart your IDE. At this point the only parser behind listbox content should be VA, which removes one variable from all of this.
When you mention pressing Ctrl-Tab to see a listbox, do you really mean Ctrl-Tab, or do you mean Ctrl-Space?
By default Ctrl-Space is mapped to the command "Edit.CompleteWord", which means "give me EVERY symbol that could go here". So going from a short number of items to a very long list that no longer focuses on the local variable is actually the expected result of pressing Ctrl-Space after typing a few letters. This is the very problem VA Suggestions are supposed to help solve, but that assumes they are working correctly.
So, rebuilding the VA symbol database fixes some of the problems, but only very briefly at best. This suggests that our parser is having problems understanding your code. If we assume this, then a lot of the problems with listbox content seem more reasonable. We just need to try and find out what is confusing VA, and work out what to do about it.
Specific examples, you have the bit of code:
BOOST_AUTO_TEST_CASE(WebSocket)
{
RBX::HttpServer server;
} where you are getting random members listed for this instance. If you place the caret into the namespace "RBX" or the class "HttpServer" what does VA show in its context and definition fields? These are normally at the top of the editor, and are where the Alt-M list appears.
If you use Alt-G on these two symbols, what happens?
If you make a simple test function, like:
void simpleTestVAClassUnderstanding()
{
RBX::HttpServer server;
} and place this at the top of a file, before calling any of the BOOST TEST macros, do you get the same behaviour or different behaviour? I am trying to find out if the BOOST TEST macros are a factor.
For the screen shot where you have typed:
wsC
and the listbox has the item "WsClient", notice this item has the tooltip saying "class WsClient{...}"
Assuming this is the correct name of this class, including the case, then this actually makes a degree of sense, since if you ignore the local variable "wsClient" then this makes a sensible suggestion in this setting. This could happen if VA is confused about the file layout, and if you are in a function body or not.
When you have the screen shot of Alt-g beeing used on the function call in the line:
wsClient->connect();
and F12 also gave the wrong result. But what happens if you use Alt-G on "wsClient" its self? What happens when you use Alt-G on the actual type of wsClient, where the variable is declared? Again I am trying to find out where things start breaking down. |
pedro123a |
Posted - Oct 05 2019 : 7:53:23 PM regarding IDE tools menu -> Options -> Environment -> Documents -> Show Miscellaneous files in Solution Explorer: I have it off: https://i.ibb.co/KqMDPvY/image.png
Regarding keyboard: I'm absolutely sure it has not problems. When it happened I tried to switch to others apps and type the same and no problems happened. I tried it multiple times and it was always happening in VS only. I recall however, that due to RDP sometimes on receiving side there might be some other flags flipped when processing KB events (I've done some processing in code and I recall seeing some differences, but I don't recall exact details, in short over RDP mouse handling is very different and I also saw some differences in kb events), so it might be related to RDP. However, I feel that I've also seen the problem happening locally. Also, after I restarted VS the problem was gone (I'm fairly sure I didn't restart RDP session).
Suggestions in listboxes are totally different problem, I just don't want to create each time a new thread and lose track of my posts. I usually come back here when I see a new problem :) So, today I'm here for another problem. Often I type some code and I get completely ridiculous suggestions: https://i.ibb.co/0ZFvG1f/image.png (this screenshot by itself has nothing ridiculous, please read on)
Note, that `server` is a local variable declared right at the top of the test. It's a very simple class, with no templates or inheritance, only 30 lines long. How can I possibly get list of members that are totally our of whack from some obscure part of our code base from some third party library. I wanted to also show what the proper list has to be and I got this: https://i.ibb.co/7CP80HM/image.png which is exactly the same broken output. I went to HttpServer ctor to show real list of members and here's what I get: https://i.ibb.co/PNQbJZK/image.png Now you can see that they have nothing to do with what VA is suggesting me in a test... BUT look at this humongous listbox. This entire class is 30 lines of code and has no inheritance. There is no way to have more than 30 possibilities that are valid after `this->`, but the list box seems to be offering every possible name from my entire codebase. I scrolled down by 9 items, the last valid item is `~HttpServer` and from that point on I have huge list of irrelevant trash: https://i.ibb.co/Zf1Jfrp/image.png
Edit 1: After I've tried to list members in that HttpServer I came back to my test and now I get proper list with no irrelevant stuff: https://i.ibb.co/j5Xms0c/image.png
Edit 2: And funny part, after I finished reporting the issue, I went back to VS and it was working, so I reported that in Edit 1. After that I went back to VS and ... here's what I get now: https://i.ibb.co/JR5S8yj/image.png wtf... :)
Edit 3: From the first day VA was awesome to help avoiding typing obvious stuff. Not anymore: https://i.ibb.co/HGqrQsp/image.png obviously I wanted it to autocomplete wsClient: after tying `wsC` I pressed ctrl+space and got that irrelevant huge list of trash suggestions.
Edit 4: I cleared VA database, now when I start typing I see right away proper suggestion: https://i.ibb.co/TbFtQqF/image.png, but if I press ctrl+tab I get that same broken list of useless stuff. And by the way, the suggestion that I see ins't "proper" at all. VA suggests `WsClient` instead of `wsClient`
Edit 5: just like my posts show total nonsense that I see with all the suggestions now, whatever I type I get totally irrelevant trash from VA right now. As if it's in some self destructing mode trying to force me to uninstall it. It also constantly alternating from correct and completely wrong. As if there are two sources of intellisense info that randomly switch. After I type a sentence I switch to VS and it's working, I comeback here and then it's not working. Total train wreck. Also, when I press Alt+G I get huge list of weird suggestions: https://i.ibb.co/60jn8bc/image.png (5th suggestion would be correct). When I press f12 it immediately goes to correct location (edit: nope, it goes to wrong location :\) |
feline |
Posted - Oct 01 2019 : 07:18:06 AM Interesting. I had a keyboard die on me in a similar manor a while ago, but when it happened when I pressed one key, a different key was being sent / entered, which affected all programs. Once I realised what was going wrong, it was obviously the keyboard, but it was very confusing at first. |
MichaelH |
Posted - Sep 30 2019 : 10:09:01 AM @pedro123a: Just to make sure and to exclude that as an potential source:
Can you check & verify if your keyboard works correctly (e.g. by writing a short program in Notepad++ or so - any text editor that takes the input as you type it)? A while back my keyboard was dying on me, sometimes registering some keypresses not correctly (either not at all or as different keys) - I did not notice it in office-type applications since it only happened once in a while (thanks autocorrect) but it caused all kinds of weird "typos" in my code (missing letters or wrong letters) which was driving me insane...
|
feline |
Posted - Sep 30 2019 : 09:43:21 AM Hopefully the characters not being entered is a separate problem to the strange suggestions in the listboxes. At least for now I want to try and make sense of these separately.
For characters not being entered, I have found your previous forum posts about this, and the problem should already be fixed in VA:
https://forums.wholetomato.com/forum/topic.asp?TOPIC_ID=14151&whichpage=2
the problem in this thread was related to how files were being opened in the IDE, causing VA to be inactive in the file until the file was reopened.
There are a couple of other situations where I have seen trying to type a character fail. Can you please see if you have the IDE option:
IDE tools menu -> Options -> Environment -> Documents -> Show Miscellaneous files in Solution Explorer
turned On or Off. If this is turned On can you please try turning this Off and see if it makes any difference? When this setting causes a problem like this we are actually running into an IDE bug, where the IDE is telling VA that we are working in a different code file to the actual current code file.
The only other time I can recall a problem like this is in a file with VERY complex macro or template code, something that really causes problems for our parser, making us run slow, and get confused about the file content and context. This is very rare, but one of the clues here is that the problem is file specific.
So next time you find you cannot enter characters when typing, can you please try changing to another code file, and see if this makes any difference? I am wondering if what you are seeing is file specific or not.
As for the listbox suggestions, does rebuilding the VA symbol database have any effect on the quality of the listbox suggestions?
Also does turning Off any of the VA Suggestions settings have any effect on these suggestions? If we at least knew which VA settings were a factor it would help to explain where the listbox items are coming from. |
pedro123a |
Posted - Sep 28 2019 : 7:21:01 PM quote: Originally posted by feline ... Thinking about this, do you have:
VA Options -> Suggestions -> Include bits of code from surrounding lines
turned On or Off?
It's On on my side: https://i.imgur.com/f1etbuQ.png
Regarding RDP: I use VS sometimes locally. I've had issues with swallowed letters similarly to "break", but it was rare. But when it happens you DO NOTICE that :) as you cannot type some stuff. I'm sure I posted similar stuff within a year or two here on forums. When "break;" happened I was using VS over public internet (rdp to my office machine). When std.string happened, it was local ethernet at the office from mac to pc. |
feline |
Posted - Sep 28 2019 : 07:14:55 AM Thank you for the update. I would not expect RDP to be a factor, but the fact that you always use it, and I am not testing with it is a noticeable difference. Do you ever work locally / directly on the machine with Visual Studio installed on it? I am wondering if you are able to work directly on the machine, to test if any of these problems are only happening over RDP or not.
I would not expect the listbox content, where you are seeing "queue<std.string>" listed to be effected by RDP, but something is going on here.
I can almost see how the "r" for break not being entered being somehow related to RDP. Are you working over a local network? The internet? Via a VPN? Wireless or wired connection? I am trying to get a sense of how solid and reliable the RDP connection is, and if characters not being reliably received at the IDE end is possible. The video looks smooth, but it's a possible theory to consider.
I do work with RDP myself sometimes, but am not used to seeing any of these problems when doing so.
Watching the video closely the listbox did "blink" when you were expected to have typed the "r" letter, as if some form of keyboard input was received, but it wasn't a normal ASCII character, so it wasn't entered.
When you do a VA symbol database rebuild does it have any effect on the "queue<std.string>" problem, or any of your VA problems? If this is caused by VA database corruption that happens over time then I would expect the database rebuild to fix the problem for a few days, hopefully longer. However if it has basically no effect then it suggests that this is "deliberate", in the sense that something in your solution is encouraging VA to put this into the listbox.
Thinking about this, do you have:
VA Options -> Suggestions -> Include bits of code from surrounding lines
turned On or Off? If you are working with this turned On, does turning it Off have any effect? I can see how this setting would encourage VA to put "queue<std.string>" into a listbox, which would at least be a start. |
pedro123a |
Posted - Sep 28 2019 : 05:04:41 AM One note regarding that project with broken "break;". It had messed up line endings. When I reopened the solution VS offered to correct them |
pedro123a |
Posted - Sep 28 2019 : 05:01:12 AM quote: Originally posted by feline
I have installed all of your extensions except for one. I cannot find "Behaviors SDK (XAML)" in the extension store. Searching online for it isn't turning up anything particularly useful either. The closest I have come to a result is this page:
https://social.msdn.microsoft.com/Forums/en-US/9700e883-cbdd-414c-9d95-7a770333db15/behaviours-sdk-in-visual-studio-2015
I have no idea what that "Behaviors SDK (XAML)" is, something came with default install of VS, I didn't intentionally install it.
The std.string happen in a fairly large solution, very likely related to the solution. I clean databases regularly. Right now I tried to type again const std::string and I don't get anymore that queue<std.string>. I've had this thing a few times previously though.
|
pedro123a |
Posted - Sep 28 2019 : 04:53:19 AM Yet another one, total WTF. https://streamable.com/3j0i9
believe or not, but I type there "break;" slowly char by char. When I was working I noticed that it was swallowing "r" in break, I though I mistyped it, so I retried it and I see this nonsense. The only difference now is that I use rdp to this machine... Oh, I just realized that I always use rdp to this machine :) except today I rdp from home, and before that I did rdp from my mac to my desktop that sits under my desk. At the same time I have another VS solution open and I can type there "break;" with no issues.
I closed the solution, re-opened it and the problem disappeared. Before that it was 100% repeatable.
|
feline |
Posted - Sep 24 2019 : 4:06:49 PM I have installed all of your extensions except for one. I cannot find "Behaviors SDK (XAML)" in the extension store. Searching online for it isn't turning up anything particularly useful either. The closest I have come to a result is this page:
https://social.msdn.microsoft.com/Forums/en-US/9700e883-cbdd-414c-9d95-7a770333db15/behaviours-sdk-in-visual-studio-2015
which seems to be saying this extension is somehow installed via NuGet. If you disable this extension, does it have any effect on the problem you are seeing? If not, then I probably don't have to worry about not having it installed. |
feline |
Posted - Sep 24 2019 : 3:24:06 PM Does this problem always happen when typing after at least one comma?
So far I cannot even get "queue<std.string>" to appear in the listbox. So that is one obvious difference between what I am seeing here and what is happening for you. Looking closely at your original screen shot the "const" is typed after a comma, and in the movie you are again typing after a comma.
If this happens at specific types of scope that might be an important clue, for example when calling functions with multiple parameters, or typing out function prototypes with multiple parameters? |
feline |
Posted - Sep 24 2019 : 2:36:26 PM Have you tried rebuilding your VA symbol database yet?
Can you please try making a new, default C++ solution, and see if you get the same problem there, in that solution? I am trying to check if this is a solution specific problem or not.
I am now installing all of the extensions you have installed, to see if this reproduces the problem here. |
accord |
Posted - Sep 24 2019 : 2:27:03 PM You can disable accepting listboxes by seemingly random characters via deleting the content of this editbox:
Tools -> Options... -> Text Editor -> C/C++ -> Advanced -> Member List Commit Characters
This setting will stop the behaviour for member listboxes. The setting in the VA options dialog only affects suggestion listboxes, but not member listboxes.
Hope this helps and makes sense. |
pedro123a |
Posted - Sep 24 2019 : 1:45:41 PM I cannot even work with VA enabled at this point, VA breaks regular workflow where I constantly need to undo its mess. EXTREMELY annoying. |
pedro123a |
Posted - Sep 24 2019 : 1:23:17 PM https://streamable.com/fgug5
how come it ends up with that incredible mess. `std.string`, really!? And yes, in that video substitution happens when I type `&` character. These are my list box settings:
https://imgur.com/JiOh0m5
latest VA, latest VS2015 All the updates that I have installed: https://imgur.com/wBolUdA https://imgur.com/aOAmCdn |
pedro123a |
Posted - Sep 24 2019 : 1:13:44 PM quote: Originally posted by feline ... case=90920
In passing, your code has no return type (void) but it is returning something.
That's not my code, but if _m_impl->set_request_uri return void, then it's OK to return it.
I've captured a video of that extremely annoying behavior when suggestions from VA are totally out of whack and outright wrong C++ substituted when I manually type completely correct code without relying on auto-correct/intellisense. The problem is that I cannot even attach it here. |
feline |
Posted - Sep 06 2019 : 09:37:18 AM I am seeing the same problem with the type and parameter name being the same. Like you, I have no idea why someone would want to do this, but yes, it is confusing VA. I think this is covered by:
case=90920
In passing, your code has no return type (void) but it is returning something. |
pedro123a |
Posted - Sep 04 2019 : 3:33:05 PM I'll try suggestions above. I enabled "Include bits of code from surrounding lines" will see if it changes anything.
One other issue I found:
/// <summary> /// Set the underling URI of the request message. /// </summary> /// <param name="uri">The uri for this message.</param> void set_request_uri(const uri& uri) { return _m_impl->set_request_uri(uri); }
No idea why some people like to call their vars with the same name as the type, as you can see here param is "const uri& uri". Alt+G when I place caret on type of `uri` doesn't bring me anywhere, it simply doesn't work. |
feline |
Posted - Aug 20 2019 : 2:48:27 PM Thank you for the information about remote desktop. Occasionally this has been known to be a factor, but I don't see how it would effect what the listbox is showing / selecting as you type.
Are you using the same keyboard layout / language on both the local and the remote machines? I am wondering if this could be a factor. If the key you are pressing on your local keyboard, and the key that Windows thinks you are pressing are different, then it can be rather confusing. But this does not explain everything, and does not explain why the & character stopped accepting the listbox.
So far I cannot get VA to include "queue<std.string>" in the listbox at this point, let alone every time I finish typing "string".
It would make a little bit of sense if you had:
VA Options -> Suggestions -> Include bits of code from surrounding lines
turned On, since then VA will look at what you have typed, and if it looks similar to something else, VA can suggest pieces of code. If so, turning this Off should stop this happening.
If you have the time can you please try making a new, default C++ solution, and see what VA does there when typing "std::string"? I am wondering if there is something in your main solution that is somehow confusing VA, or if this will happen everywhere.
Another thought, can you try pressing the button:
VA Options -> Performance -> Rebuild symbol databases
and then restart your IDE. I am wondering if a problem in VA's symbol database might be behind some of this, if so, this should help a bit. |
pedro123a |
Posted - Aug 19 2019 : 2:03:32 PM This whole thing seems broken big time. When I type `std::strin` I see `string` suggestion that makes sense. The moment I press `g` suggestion changes to that insane `queue<std::string>`, I don't see any logic in that suggestion AT ALL. Imo suggestions should predict/propose what I want to type next, and AND NOT what I didn't type before that (ed `queue<` part would need to be before std::string, not after it). Also, just like you weren't able to repro with `&` I don't get that behavior right now. But I can assure you that when I reported it, I tried it multiple times and it was 100% reproducible that `&` was making VA selecting that `queue<std::string>`, also I tried to enable that `Additional characters` option now and I still don't get that insane behavior when `&` was making that selection. So, not sure what you guys do in the code, but I do get these types of things happening that drive me crazy. The only thing that's unusual with my setup is that I have more than one workstations and I mostly work through rdp. I do win10 to win10 connection, or macos to win10 using MS's remote desktop. When I had the problem I was using win10-win10 over mstsc.
|
pedro123a |
Posted - Aug 19 2019 : 1:52:11 PM I use vs2015 and latest VA. These are the settings:
|
feline |
Posted - Aug 19 2019 : 06:31:20 AM Upgrading the forum isn't currently a priority, since the current system works. It is a matter of finite resources and focusing them where they can do the most good. |
feline |
Posted - Aug 19 2019 : 06:28:35 AM Which IDE and version of VA are you using?
Do you have the VA option:
VA Options -> Enhanced Listboxes -> Commit selection with - Additional characters
turned On of Off? If this is turned On, can you try turning this Off and see if this makes any difference?
So far I cannot reproduce the listbox being accepted in this situation with '&', testing using VS2017 and VA 2341.2 with commit selection with additional characters turned Off. |
|
|