Kerbal Space Program

Kerbal Space Program

Cosmic Apr 16, 2021 @ 8:07am
Fuel Tank Construction Bug
I recently reinstalled KSP after not playing it for five years, and a couple hours into a new game, discovered a dealbreaking bug I can't find documentation for.

Whenever I attempt to place any type of fuel tank onto a rocket, it simply disappears when I click to put it into position. This then fatally breaks the entire assembly system: parts will no longer lock onto anything and are always disconnected from the craft, fuel tank or not. Already present parts cannot be moved or manipulated and right-click info checks cease to work. The rocket assembly building also can't be left; clicking "Don't save" to abandon the craft does nothing, trapping me there. Creating a new design fixes these bugs, but placing any fuel tank immediately breaks it again.

Having found no trace of other players experiencing this, I verified the steam files and after some experimenting, found something even more bizarre: a single file is missing from the program for every time the bug occurs. If it happens 10 times, 10 files will fail to validate. If those are re-acquired, going back into KSP and doing it three more times causes three more validation failures.

Placing a fuel tank as the first component successfully adds it, but any further fuel tanks will break it.

Does anyone have information on this? I have zero knowledge of the KSP playerbase so I might just be ignorant, so please enlighten me if you can.
Originally posted by NikkiOfTheValley:
Originally posted by GunsForBucks:
Originally posted by Cosmic:

YE GODS

A fresh reinstall fixed it. It also updated their texture to the modern one, because unbeknown to me who hasn't played this game since 2016, the fuel tanks I was getting handed were broken, outdated versions sitting around in my failed-to-uninstall KSP files from five years ago. No wonder the scripts failed to call each other.

I will now create a comedically fuel-centred ship to test they work as intended. Many thanks to everyone who helped, especially this fine individual who finally found the issue.
Glad I could help and thanks for the praise. I like to try the simple solutions first, it ends up being the silly stuff a lot of the time. Ha ha.
I didn't know the uninstall on Steam didn't just fully delete the game folder, if I had, I would've thought to tell him to delete it fully. Thanks for the knowledge!
< >
Showing 1-15 of 20 comments
NikkiOfTheValley Apr 16, 2021 @ 9:14am 
!? What?? How is this even happening? This has to be a bug that is specific to your setup, I'm not getting it. Try uninstalling any mods if you have any.. If that doesn't work/you have no mods, try updating any drivers that need to be updated, if that doesn't work, try playing KSP on another PC, and see if you can reproduce the bug. If you can, I've no idea what's happening.

And no, I've looked around a bit, no one, at least that I found, has ever experienced that bug. This is the oddest bug I've ever seen. Do you have log files I can look at? If all the stuff I suggested doesn't work, I need to see the log files to see if it's something really broken in KSP, or it's because of the way your PC is set up.
Last edited by NikkiOfTheValley; Apr 16, 2021 @ 9:18am
Cosmic Apr 16, 2021 @ 11:26am 
A few things to add:

  • This is in Science mode
  • I did a full reinstall, no effect
  • No mods, no DLC, nothing
  • It never did this when I played a few years back, only after I reinstalled it like a couple days ago

Are there logs created if the game doesn't crash? If so can you direct me to them?

I'll continue testing the limits of this and update drivers in the meantime.
Last edited by Cosmic; Apr 16, 2021 @ 11:26am
NikkiOfTheValley Apr 16, 2021 @ 11:43am 
1. Science mode wouldn't have any effect on game breaking stuff like this
2. I have to remember where the logs are, I'll edit this later with the logs location

Edit: Log file is at [Steam game install directory]/common/Kerbal Space Program/KSP.log

If you can, give me a download link, as the file is quite large, and I don't want to scroll through 500000 lines of text in Steam forums.

Last edited by NikkiOfTheValley; Apr 16, 2021 @ 11:49am
Cosmic Apr 16, 2021 @ 12:06pm 
Originally posted by Nick:
1. Science mode wouldn't have any effect on game breaking stuff like this
2. I have to remember where the logs are, I'll edit this later with the logs location

Edit: Log file is at [Steam game install directory]/common/Kerbal Space Program/KSP.log

If you can, give me a download link, as the file is quite large, and I don't want to scroll through 500000 lines of text in Steam forums.

I'm not comfortable throwing an entire log document onto a public forum, so here's a relevant excerpt from a replication I just did.

Attempting to attach a single fuel tank onto the default command module:

[LOG 19:58:34.638] fuelTankSmall added to ship - part count: 2 [EXC 19:58:34.733] NullReferenceException UnityEngine.Object.get_name () (at <5aeafee3fea24f37abd1315553f2cfa6>:0) PreFlightTests.StationHubAttachments.TestCondition () (at <06f13185617646e5bc801baeab53ab75>:0) PreFlightTests.DesignConcernBase.Test () (at <06f13185617646e5bc801baeab53ab75>:0) KSP.UI.Screens.EngineersReport+TestWrapper.RunTest () (at <06f13185617646e5bc801baeab53ab75>:0) KSP.UI.Screens.EngineersReport+<RunTests>d__49.MoveNext () (at <06f13185617646e5bc801baeab53ab75>:0) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <5aeafee3fea24f37abd1315553f2cfa6>:0) [EXC 19:58:36.526] NullReferenceException EditorLogicBase.AssignAttachIcon (Part part, AttachNode node, System.Boolean stackNodes, System.Boolean srfNodes, System.Boolean dockNodes) (at <06f13185617646e5bc801baeab53ab75>:0) EditorLogicBase.handleAttachNodeIcons (Part part, System.Boolean stackNodes, System.Boolean srfNodes, System.Boolean dockNodes) (at <06f13185617646e5bc801baeab53ab75>:0) EditorLogicBase.displayAttachNodeIcons (System.Collections.Generic.List`1[T] parts, Part selectedPart, System.Boolean stackNodes, System.Boolean srfNodes, System.Boolean dockNodes) (at <06f13185617646e5bc801baeab53ab75>:0) EditorLogic.<SetupFSM>b__190_51 () (at <06f13185617646e5bc801baeab53ab75>:0) KerbalFSM.UpdateFSM () (at <06f13185617646e5bc801baeab53ab75>:0) EditorLogic.Update () (at <06f13185617646e5bc801baeab53ab75>:0)

The lowermost output looped several thousand times.

Attempting to leave the construction building, with the errored-out parts still there, and pressing "Don't Save" repeatedly:

[EXC 19:58:46.791] NullReferenceException ShipConstruct.SaveShip () (at <06f13185617646e5bc801baeab53ab75>:0) ShipConstruction.CreateBackup (ShipConstruct ship) (at <06f13185617646e5bc801baeab53ab75>:0) EditorLogic.onExitConfirm () (at <06f13185617646e5bc801baeab53ab75>:0) DialogGUIButton.OptionSelected () (at <06f13185617646e5bc801baeab53ab75>:0) DialogGUIButton.<Create>b__23_1 () (at <06f13185617646e5bc801baeab53ab75>:0) UnityEngine.Events.InvokableCall.Invoke () (at <5aeafee3fea24f37abd1315553f2cfa6>:0) UnityEngine.Events.UnityEvent.Invoke () (at <5aeafee3fea24f37abd1315553f2cfa6>:0) UnityEngine.UI.Button.Press () (at <8485d97123094db9883b53b3349c2a3b>:0) UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at <8485d97123094db9883b53b3349c2a3b>:0) UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at <8485d97123094db9883b53b3349c2a3b>:0) UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at <8485d97123094db9883b53b3349c2a3b>:0) UnityEngine.EventSystems.EventSystem:Update()

Yeah, it's not happy.
Last edited by Cosmic; Apr 16, 2021 @ 12:07pm
NikkiOfTheValley Apr 16, 2021 @ 12:22pm 
Originally posted by Cosmic:
Originally posted by Nick:
1. Science mode wouldn't have any effect on game breaking stuff like this
2. I have to remember where the logs are, I'll edit this later with the logs location

Edit: Log file is at [Steam game install directory]/common/Kerbal Space Program/KSP.log

If you can, give me a download link, as the file is quite large, and I don't want to scroll through 500000 lines of text in Steam forums.

I'm not comfortable throwing an entire log document onto a public forum, so here's a relevant excerpt from a replication I just did.

Attempting to attach a single fuel tank onto the default command module:

[LOG 19:58:34.638] fuelTankSmall added to ship - part count: 2 [EXC 19:58:34.733] NullReferenceException UnityEngine.Object.get_name () (at <5aeafee3fea24f37abd1315553f2cfa6>:0) PreFlightTests.StationHubAttachments.TestCondition () (at <06f13185617646e5bc801baeab53ab75>:0) PreFlightTests.DesignConcernBase.Test () (at <06f13185617646e5bc801baeab53ab75>:0) KSP.UI.Screens.EngineersReport+TestWrapper.RunTest () (at <06f13185617646e5bc801baeab53ab75>:0) KSP.UI.Screens.EngineersReport+<RunTests>d__49.MoveNext () (at <06f13185617646e5bc801baeab53ab75>:0) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <5aeafee3fea24f37abd1315553f2cfa6>:0) [EXC 19:58:36.526] NullReferenceException EditorLogicBase.AssignAttachIcon (Part part, AttachNode node, System.Boolean stackNodes, System.Boolean srfNodes, System.Boolean dockNodes) (at <06f13185617646e5bc801baeab53ab75>:0) EditorLogicBase.handleAttachNodeIcons (Part part, System.Boolean stackNodes, System.Boolean srfNodes, System.Boolean dockNodes) (at <06f13185617646e5bc801baeab53ab75>:0) EditorLogicBase.displayAttachNodeIcons (System.Collections.Generic.List`1[T] parts, Part selectedPart, System.Boolean stackNodes, System.Boolean srfNodes, System.Boolean dockNodes) (at <06f13185617646e5bc801baeab53ab75>:0) EditorLogic.<SetupFSM>b__190_51 () (at <06f13185617646e5bc801baeab53ab75>:0) KerbalFSM.UpdateFSM () (at <06f13185617646e5bc801baeab53ab75>:0) EditorLogic.Update () (at <06f13185617646e5bc801baeab53ab75>:0)

The lowermost output looped several thousand times.

Attempting to leave the construction building, with the errored-out parts still there, and pressing "Don't Save" repeatedly:

[EXC 19:58:46.791] NullReferenceException ShipConstruct.SaveShip () (at <06f13185617646e5bc801baeab53ab75>:0) ShipConstruction.CreateBackup (ShipConstruct ship) (at <06f13185617646e5bc801baeab53ab75>:0) EditorLogic.onExitConfirm () (at <06f13185617646e5bc801baeab53ab75>:0) DialogGUIButton.OptionSelected () (at <06f13185617646e5bc801baeab53ab75>:0) DialogGUIButton.<Create>b__23_1 () (at <06f13185617646e5bc801baeab53ab75>:0) UnityEngine.Events.InvokableCall.Invoke () (at <5aeafee3fea24f37abd1315553f2cfa6>:0) UnityEngine.Events.UnityEvent.Invoke () (at <5aeafee3fea24f37abd1315553f2cfa6>:0) UnityEngine.UI.Button.Press () (at <8485d97123094db9883b53b3349c2a3b>:0) UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at <8485d97123094db9883b53b3349c2a3b>:0) UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at <8485d97123094db9883b53b3349c2a3b>:0) UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at <8485d97123094db9883b53b3349c2a3b>:0) UnityEngine.EventSystems.EventSystem:Update()

Yeah, it's not happy.

I'm trying to find the script it's referencing, but can't. Can you tell where it is at all?
Cosmic Apr 16, 2021 @ 1:43pm 
Not sure if it's what you're looking for, but here's the log of the editor opening, directly before the first error.

[LOG 19:58:15.809] [HighLogic]: =========================== Scene Change : From SPACECENTER to EDITOR (Async) ===================== [LOG 19:58:16.075] [UIApp] OnDestroy: KSPedia [LOG 19:58:16.198] [UIMasterController]: HideUI [LOG 19:58:17.794] UICanvasPrefabSpawner SceneLogic spawning Editor [LOG 19:58:17.832] No Input Locks in effect right now [LOG 19:58:18.012] [UIMasterController]: HideUI [LOG 19:58:18.635] [UIMasterController]: ShowUI [WRN 19:58:21.122] The loaded level has a different lightmaps mode than the current one. Current: Directional. Loaded: Non-Directional. Will use: Directional. [LOG 19:58:21.150] [UIMasterController]: ShowUI [LOG 19:58:21.162] ------------------- initializing editor mode... ------------------ [LOG 19:58:21.163] editor started [LOG 19:58:21.177] Loading Depletion Nodes [LOG 19:58:21.177] DepNodeCount: 0 [LOG 19:58:21.177] Loading Biome Nodes [LOG 19:58:21.177] BiomeNodeCount: 0 [LOG 19:58:21.177] Loading Planet Nodes [LOG 19:58:21.177] PlanetNodeCount: 0 [LOG 19:58:21.185] [ScenarioDestructibles]: Loading... 0 objects registered [WRN 19:58:21.590] HighlightingSystem : Framebuffer depth data is not available and can't be used to occlude highlighting. Highlighting occluders enabled. [LOG 19:58:21.634] [UiApp] Awake: EngineersReport [LOG 19:58:21.634] [UiApp] Awake: KSPedia [LOG 19:58:21.634] [UiApp] Awake: Missions App [LOG 19:58:21.635] [UiApp] Awake: DeltaVApp [LOG 19:58:21.635] [UiApp] Awake: ActionGroupsApp [LOG 19:58:21.635] [ApplicationLauncher] OnSceneLoadedGUIReady: scene EDITOR ShouldBeVisible() True ShouldBeOnTop() False iIsPositionedAtTop False [LOG 19:58:21.646] [UIApp] OnDestroy: Contracts [LOG 19:58:21.662] [MessageSystem] Reposition 0.02 42491 [LOG 19:58:21.662] [GenericAppFrame] Reposition 0.02 42491 [LOG 19:58:21.662] [GenericAppFrame] Reposition 0.02 42491 [LOG 19:58:22.037] [UIApp] Adding ActionGroupsApp to Application Launcher [LOG 19:58:22.038] [ApplicationLauncher] SetHidden: [LOG 19:58:22.039] [UIApp] Adding Missions App to Application Launcher [LOG 19:58:22.040] [UIApp] Adding EngineersReport to Application Launcher [LOG 19:58:22.054] [ActionGroupsApp] OnAppStarted(): id: -297950 [LOG 19:58:22.057] [GenericAppFrame] Reposition 0.1589214 42497 [LOG 19:58:22.059] [UIApp] Adding DeltaVApp to Application Launcher [LOG 19:58:22.060] [MissionsApp] OnAppStarted(): id: -297938 [LOG 19:58:22.060] MissionsApp does not execute in this game mode, destroying this instance [LOG 19:58:22.060] [UIApp] OnDestroy: Missions App [LOG 19:58:22.062] [GenericAppFrame] Reposition 0.1589214 42497 [LOG 19:58:22.107] [GenericAppFrame] Reposition 0.1989214 42498 [LOG 19:58:22.125] [UIApp] Adding KSPedia to Application Launcher [LOG 19:58:22.236] [UIMasterController]: ShowUI [LOG 19:58:34.638] fuelTankSmall added to ship - part count: 2 [EXC 19:58:34.733] NullReferenceException ...etc
NikkiOfTheValley Apr 16, 2021 @ 2:01pm 
It's not, I'm trying to find the script it was telling me errored. The helpful thing might be to find a log of scripts that were running at a specific point in time, but I don't think that's a thing.
Last edited by NikkiOfTheValley; Apr 16, 2021 @ 2:03pm
ulzgoroth Apr 16, 2021 @ 3:20pm 
I don't know about 'scripts' (I guess that's a Unity structure thing?) but the stack trace seems to indicate that the first exception is being generated by the engineer report trying to update its pre-flight tests. However, given that it's all NullReferenceExceptions, I'd guess that the actual error isn't in any of the places that the exceptions are being thrown, but instead in whatever code is leaving a null reference where there shouldn't be one.

Which from the narrative seems to happen when the OP adds the fuel tank, and from where the errors are thrown I'd guess the inappropriate null is in the data structure that represents the current ship.


EDIT: One question for the OP: You said you discovered this a couple hours into the game. Was that the first time you had placed a fuel tank? Or had you previously placed fuel tanks without disaster? The latter would seem to make things weirder.

Actually, a second question. You mention the bug occurring multiple times in between validations. What exactly does that entail? It sounds like when the bug occurs you'd have to (forcibly) quit and restart the game to set it off again?
Last edited by ulzgoroth; Apr 16, 2021 @ 3:28pm
NikkiOfTheValley Apr 16, 2021 @ 6:43pm 
Originally posted by ulzgoroth:
I don't know about 'scripts' (I guess that's a Unity structure thing?) but the stack trace seems to indicate that the first exception is being generated by the engineer report trying to update its pre-flight tests. However, given that it's all NullReferenceExceptions, I'd guess that the actual error isn't in any of the places that the exceptions are being thrown, but instead in whatever code is leaving a null reference where there shouldn't be one.

Which from the narrative seems to happen when the OP adds the fuel tank, and from where the errors are thrown I'd guess the inappropriate null is in the data structure that represents the current ship.


EDIT: One question for the OP: You said you discovered this a couple hours into the game. Was that the first time you had placed a fuel tank? Or had you previously placed fuel tanks without disaster? The latter would seem to make things weirder.

Actually, a second question. You mention the bug occurring multiple times in between validations. What exactly does that entail? It sounds like when the bug occurs you'd have to (forcibly) quit and restart the game to set it off again?
A script is a piece of programming code that can be called. Like a function, but in a indavidual file.
And yes, the NullReferenceExecptions seem to mean that there's a null fuel tank being placed. Maybe it's giving the fuel value a null?

Edit: I jsut read the errors again, I think it's the object itself. I think it's trying to place a null object. I'm not the expert on this tho, I'm just a indie dev that hasn't looked at KSP's source.
Last edited by NikkiOfTheValley; Apr 16, 2021 @ 6:47pm
GunsForBucks Apr 16, 2021 @ 8:11pm 
What is the fuel tank called you are trying to place?

Have you ever modded your game... now or in the past?

When you reinstalled did you make sure the game folder did not exist? Old mods can leave bits behind and you must manually navigate to the ksp folder and delete it to get a fully "clean" install.

Did you opt out of any beta build to get the current version?
ulzgoroth Apr 16, 2021 @ 8:54pm 
Originally posted by Nick:
A script is a piece of programming code that can be called. Like a function, but in a indavidual file.
In general, sort of, kind of, but in that sense a program isn't typically composed of scripts...
Originally posted by Nick:
Edit: I jsut read the errors again, I think it's the object itself. I think it's trying to place a null object. I'm not the expert on this tho, I'm just a indie dev that hasn't looked at KSP's source.
I'd say succeeding in placing one and thereby breaking everything that examines the ship, but that's my guess too. The exception triggering from UnityEngine.Object.get_name () seems to point that way. Like you, I'm just making guesses from the method names and general coding knowledge.

Not sure how any of these guesses could be provide useful direction for the OP though.
GunsForBucks Apr 16, 2021 @ 9:27pm 
One other question...
How exactly are you selecting the part to place?

Selecting from the menu on the side?
Alt clicking on it?
Removal and ctrl z?
Cosmic Apr 17, 2021 @ 4:19am 
Originally posted by GunsForBucks:
What is the fuel tank called you are trying to place?

Have you ever modded your game... now or in the past?

When you reinstalled did you make sure the game folder did not exist? Old mods can leave bits behind and you must manually navigate to the ksp folder and delete it to get a fully "clean" install.

Did you opt out of any beta build to get the current version?

It breaks with any fuel tank, not one specifically.
No mods, ever.
No betas.


Originally posted by GunsForBucks:
One other question...
How exactly are you selecting the part to place?

Selecting from the menu on the side?
Alt clicking on it?
Removal and ctrl z?

boring-ass selecting from side menu.

I'll try doing a completely clean install and see if that changes anything.
Cosmic Apr 17, 2021 @ 4:33am 
Originally posted by GunsForBucks:
When you reinstalled did you make sure the game folder did not exist? Old mods can leave bits behind and you must manually navigate to the ksp folder and delete it to get a fully "clean" install.

YE GODS

A fresh reinstall fixed it. It also updated their texture to the modern one, because unbeknown to me who hasn't played this game since 2016, the fuel tanks I was getting handed were broken, outdated versions sitting around in my failed-to-uninstall KSP files from five years ago. No wonder the scripts failed to call each other.

I will now create a comedically fuel-centred ship to test they work as intended. Many thanks to everyone who helped, especially this fine individual who finally found the issue.
Last edited by Cosmic; Apr 17, 2021 @ 4:33am
GunsForBucks Apr 17, 2021 @ 11:28am 
Originally posted by Cosmic:
Originally posted by GunsForBucks:
When you reinstalled did you make sure the game folder did not exist? Old mods can leave bits behind and you must manually navigate to the ksp folder and delete it to get a fully "clean" install.

YE GODS

A fresh reinstall fixed it. It also updated their texture to the modern one, because unbeknown to me who hasn't played this game since 2016, the fuel tanks I was getting handed were broken, outdated versions sitting around in my failed-to-uninstall KSP files from five years ago. No wonder the scripts failed to call each other.

I will now create a comedically fuel-centred ship to test they work as intended. Many thanks to everyone who helped, especially this fine individual who finally found the issue.
Glad I could help and thanks for the praise. I like to try the simple solutions first, it ends up being the silly stuff a lot of the time. Ha ha.
< >
Showing 1-15 of 20 comments
Per page: 1530 50

Date Posted: Apr 16, 2021 @ 8:07am
Posts: 20