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
 10s hang when VA View wants to show a char*
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

torbenl
Junior Member

Germany
11 Posts

Posted - Jul 06 2023 :  08:15:57 AM  Show Profile  Reply with Quote
Hi,

I am experiencing massive issues with VA's "VA View" when it tries to show information about anything that is a char* or a char[].

What I observe:
I have VA View not visible, everything is working fine.
I now open VA View with "update on position change" option enabled.
I can click onto any symbol in the code and the VA View gets updated.
The moment I click on a variable that is of type char* or char[], the whole Visual Studio hangs for about 10 seconds. During that time, in the task manager devenv.exe is consuming one full core. Once Visual Studio responds again, the VA View content is empty, so nothing for that variable is being shown.
I can continue to click on any other symbol to see the information appear in VA View, but as soon as I click on another char*/char[] VS hangs again for 10 seconds and after that VA View is empty.
If I switch on VA View's "update on mouse hover" option, then hovering a char*/char[] already triggers the 10s hang.
If I now close the VA View window, the issue persists, until I restart Visual Studio with the VA View window already closed or until I disable Visual Assist completely.

I have tried to clear cache, rebuild symbol database, rescan solution, clean build, etc. I also tried to selectively disable different features in Visual Assist to find out which one might cause it, without success.

Any help appreciated, as I find the VA View very helpful and would like to use it.

Visual Studio Professional 2022 (64-bit) Version 17.6.4
Visual Assist 10.9.2488.0

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jul 10 2023 :  08:43:45 AM  Show Profile  Reply with Quote
That is really quite strange, I am not at all sure what to make of this.

As a very simple test, I have added the following struct to a header file:

struct testViewCharMemberTypes
{
	int nMemberInt;
	char nMemberChar;
	char *pMemberCharStar;
	char nMemberCharArray[30];
};

and then in the matching cpp file I added:

static void simplyUsingStructForView()
{
	testViewCharMemberTypes foo;
	foo.nMemberInt = 3;
	foo.nMemberChar = 'd';
	foo.pMemberCharStar = &(foo.nMemberChar);
	foo.nMemberCharArray[0] = 'e';
}

can you please try this test case and see if you get the same slow down with VA View here? I am not seeing any problem here so far, testing VS2022 17.6.3 with VA 2491.0

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

torbenl
Junior Member

Germany
11 Posts

Posted - Jul 10 2023 :  09:13:32 AM  Show Profile  Reply with Quote
I have tried this and the issue does not happen there.

However, I kept experimenting and came up with this minimal test case with a single .cpp file:

struct S
{
   char* foo1;     // <-- Clicking on foo1 here works
};

char* foo2;        // <-- Clicking on foo2 here causes hang

void f(char* foo3) // <-- Clicking on foo3 here causes hang
{
   S s;
   s.foo1;         // <-- Clicking on foo1 here works
   foo2;           // <-- Clicking on foo2 here causes hang
   foo3;           // <-- Clicking on foo3 here causes hang
}


Very strange. VA seems to behave differently for class members vs. globals or function locals.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jul 10 2023 :  1:03:02 PM  Show Profile  Reply with Quote
Thank you for the code sample. The only part I can reproduce so far is that VA View is blank on the problem lines, but this makes sense since these are not complex types, and they are not member variables either, so there isn't anything for VA View to show for these items.

"foo1" has the struct it is part of to show.

Do you get the same hang and CPU usage spike in a new, default C++ solution? I am wondering if this is somehow solution specific. That could make sense especially if there are some complex macros at work that VA is running into.

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

torbenl
Junior Member

Germany
11 Posts

Posted - Jul 11 2023 :  04:45:47 AM  Show Profile  Reply with Quote
Ok, I understand that the view being blank is normal, makes sense, thanks. So it's just the massive hang, and not VA being unable to look the symbol up or something.

And yes, unfortunately this was with a 100% fresh solution with just that one single .cpp file :(

Edit: I had also tried to disable other Extensions to check if some where interfering, but also with no success.

Edited by - torbenl on Jul 11 2023 05:11:46 AM
Go to Top of Page

torbenl
Junior Member

Germany
11 Posts

Posted - Jul 11 2023 :  05:38:27 AM  Show Profile  Reply with Quote
So I went ahead and enabled the logging and clicked first on foo1 and then on foo2. Maybe that information is helpful to you?

foo1:
SetStatusInfo
ParserThreadJob: RefreshHcb
 (47 t)
updatehcb called for symbol :S:foo
updatehcb called for symbol :S:foo
ParserThreadJob completed in 0 ticks
EdTmr:151
 (109 t)


foo2:
SetStatusInfo
ParserThreadJob: RefreshHcb
 (32 t)
updatehcb called for symbol :foo2
updatehcb called for symbol :foo2
GetBaseClassList 1 :char
GetBaseClassList 2 :__countof_helper
GetBaseClassList 3 :char
GetBaseClassList 3 :_SizeOfArray
GetBaseClassList 2 :_UNALIGNED
GetBaseClassList 2 :_CountofType
GetBaseClassList 2 :_Array
GetBaseClassList 2 :_SizeOfArray
GetBaseClassList 2 :__wspiapi_countof_helper
GetBaseClassList 3 :char
GetBaseClassList 3 :_N
GetBaseClassList 2 :__CountofType
GetBaseClassList 2 :_N
ParserThreadJob completed in 15765 ticks
 (15765 t)
EdTmr:151
 (16 t)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jul 11 2023 :  07:45:48 AM  Show Profile  Reply with Quote
Really strange. Let's see if this is, somehow, profile specific. It is possible something in your default IDE profile is a factor, although I am not sure how that would work.

Can you first download the VS2022 specific installer for Visual Assist from:

https://downloadfiles.idera.com/WholeTomato/VA_X_Setup2488_0_x64.vsix

Next you will need extra details about the IDE install to create a test profile. To get these details, please open a Windows command prompt window, and inside the window run the command:

"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"

There will be a set of lines for each different version of Visual Studio that you have installed. For the version you want to install into, you want the "productPath", "dispalyName" and "installationVersion" lines, e.g.

productPath: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe
displayName: Visual Studio Professional 2022
installationVersion: 17.4.33213.308

You can then use the information from these three lines to make sure that the following command has the correct command line parameters. The values are:

/appidname: = displayName:
/appidinstallpath: = productPath:
/skuVersion: = installationVersion:

The "/skuName:" value is one of "Community / Pro / Enterprise", note for the Professional version it is "Pro", not the expected "Professional".

The working command, for VS2022, using the values above, is - split into lines to make it easier to read and edit:


"C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\VSIXInstaller.exe"
/appidinstallpath:"C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe"
/skuName:Pro
/appidname:"Visual Studio Professional 2022"
/skuVersion:17.4.33213.308
/rootSuffix:"VATest" "C:\Users\%USERNAME%\Downloads\VA_X_Setup2488_0_x64.vsix"


The "rootSuffix" is the name of the test profile you want to install to, and this will be created if it does not already exist. The final parameter is the path of the VSIX installer for Visual Assist that you want to install. Once you have the command set up, the only parts you should need to edit are the skuVersion and the path to the VSIX file, can you please close all instances of Visual Studio and run this command.

Running this command installs VA into the test profile, but it does not load the test profile. If you created the test profile by installing VA, when you run the test profile it will be using the default IDE settings, without asking you which settings you want to use.

To now load the test profile you use the command:

"C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe" /RootSuffix VATest

To load your normal, default profile just load the IDE normally. To return to this test profile again, pass the /RootSuffix command line switch when loading the IDE. You can run both profiles at the same time, next to each other. In VS2019 and VS2022 the profile name will be shown just under the close button, in the top right hand corner of the main IDE window. If you export your IDE settings from your main profile you can them import them into the test profile.

Assuming all of this makes sense, does the problem show up in the test profile?

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

torbenl
Junior Member

Germany
11 Posts

Posted - Jul 11 2023 :  09:03:20 AM  Show Profile  Reply with Quote
I have followed your steps and here's the observation.

Running VS with the new profile starts a clean VS instance. I can open the test project above, open the VA View window and select any symbol without any issues at all.

Then I close VS and open it again (with the same new profile) and open the same test project. And now the issue is back again.

This I can repeat: Create new profile VATest2, starts up and everything works, close and reopen VS once and the issue is there again.

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jul 11 2023 :  11:40:57 AM  Show Profile  Reply with Quote
That is REALLY strange. Each new profile gets its own copy of the VA symbol database, so this suggests that the problem is something happening inside the VA symbol database, but not on first write.

Can you please export your VA and IDE settings and send them to me, along with your one file test solution, so I can see if I can reproduce this here:

VA Options -> Performance -> Export Settings
IDE tools menu -> Import and Export Settings -> Export selected environment settings

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

torbenl
Junior Member

Germany
11 Posts

Posted - Jul 11 2023 :  12:16:52 PM  Show Profile  Reply with Quote
What's the best way to send the files to you without having to upload them to some public host service?
This is affecting my work machine so I would want to be cautious as I cannot 100% verify the data that is within those exports.
The email function here also only allows for text.
Go to Top of Page

torbenl
Junior Member

Germany
11 Posts

Posted - Jul 12 2023 :  05:34:37 AM  Show Profile  Reply with Quote
Chose a creative way and sent you an email via the forum button here containing the base64 for a .7z file containing the project and exported settings you requested. Hope that works for you.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jul 13 2023 :  12:38:16 PM  Show Profile  Reply with Quote
Well, never had to deal with getting settings like that before, but got there after a bit of fiddling.

Sadly, no sign at all of the problem here, even with your solution, VA and IDE settings.

Which OS are you using?

What anti-virus are you using?

I am really not sure where to look for the trigger for this, it is quite odd.

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

torbenl
Junior Member

Germany
11 Posts

Posted - Jul 14 2023 :  04:41:33 AM  Show Profile  Reply with Quote
Thanks for the feedback.
I'm running Windows 10 Enterprise 22H2, but this and the anti-virus software is deployed on all machines we have here, but only this one seems to suffer from it.
So everything looks like it's a local issue caused by something other on the system, and not something you can look for within VA. I'm just wondering why it then only affects a single type. If it was caused by anti-virus etc. I would expect there to be issues regardless of which exact symbol I click on in the code. Unless VA does some wildly different thing when looking up string types which triggers the AV. I don't know, really frustrating.

I guess I will go ahead and try more drastic measures like reinstalling VS.

Thank you for your time and effort looking into this.

Edited by - torbenl on Jul 14 2023 04:42:11 AM
Go to Top of Page

torbenl
Junior Member

Germany
11 Posts

Posted - Jul 14 2023 :  11:54:13 AM  Show Profile  Reply with Quote
Hi again,

so, something happened which makes me believe that there has to be some issue in Visual Assist.

I went ahead and installed Visual Studio 2022 and Visual Assist on my freshly installed home PC (different hardware) running Windows 11. So basically everything different except for the VS and VA versions.

And lo and behold after about an hour of typing some code (in a new project!) the exact same issues comes up again.

Something weird is going on and I wonder why it's apparently only happening to me :D
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jul 17 2023 :  10:56:00 AM  Show Profile  Reply with Quote
Do you have any common extensions you use on both systems? I mean extensions you have installed, rather than ones that are installed by default.

There has to be something going on here that is driving this, but I am really not sure what.

Did you install the same components of Visual Studio on both systems?

Are you using a custom or project defined set of stable include directories for VA?

VA Options -> C/C++ Directories -> Platform = Custom / Project defined

Are there any unusual utilities you run on both machines?

My best guess, given the pattern, is an odd include directory you have that I haven't been able to reproduce yet. Something with some odd macros, or similar, which is why its only on the second solution load after a symbol database rebuild that the problem shows up. But even this isn't a brilliant theory.

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

torbenl
Junior Member

Germany
11 Posts

Posted - Jul 17 2023 :  11:50:11 AM  Show Profile  Reply with Quote
The fresh install only has the VA extension plus Productivity Power Tools 2022 installed.

VS itself was normally installed with only "Desktop development with C++" and ".NET desktop development" activated during setup. No other components selected.

VA include directories are set to "Project defined".

And the only non standard utility that is installed on both machines is PowerToys.

Not sure if any of that helps. At this point I just gave up on trying to use the VA View window at all sadly.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jul 18 2023 :  11:39:06 AM  Show Profile  Reply with Quote
I use PowerToys on most of my systems here, so that should not be a factor. Others have also reported using PowerToys, so it's not just us.

Can we get some VA logs of the problem please, maybe that will help. It feels like there should be a common element between your systems here that would give us a clue, but I really am not sure where else to look for it.

If you need to be reminded about VA logging, or the files that are generated, this is explained here:

https://docs.wholetomato.com/default.asp?W305

Please send me the files via email:

[email protected]

including this thread ID or URL in the description, so we can match it up.

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

torbenl
Junior Member

Germany
11 Posts

Posted - Jul 18 2023 :  1:56:54 PM  Show Profile  Reply with Quote
I sent out the log files.

Hopefully there's something helpful to see.

Thanks!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Jul 19 2023 :  08:03:11 AM  Show Profile  Reply with Quote
I have the log files, many thanks for these. I have asked our developers about this, hopefully they can get some clues as to what is going on here, since I really am not sure what to make of all of this:

case=149779

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