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
 VA 2393: continues coloring VB.NET code randomly
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Nov 05 2020 :  08:54:50 AM  Show Profile  Reply with Quote
As mentioned, it still does it, no reason, no pattern, just sometimes, some .vb files, usually only after loading a vb.net solution, closing the file and reopening makes it disappear. I first thought it might be related to having multiple instances of VS with varying solutions, but doesnt seem to be it.
No completions, no other functionality afaik. Just coloring of variables and methods.

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Nov 05 2020 :  10:39:06 AM  Show Profile  Reply with Quote
Is there any sense that this is a solution specific effect?

Are these vb.net files open when you first load the solution, or are you opening after loading the solution?

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

ChrisG
Whole Tomato Software

USA
299 Posts

Posted - Nov 05 2020 :  10:43:28 AM  Show Profile  Reply with Quote
How long has this been happening about?
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Nov 05 2020 :  10:45:06 AM  Show Profile  Reply with Quote
Only files that are open when loading the solution. Not related to the solution as I've seen this in 3 different VB solutions.

As for how long... at least for the last year, reported it long time ago.

Edited by - Uniwares on Nov 05 2020 10:45:51 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Nov 06 2020 :  04:54:07 AM  Show Profile  Reply with Quote
No sign of the problem here, in a couple of simple tests.

Just a simple sanity check, if you disable VA via:

VAssistX -> Enable/Disable Visual Assist X

does this instantly remove this odd colouring?

Does changing files, while keeping them open, have any effect on this problem? I will keep on trying to see if I can reproduce here with your settings and sample solution.

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

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Nov 06 2020 :  05:03:11 AM  Show Profile  Reply with Quote
When disabling VA it "goes away". But when active, I can edit the file normally and coloring remains working, although that's the only functionality available from VA.
Next time it happens I send in a screenshot, with and without VA.
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Nov 06 2020 :  07:41:16 AM  Show Profile  Reply with Quote
Here is an example of it. In this one only the ".Text" is colored, although most often also methods and variables are colored. What I noticed, it seems to happen only after VS asks to restart in admin mode. (elevated rights needed to debug app)

with VA enabled:


With VA disabled:


Go to Top of Page

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Nov 06 2020 :  11:27:32 AM  Show Profile  Reply with Quote
two better shots with all the bells and whistles:









Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Nov 06 2020 :  12:22:02 PM  Show Profile  Reply with Quote
Ahha! I have installed / imported all of your extensions and settings, and created a C# and VB.NET solution, one project for each language, and thrown some complex, random .vb files from github into it, and I have reproduced this!

Now I just need to simplify this down a bit.

I think part of the problem is that this colouring is only triggering on certain symbol names, and I was focusing on function calls, the functions that make up the class its self, rather than functions / symbols inside the functions. Looking in the wrong place effectively.

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

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Nov 06 2020 :  12:36:36 PM  Show Profile  Reply with Quote
Can we direct a "fix" for this into full support of VB.NET?
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Nov 09 2020 :  04:50:57 AM  Show Profile  Reply with Quote
I think i got a repro of it now.
I need a VS open with a C# solution, then I open another instance of VS, load a VB.NET solution, start debugging, it asks to restart with admin credentials (app requires elevated rights), VS restarts, loads the VB.NET solution and when the focus falls back to the VS editor window, VA is coloring the VB code.

Facts:
* closing the VS instance with the C# solution does not affect it
* closing and reopening the .VB file does no longer color it
* I can disable and enable VA as many times I want and coloring will work as long as I dont close the .vb file
* I can edit the file as much as I want, coloring continues to work in it.

Edited by - Uniwares on Nov 09 2020 06:00:44 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Nov 09 2020 :  09:48:26 AM  Show Profile  Reply with Quote
What I have reproduced here is partly, maybe fully dependent on other extensions interacting with VA. It is also quite fragile. When I make a change to pin down the trigger the problem tends to go away, only to reappear again after a restart or two.

Just working through your extension list to try and find a fairly minimal case. It is possible restarting the IDE with admin credentials is echoing the restarting I am having to do here to trigger the problem.

As for turning a "fix" into full support for VB.NET, you can always ask if I don't answer I don't have to say "no"

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

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Nov 09 2020 :  09:55:18 AM  Show Profile  Reply with Quote
All right, that sounds like there is something fishy that can be fixed. Waiting now for full VB support.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Nov 09 2020 :  2:00:29 PM  Show Profile  Reply with Quote
OK, I have made some "interesting" progress. Here is a screen shot of a .VB code fine, in a VS2019 solution, containing one VB.NET and one C# project. It's an incredibly simple test solution, with all of 2 code files. I have imported your VS2019 settings, but I have Not installed VA at all, this is a clean test with just a standard install of VS2019, no extra extensions at all.

It turns out the VB colouring you are seeing, at least the colouring from one of your screen shots, is the expected default behaviour, not caused by VA, and the lack of colouring seems to be some form of interaction problem between the various extensions that you have installed. But even then, it's a very fragile / random behaviour in my testing.



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

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Nov 10 2020 :  04:59:47 AM  Show Profile  Reply with Quote
Actually, none of the extensions should do any screen rendering, except the scrollbar map, and this should not interfere with coloring at all. I will check out a new profile and test the scenario when I get a bit of time today.
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Nov 10 2020 :  05:43:28 AM  Show Profile  Reply with Quote
So, I uninstalled all extensions that are not default, made a new profile and thats what the same VB code piece looks like rendered by VS no admin mode:



Next step: testing the admin mode, testing the same with VA 2393 installed. stay tuned
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Nov 10 2020 :  05:50:39 AM  Show Profile  Reply with Quote
Just skipped the admin mode test after installing VA2393 and seeing the following (no second instance, no C# projects or solutions, just plain VB.NET solution)



The file automatically loaded with the solution got color enhanced by VA. When I now disable VA, visuals return to the screen shot before without extensions.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Nov 10 2020 :  08:26:35 AM  Show Profile  Reply with Quote
Is it possible to get a copy of this file, or even the solution, to test here? Something is going on here, but I am not sure what, and you are seeing something stable and reliable.

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

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Nov 10 2020 :  08:29:44 AM  Show Profile  Reply with Quote
I can send you the file, not the solution though. Its a 3000 lines VB file, though size shouldn't make a difference.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Nov 10 2020 :  2:57:40 PM  Show Profile  Reply with Quote
We have to be missing some key piece of information here.

I have the files, many thanks for these.

I have started with a clean machine, installed VA 2393, imported your IDE and VA settings, and then created two different test solutions. One is a "VB WinForms" solution, and the other is a "VB WPF App". In both cases I have added all of the VB files you sent me to the solution.

I have made sure to save the solution, and restart it with the file "frmMain.vb" open, and I am at the same point in the file as your screen shots show, and no odd colouring at all.

I have tried rebuilding my VA symbol database, no difference.

You are seeing this on demand, and I am not seeing this at all under any "normal" conditions. The project type is about the only thing left I can think of that might be a factor. Should I try a different project type? Target .NET Core instead of .NET?

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

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Nov 11 2020 :  06:17:31 AM  Show Profile  Reply with Quote
The project type used here is .net framework 4.8. I will try to create a new similar project, lets see what comes out.
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Nov 11 2020 :  06:35:12 AM  Show Profile  Reply with Quote
Another VB project, same effect. Sending solution to you.




Edited by - Uniwares on Nov 11 2020 07:08:29 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Nov 11 2020 :  12:59:49 PM  Show Profile  Reply with Quote
I have the solution, thank you for this. I am not even close, this is what I am seeing:



taking a simple example, I have done a find in files for "InputString", checking for whole word match and case sensitive. I am only getting references in 3 files, and in all cases this is a variable.

So even if VA was parsing the VB code, it should never identify "InputString" as a method name, but this is what it is being coloured like for you.

If you open VA's Find Symbol dialog and search for "InputString" are you seeing any results?

I ask since we almost have two separate problems here. Why is VA applying syntax colouring to a language it is not enabled for, but also, why is it deciding that InputString should be coloured as a method? A lot of the other colouring at least makes some sense, but a variable as a method?

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

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Nov 11 2020 :  1:03:52 PM  Show Profile  Reply with Quote
I don't get any symbols at all in a VB solution (as expected). Although I see something in the symbols that shouldn't be there but that is for another post.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Nov 12 2020 :  07:10:12 AM  Show Profile  Reply with Quote
Does a VA symbol database rebuild make any difference?

When I opened the solution here I got a couple of complaints about other projects that the SLN file referenced that could not be found / opened, but obviously these are not defining symbols that VA recognises since the Find Symbol dialog is empty.

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

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Nov 12 2020 :  08:17:55 AM  Show Profile  Reply with Quote
There are two projects that are not included (i dont even have the code) but that should be the only complaint, no other dependencies.

Rebuilding the database:
I rebuild it, started the VB solution and no coloring at all. Then, I closed it, opened a larger C# solution, opened another instance of VS with the VB solution, there it was again: frmMain.vb nicely colored by VA.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Nov 12 2020 :  12:30:55 PM  Show Profile  Reply with Quote
This only makes sense if rebuilding VA's symbol database isn't causing a rebuild for all instances... it turns out this is in fact happening, which I think has to qualify as a bug, not a feaure:

case=143080

it seems safe therefore to assume that the symbols are known from a different solution, either C++ or C#, or possibly even either language. So this becomes my next test.

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

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Nov 12 2020 :  12:38:44 PM  Show Profile  Reply with Quote
Now we are digging very deep, aren't we? Looks almost simpler to just add VB as supported language
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Nov 12 2020 :  1:02:17 PM  Show Profile  Reply with Quote
Still no problem! I have created a new, default C# .NET Core console solution, and added the following, "nonsense" code. I am sure I could get it to compile and remove the underlining, but it doesn't matter for this test:



it is enough that it has VA colouring "InputString" as an italic function.

First I trigger a VA symbol database rebuild, and open a single instance of VS2019, and load this test solution.

Then I close the solution, and load the VB test solution, which opens with the .vb code file open.

No problems with the colouring at all.

Restarting VS2019 between the two solutions doesn't make any difference either.

I am starting to wonder if the C# NuGet packages VA symbol database corruption problem you have seen is somehow involved in all of this:

case=142203

No evidence for this at all, but it would help to explain why get this all the time but it cannot be reproduced here.

If you want to try and find a trigger, instead of relying on the VA symbol database rebuild button you are going to need to look for and manually delete the data directory where VA is storing your symbol databases, under

C:\Users\ %USERNAME% \AppData\Roaming\VisualAssist
so you can start with a known clean situation and just use a single IDE instance, to see what the trigger is.

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

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Nov 12 2020 :  1:09:16 PM  Show Profile  Reply with Quote
I see what I can get out of this, give me bit of time to play around with it. In the meantime you can get back to VA+C# 9.0, muahahahaha.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Nov 14 2020 :  11:12:52 AM  Show Profile  Reply with Quote
You are SO kind! Hopefully you can pin down some form of sensible pattern here.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000