You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you made any manual changes to your GameData folder (i.e., not via CKAN)? No
Problem
What steps did you take in CKAN? Opened the Settings dialog from the Settings menu at the top of the main Form after updating from an old version.
What did you expect to happen? The Settings form is opened and fully populated with the current settings.
What happened instead? A NullReferenceException ocurred at CKAN.SettingsDialog.RefreshAuthTokensListBox() method. This is because the dev forgot to put an additional check when accessing the Windows Registry for any stored AuthTokens, that checks if the actual Windows Key (path) exists before trying to access it in a foreach loop. After you click on Continue, on the Unhadled Exception dialog, the Settings window dont get populated anymore.
Steps to reproduce: Simply remove the HKEY_CURRENT_USER\Software\CKAN\AuthTokens key from the registry and the issue will appear the next time CKAN settings dialog is opened.
Steps to solve: Simply add a Try...Catch around the foreach loop inside the CKAN.SettingsDialog.RefreshAuthTokensListBox() method, or return an empty collection instead of a null value (a simple List(0) would do the trick) at **CKAN.Win32Registry.GetAuthTokenHosts() when the queried RegistryKey object doesnt contain any data at all.
Yup, I believe this was the first bug report on the new version.
Duplicate of #2300, fixed in #2301.
As a workaround, you can run ckan authtoken add abcd efgh from the command line.
Background
CKAN Version: 1.24.0
KSP Version: 1.3.0.1804
Operating System: Windows 10 Pro
Have you made any manual changes to your GameData folder (i.e., not via CKAN)? No
Problem
What steps did you take in CKAN? Opened the Settings dialog from the Settings menu at the top of the main Form after updating from an old version.
What did you expect to happen? The Settings form is opened and fully populated with the current settings.
What happened instead? A NullReferenceException ocurred at CKAN.SettingsDialog.RefreshAuthTokensListBox() method. This is because the dev forgot to put an additional check when accessing the Windows Registry for any stored AuthTokens, that checks if the actual Windows Key (path) exists before trying to access it in a foreach loop. After you click on Continue, on the Unhadled Exception dialog, the Settings window dont get populated anymore.
Steps to reproduce: Simply remove the HKEY_CURRENT_USER\Software\CKAN\AuthTokens key from the registry and the issue will appear the next time CKAN settings dialog is opened.
Steps to solve: Simply add a Try...Catch around the foreach loop inside the CKAN.SettingsDialog.RefreshAuthTokensListBox() method, or return an empty collection instead of a null value (a simple List(0) would do the trick) at **CKAN.Win32Registry.GetAuthTokenHosts() when the queried RegistryKey object doesnt contain any data at all.
CKAN error codes (if applicable): NullReferenceException
The text was updated successfully, but these errors were encountered: