Jump to content

Why do save files get corrupted?


Jimbimbibble

Recommended Posts

So, my career mode save I've been working on for a month got corrupted. It was throwing around a bunch of Null Reference Exceptions and wouldn't let me enter the VAB, launch anything, etc. Fortunately I had a recent quick save that wasn't corrupted. So, my question is, why does this happen? I've done some basic coding but I haven't studied computer science in school so a good response should be pretty technical, but don't assume I know everything. Thanks!

Link to comment
Share on other sites

It depends on what you mean by 'corrupted'. There are a bunch of different ways a save might be corrupted, and really in a lot of cases the save isn't corrupt at all (even in your case) but just in a state that the game doesn't know how to handle. Your specific problem sounds very much like [thread=105651]this one[/thread], for which there is both a known fix and a plugin that will silently take care of most situations in future to prevent reoccurrences. In that case, what happens is that the game expects any kerbals listed in the Achievements section of the save file to be present in the roster. However, it's possible to fire kerbals, which removes them from the roster completely (although I think in the case of the three orange-suited kerbals, they simply are relegated to the Applicants list) and causes the game to enter this kind of situation, if the fired kerbal was listed in the achievements section somewhere. You have to do some manual fiddling to fix it, which is described in detail in the thread I linked.

There are other types of save corruption that typically only happen when the game (or system) crashes in the middle of saving the file, which can sometimes result in the save file (or, slightly more commonly, whichever craft you were working on in the editors) becoming truncated, resulting in it being unreadable. Most of the time such a broken file will prevent the load dialog from appearing -- truncated persistent.sfs files will prevent the Resume Game dialog from appearing, whilst truncated .craft files will prevent the Load dialog in the editor(s) from appearing, mostly due to some slightly poorly-handled exceptions that tend to be thrown when the game tries to load a truncated file. :)

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...