Project

General

Profile

Bug #3243

Kerbals missing from the CrewRoster but referenced from ScenarioModules or Vessels break various parts of the game.

Added by godarklight over 9 years ago. Updated almost 8 years ago.

Status:
Closed
Severity:
Normal
Assignee:
-
Category:
Gameplay
Target version:
-
Start date:
09/26/2014
% Done:

100%

Version:
Platform:
Any
Expansion:
Language:
English (US)
Mod Related:
No
Votes:
Arrow u r green
Arrow d r red

Description

First off, this was a bug that was caused and worked around my DarkMultiPlayer mod, but it was suggested to report here as it's easy to both reproduce and work around and might save someone some headaches.

There's three different types of breaking I can find:

Type 1): Kerbals missing from HighLogic.CurrentGame.CrewRoster that are referenced by KerbalRescue contracts cause a throw when saving the contract, which breaks Game.SaveGame, which breaks OnGameSceneLoadRequested, which means you can't switch away from the space center (You have to alt+f4 out of the game).

To reproduce, delete the stranded kerbal out of the ROSTER{} section of persistent.sfs, or see the attached spacecenterbug.sfs file.

Type 2): Kerbals missing from HighLogic.CurrentGame.CrewRoster that are referenced by vessels cause the tracking station to break when selecting the vessel with the missing kerbal.

To reproduce, delete the assigned kerbal out of the ROSTER{} section of persistent.sfs, or see the attached trackingstation.sfs file.

Type 3): Kerbals missing from HighLogic.CurrentGame.CrewRoster that are referenced by ProgressTracking cause a throw when saving the scenario module, which breaks much like type 1 above.

This is likely a very low priority bug as it's only caused by fiddling with the persistent.sfs file, or spawning in vessels from other clients :)

DMP currently works around these bugs by spawning kerbals into the crewroster before loading the ScenarioModules or ProtoVessels, but feel free to close if you don't think this is KSP's bug to handle.

spacecenterbug.sfs (217 KB) spacecenterbug.sfs godarklight, 09/26/2014 07:28 AM
trackingstation.sfs (26 KB) trackingstation.sfs godarklight, 09/26/2014 07:28 AM

Related issues

Related to Kerbal Space Program - Bug #3896: Broken save keeps getting brokenDuplicate12/24/2014

Has duplicate Kerbal Space Program - Bug #3910: NullReferenceException when KSPAchievements.CrewRef.Save calledDuplicate12/27/2014

Has duplicate Kerbal Space Program - Bug #3922: Game-breaking bugDuplicate01/01/2015

History

#1 Updated by godarklight over 9 years ago

As of 0.90 this bug is now 100% reproduceable in stock, all you have to do is get a kerbal that's referenced by a progress tracking node killed and then remove it at the astronaut complex - it deletes it from the CrewRoster.

Here's a 5 minute youtube video explaining the reproduction steps (starting from a new game): http://youtu.be/5uBOB31D5II

And here's the actual trace:

NullReferenceException: Object reference not set to an instance of an object
at KSPAchievements.CrewRef.Save (.ConfigNode node) [0x00000] in <filename unknown>:0
at KSPAchievements.CrewRecovery.OnSave (.ConfigNode node) [0x00000] in <filename unknown>:0
at ProgressNode.Save (.ConfigNode node) [0x00000] in <filename unknown>:0
at ProgressTree.Save (.ConfigNode node) [0x00000] in <filename unknown>:0
at ProgressTracking.OnSave (.ConfigNode node) [0x00000] in <filename unknown>:0
at ScenarioModule.Save (.ConfigNode node) [0x00000] in <filename unknown>:0
at ProtoScenarioModule..ctor (.ScenarioModule module) [0x00000] in <filename unknown>:0
at ScenarioRunner.GetUpdatedProtoModules () [0x00000] in <filename unknown>:0
at Game.Updated () [0x00000] in <filename unknown>:0
at GamePersistence.SaveGame (System.String saveFileName, System.String saveFolder, SaveMode saveMode) [0x00000] in <filename unknown>:0
at SpacePlaneHangarBuilding.OnClicked () [0x00000] in <filename unknown>:0
at SpaceCenterBuilding.EnterBuilding () [0x00000] in <filename unknown>:0
at SpaceCenterBuilding.OnLeftClick () [0x00000] in <filename unknown>:0
at SpaceCenterBuilding+

.MoveNext () [0x00000] in <filename unknown>:0

#2 Updated by Claw over 9 years ago

  • Status changed from New to Confirmed
  • Severity changed from Very Low to Normal
  • % Done changed from 0 to 10

Confirmed.

This is a huge problem in v0.90 because any time you fire a kerbal who has logged an achievement been rescued from a contract causes the game to lock up and the save to be unusable. With the limited number of kerbals allowed by the building upgrades, this causes an issue.

#3 Updated by Squelch almost 9 years ago

  • Status changed from Confirmed to Resolved
  • % Done changed from 10 to 100

This problem was resolved for version 1.0.

#4 Updated by TriggerAu almost 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF