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

Stock OrbitalConstructionContract will softlock the game and brick the save if generated for a body that no longer exists #212

Open
JonnyOThan opened this issue Mar 4, 2024 · 0 comments
Labels
kspBug Identified KSP issue

Comments

@JonnyOThan
Copy link
Contributor

This is definitely user error for removing a planet pack, but....

If OrbitalConstructionContract is generated in the save file referring to a body that no longer exists, the save will load but then throw exceptions when saved, which can trap you in certain buildings.

[EXC 22:04:28.093] NullReferenceException: Object reference not set to an instance of an object
    Contracts.Templates.OrbitalConstructionContract.OnSave (ConfigNode node) (at <4b449f2841f84227adfaad3149c8fdba>:0)
    Contracts.Contract.Save (ConfigNode node) (at <4b449f2841f84227adfaad3149c8fdba>:0)
    Contracts.ContractSystem.OnSave (ConfigNode gameNode) (at <4b449f2841f84227adfaad3149c8fdba>:0)
    ScenarioModule.Save (ConfigNode node) (at <4b449f2841f84227adfaad3149c8fdba>:0)
    ProtoScenarioModule..ctor (ScenarioModule module) (at <4b449f2841f84227adfaad3149c8fdba>:0)
    ScenarioRunner.UpdateModules () (at <4b449f2841f84227adfaad3149c8fdba>:0)
    ScenarioRunner.GetUpdatedProtoModules () (at <4b449f2841f84227adfaad3149c8fdba>:0)
    Game.Updated (GameScenes startSceneOverride) (at <4b449f2841f84227adfaad3149c8fdba>:0)
    GamePersistence.SaveGame (System.String saveFileName, System.String saveFolder, SaveMode saveMode, GameScenes startScene) (at <4b449f2841f84227adfaad3149c8fdba>:0)
    GamePersistence.SaveGame (System.String saveFileName, System.String saveFolder, SaveMode saveMode) (at <4b449f2841f84227adfaad3149c8fdba>:0)
    KSP.UI.Screens.RDSceneSpawner.onRDDespawn () (at <4b449f2841f84227adfaad3149c8fdba>:0)
    EventVoid.Fire () (at <4b449f2841f84227adfaad3149c8fdba>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:LogException(Exception)
    EventVoid:Fire()
    KSP.UI.Screens.RDSceneDespawner:BtnExit()
    UnityEngine.EventSystems.EventSystem:Update()
@JonnyOThan JonnyOThan added the kspBug Identified KSP issue label Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kspBug Identified KSP issue
Development

No branches or pull requests

1 participant