Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: #3815

Closed
1 task done
Mitokandria opened this issue Mar 23, 2023 · 3 comments
Closed
1 task done

[Bug]: #3815

Mitokandria opened this issue Mar 23, 2023 · 3 comments

Comments

@Mitokandria
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Operating System

Windows 10

CKAN Version

1.31.2

KSP Version

1.12.5.3190

Did you make manual changes?

No

Describe the bug

CKAN.exe fails to start. Running CKAN.exe results in immediate CMD Prompt with error (See "CMD Error") and an Error! window (see "Error! Window") pasted below. Closing the command prompt or pressing dismiss on the error window results in a crash to desktop with "CKAN-CmdLine has stopped working". KSP runs without issue if I run KSP_x64.exe directly.

Error! Window:

Unhandled exception:
System.TypeInitializationException: The type initializer for 'CKAN.Versioning.GameVersion' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at CKAN.GameVersionProviders.KspBuildMap.get_KnownVersions()
   at CKAN.Versioning.GameVersion..cctor()
   --- End of inner exception stack trace ---
   at CKAN.Versioning.GameVersion.op_Equality(GameVersion v1, GameVersion v2)
   at CKAN.GameInstance.Version()
   at CKAN.GameInstance.get_Valid()
   at CKAN.GameInstance..ctor(IGame game, String gameDir, String name, IUser user, Boolean scan)
   at CKAN.GameInstanceManager.FindAndRegisterDefaultInstance()
   at CKAN.GameInstanceManager._GetPreferredInstance()
   at CKAN.GameInstanceManager.GetPreferredInstance()
   at CKAN.GUI.Main..ctor(String[] cmdlineArgs, GameInstanceManager mgr, Boolean showConsole)
   at CKAN.GUI.GUI.Main_(String[] args, GameInstanceManager manager, Boolean showConsole)
   at CKAN.CmdLine.MainClass.Gui(GameInstanceManager manager, GuiOptions options, String[] args)
   at CKAN.CmdLine.MainClass.RunSimpleAction(Options cmdline, CommonOptions options, String[] args, IUser user, GameInstanceManager manager)
   at CKAN.CmdLine.MainClass.Execute(GameInstanceManager manager, CommonOptions opts, String[] args)
   at CKAN.CmdLine.MainClass.Main(String[] args) 

CMD Prompt:


213 [1] ERROR CKAN.GameInstanceManager (null) - Failed to load game instance with name="auto" path="c:/program files (x86)/steam/SteamApps/common/Kerbal Space Program" game="KSP"
System.TypeInitializationException: The type initializer for 'CKAN.Versioning.GameVersion' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at CKAN.GameVersionProviders.KspBuildMap.get_KnownVersions()
   at CKAN.Versioning.GameVersion..cctor()
   --- End of inner exception stack trace ---
   at CKAN.Versioning.GameVersion.op_Equality(GameVersion v1, GameVersion v2)
   at CKAN.GameInstance.Version()
   at CKAN.GameInstance.get_Valid()
   at CKAN.GameInstance..ctor(IGame game, String gameDir, String name, IUser user, Boolean scan)
   at CKAN.GameInstanceManager.LoadInstances()
229 [1] ERROR CKAN.GameInstanceManager (null) - Failed to load game instance with name="Test" path="C:/Users/Ariel/OneDrive/Documents/Kerbal Space Program 2" game="KSP"
System.TypeInitializationException: The type initializer for 'CKAN.Versioning.GameVersion' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at CKAN.GameVersionProviders.KspBuildMap.get_KnownVersions()
   at CKAN.Versioning.GameVersion..cctor()
   --- End of inner exception stack trace ---
   at CKAN.Versioning.GameVersion.op_Equality(GameVersion v1, GameVersion v2)
   at CKAN.GameInstance.Version()
   at CKAN.GameInstance.get_Valid()
   at CKAN.GameInstance..ctor(IGame game, String gameDir, String name, IUser user, Boolean scan)
   at CKAN.GameInstanceManager.LoadInstances()
