Solved "Duplicate" command on celestial bodies crashes game

This question has been answered or resolved.

Kiwi Shark

Member
Community Veteran
Forum Assistant
Oct 10, 2025
352
309

Game Version

2026.3.6.3818

Operating System

Windows 11

What Happened​

Using the duplicate command on any celestial body / not a vehicle crashes the game.

What Was Expected​

The console should return an error saying that duplicate can only be used on vehicles and no crash.

Reproduction Steps​

  1. Launch game and open console.
  2. Run duplicate <any celestial body> <any text>

Reproduction Rate​

Always

Additional Info​

From the log file:
23:43:49.521 ERROR Unhandled exception System.Exception: Error in Window.OnKey callback
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.InvalidCastException: Unable to cast object of type 'KSA.AtmosphericBody' to type 'KSA.Vehicle'.
at KSA.CelestialSystem.Get[T](String id)
at KSA.Universe.Duplicate(String id, String newId)
at InvokeStub_Universe.Duplicate(Object, Span`1)
at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
--- End of inner exception stack trace ---
at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at Brutal.ImGuiApi.Abstractions.Command.Issue(String[] args)
at Brutal.ImGuiApi.Abstractions.TerminalInterface.ProcessCommand(String inCommandString)
at Brutal.ImGuiApi.Abstractions.TerminalInterface.Execute(String inInput)
at Brutal.ImGuiApi.Abstractions.ConsoleWindow.Submit()
at Brutal.ImGuiApi.Abstractions.ConsoleWindow.HandleInputAction(Actions action)
at KSA.ConsoleWindowEx.OnKey(ConsoleWindow console, GlfwWindow window, GlfwKey key, Int32 scanCode, GlfwKeyAction action, GlfwModifier mods)
at KSA.Program.OnKey(GlfwWindow window, GlfwKey key, Int32 scanCode, GlfwKeyAction action, GlfwModifier mods)
at Brutal.GlfwApi.GlfwWindow.<.ctor>b__6_10(GlfwWindowHandle* _, Int32 key, Int32 scanCode, Int32 action, Int32 mods)
--- End of inner exception stack trace ---
at Brutal.GlfwApi.Glfw.PollEvents()
at KSA.Program.OnFrame(Double currentPlayerTime, Double dtPlayer)
at KSA.App.Run()
at KSA.Program.Main(String[] inArgs).

Also see my other similar report: https://forums.ahwoo.com/threads/destroy-command-on-celestial-bodies-crashes-game.813/
 
Upvote 0