When trying to update to the lateset version of WPILib released today, I am constantly running into the same error saying “System.NullReferenceException: Object reference not set to an instance of an object”. It only does this when I choose the install everything option, but the tools only works fine. Does anyone know the fix to this? It also occurred when attempting to install 2025.1.1, which to me ruled out an error in the installer.
Is that the only part of the error message? I would expect a full stack trace that would help in determining where the error is occuring.
Here is the full stack trace:
System.NullReferenceException: Object reference not set to an instance of an object.
at WPILibInstaller.ViewModels.InstallPageViewModel.SetIfNotSet(String key, Object value, JObject settingsJson) in D:\a\WPILibInstaller-Avalonia\WPILibInstaller-Avalonia\WPILibInstaller-Avalonia\ViewModels\InstallPageViewModel.cs:line 316
at WPILibInstaller.ViewModels.InstallPageViewModel.ConfigureVsCodeSettings() in D:\a\WPILibInstaller-Avalonia\WPILibInstaller-Avalonia\WPILibInstaller-Avalonia\ViewModels\InstallPageViewModel.cs:line 359
at WPILibInstaller.ViewModels.InstallPageViewModel.InstallEverything(CancellationToken token) in D:\a\WPILibInstaller-Avalonia\WPILibInstaller-Avalonia\WPILibInstaller-Avalonia\ViewModels\InstallPageViewModel.cs:line 204
at WPILibInstaller.ViewModels.InstallPageViewModel.RunInstall() in D:\a\WPILibInstaller-Avalonia\WPILibInstaller-Avalonia\WPILibInstaller-Avalonia\ViewModels\InstallPageViewModel.cs:line 243
at WPILibInstaller.ViewModels.InstallPageViewModel.<>c__DisplayClass25_0.<<-ctor>g__installFunc|0>d.MoveNext() in D:\a\WPILibInstaller-Avalonia\WPILibInstaller-Avalonia\WPILibInstaller-Avalonia\ViewModels\InstallPageViewModel.cs:line 119
Does this file exist? I’m guessing it’s corrupted. C:\Users\Public\wpilib\2025\vscode\data\user-data\User\settings.json
Yep the file did indeed appear to be corrupted, and after deleting it and running the installer again it worked. Thank you!