514 [1] ERROR CKAN.GUI.ErrorDialog (null) - Unhandled exception:
System.TypeInitializationException: The type initializer for 'CKAN.Versioning.GameVersion' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at CKAN.GameVersionProviders.KspBuildMap.get_KnownVersions()
   at CKAN.Versioning.GameVersion..cctor()
   --- End of inner exception stack trace ---
   at CKAN.Versioning.GameVersion.op_Equality(GameVersion v1, GameVersion v2)
   at CKAN.GameInstance.Version()
   at CKAN.GameInstance.get_Valid()
   at CKAN.GameInstance..ctor(IGame game, String gameDir, String name, IUser user, Boolean scan)
   at CKAN.GameInstanceManager.FindAndRegisterDefaultInstance()
   at CKAN.GameInstanceManager._GetPreferredInstance()
   at CKAN.GameInstanceManager.GetPreferredInstance()
   at CKAN.GUI.Main..ctor(String[] cmdlineArgs, GameInstanceManager mgr, Boolean showConsole)
   at CKAN.GUI.GUI.Main_(String[] args, GameInstanceManager manager, Boolean showConsole)
   at CKAN.CmdLine.MainClass.Gui(GameInstanceManager manager, GuiOptions options, String[] args)
   at CKAN.CmdLine.MainClass.RunSimpleAction(Options cmdline, CommonOptions options, String[] args, IUser user, GameInstanceManager manager)
   at CKAN.CmdLine.MainClass.Execute(GameInstanceManager manager, CommonOptions opts, String[] args)
   at CKAN.CmdLine.MainClass.Main(String[] args)

Unhandled Exception: System.TypeInitializationException: The type initializer for 'CKAN.Versioning.GameVersion' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at CKAN.GameVersionProviders.KspBuildMap.get_KnownVersions()
   at CKAN.Versioning.GameVersion..cctor()
   --- End of inner exception stack trace ---
   at CKAN.Versioning.GameVersion.op_Equality(GameVersion v1, GameVersion v2)
   at CKAN.GameInstance.Version()
   at CKAN.GameInstance.get_Valid()
   at CKAN.GameInstance..ctor(IGame game, String gameDir, String name, IUser user, Boolean scan)
   at CKAN.GameInstanceManager.FindAndRegisterDefaultInstance()
   at CKAN.GameInstanceManager._GetPreferredInstance()
   at CKAN.GameInstanceManager.GetPreferredInstance()
   at CKAN.GUI.Main..ctor(String[] cmdlineArgs, GameInstanceManager mgr, Boolean showConsole)
   at CKAN.GUI.GUI.Main_(String[] args, GameInstanceManager manager, Boolean showConsole)
   at CKAN.CmdLine.MainClass.Gui(GameInstanceManager manager, GuiOptions options, String[] args)
   at CKAN.CmdLine.MainClass.RunSimpleAction(Options cmdline, CommonOptions options, String[] args, IUser user, GameInstanceManager manager)
   at CKAN.CmdLine.MainClass.Execute(GameInstanceManager manager, CommonOptions opts, String[] args)
   at CKAN.CmdLine.MainClass.Main(String[] args)

Steps to reproduce

Run CKAN.EXE
No other steps

Relevant log output

Unhandled exception:
System.TypeInitializationException: The type initializer for 'CKAN.Versioning.GameVersion' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at CKAN.GameVersionProviders.KspBuildMap.get_KnownVersions()
   at CKAN.Versioning.GameVersion..cctor()
   --- End of inner exception stack trace ---
   at CKAN.Versioning.GameVersion.op_Equality(GameVersion v1, GameVersion v2)
   at CKAN.GameInstance.Version()
   at CKAN.GameInstance.get_Valid()
   at CKAN.GameInstance..ctor(IGame game, String gameDir, String name, IUser user, Boolean scan)
   at CKAN.GameInstanceManager.FindAndRegisterDefaultInstance()
   at CKAN.GameInstanceManager._GetPreferredInstance()
   at CKAN.GameInstanceManager.GetPreferredInstance()
   at CKAN.GUI.Main..ctor(String[] cmdlineArgs, GameInstanceManager mgr, Boolean showConsole)
   at CKAN.GUI.GUI.Main_(String[] args, GameInstanceManager manager, Boolean showConsole)
   at CKAN.CmdLine.MainClass.Gui(GameInstanceManager manager, GuiOptions options, String[] args)
   at CKAN.CmdLine.MainClass.RunSimpleAction(Options cmdline, CommonOptions options, String[] args, IUser user, GameInstanceManager manager)
   at CKAN.CmdLine.MainClass.Execute(GameInstanceManager manager, CommonOptions opts, String[] args)
   at CKAN.CmdLine.MainClass.Main(String[] args)
@HebaruSan
Copy link
Member

Thanks for the report, this was fixed in #3733.

@Mitokandria
Copy link
Author

Thanks. I forgot to check the "include closed" button when searching for bugs.

@HebaruSan
Copy link
Member

Well, you'd also have to search pull requests in addition to issues, since this was reported on Discord instead of GitHub. It's not super easy to find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants