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
 NullReferenceException every project load
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

shippy
Senior Member

USA
34 Posts

Posted - May 09 2025 :  6:07:24 PM  Show Profile  Reply with Quote
Started hitting a NullReferenceException when I open my project after installing the latest VA this morning. From the ActivityLog.xml:

System.NullReferenceException: Object reference not set to an instance of an object.
at WholeTomato.VaCodeInspections.QuickActions.e.d(TextExtent& A_0)
at WholeTomato.VaCodeInspections.QuickActions.e.e()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.<CallExtensionPointAsync>d__41`1.MoveNext()

Version info:
VA_X64.dll file version 10.9.2556.0 built 2025.04.07
DevEnv.exe version 17.13.35931.197 Enterprise
msenv.dll version 17.0.35919.92

-Shippy

feline
Whole Tomato Software

United Kingdom
19176 Posts

Posted - May 12 2025 :  07:29:57 AM  Show Profile  Reply with Quote
Thank you for the details. Was this a one off problem, or is it happening every time? I am not quite sure which would be more worrying, but at least if it keeps on happening, it will be easier to study.

Are you able to keep on using the IDE, or did the exception lead to a crash?

We have had a couple of reports of exceptions, but so far no clues as to the trigger, and nothing that I have been able to reproduce here, so if this is an ongoing problem it may not be just you, in case that offers any comfort.

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

shippy
Senior Member

USA
34 Posts

Posted - May 12 2025 :  3:05:32 PM  Show Profile  Reply with Quote
It happens almost 100% of the time. I can continue using the IDE and VA seems to be working AFAICT.

-Shippy
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19176 Posts

Posted - May 13 2025 :  06:37:49 AM  Show Profile  Reply with Quote
Let's try the simple fix first. Can you please go into:

IDE tools menu -> Extensions and Updates...

then find Visual Assist in the list of installed extensions, and disable it. This will require an IDE restart to take effect. Then, after the restart, go back in and Enable VA, which will require another IDE restart.

Does this fix the problem? Occasionally problems like this crop up, and this does fix them, so certainly worth a try. If this doesn't help, we will try something else.

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

shippy
Senior Member

USA
34 Posts

Posted - May 13 2025 :  2:13:10 PM  Show Profile  Reply with Quote
Unfortunately, that doesn't fix the problem.

-Shippy
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19176 Posts

Posted - May 14 2025 :  07:17:00 AM  Show Profile  Reply with Quote
The exception message didn't sound that familiar, so I wasn't that confident it would be this simple, but it was certainly worth a try.

The next step is to install VA into a new test profile, which will tell us if this is a profile specific, or machine wide problem. To do this can you first download the VS2022 specific installer for Visual Assist from:

https://downloadfiles.idera.com/WholeTomato/VA_X_Setup2556_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\Enterprise\Common7\IDE\devenv.exe
displayName: Visual Studio Enterprise 2022
installationVersion: 17.13.35931.197

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 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\Enterprise\Common7\IDE\VSIXInstaller.exe"
/appidinstallpath:"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.exe"
/skuName:Enterprise
/appidname:"Visual Studio Enterprise 2022"
/skuVersion:17.13.35931.197
/rootSuffix:"VATest" "C:\Users\%USERNAME%\Downloads\VA_X_Setup2556_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\Enterprise\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.

Does the test profile load without any problems, or do you get the same, or even a different, error on loading the test profile?

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