Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Save Files Will Not Load  (Read 1295 times)

jag32000

  • Ensign
  • *
  • Posts: 1
    • View Profile
Save Files Will Not Load
« on: November 29, 2020, 02:19:42 AM »

I am playing the vanilla game and I have repeatedly been having the issue of my saves being unable to load, so I have taken to save copying frequently to get around this. However, the most recent instance has resulted in me losing 10 levels and all of my work on my colony, I would really love to be able to fix that save and ideally prevent this issue from occurring again.
Any help would be greatly appreciated. Other than that I have really been enjoying the game!
Logged

IonDragonX

  • Admiral
  • *****
  • Posts: 816
    • View Profile
Re: Save Files Will Not Load
« Reply #1 on: November 29, 2020, 04:35:05 AM »

Maybe this will help with some memory leaks :
http://fractalsoftworks.com/forum/index.php?topic=19210.0

Maybe uninstall and re-download the latest patches. Even though the version number didn't change, there were two hotfixes :
http://fractalsoftworks.com/2019/05/10/starsector-0-9-1a-release/
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24103
    • View Profile
Re: Save Files Will Not Load
« Reply #2 on: November 29, 2020, 09:42:09 AM »

I am playing the vanilla game and I have repeatedly been having the issue of my saves being unable to load, so I have taken to save copying frequently to get around this. However, the most recent instance has resulted in me losing 10 levels and all of my work on my colony, I would really love to be able to fix that save and ideally prevent this issue from occurring again.
Any help would be greatly appreciated. Other than that I have really been enjoying the game!

Hi - I'm sorry about the trouble! Hmm. That's a bit unusual; that is, I hear about an occasional save being corrupted in vanilla, but it being persistent like this is odd. (It might be worth checking in windows Event Viewer to see if you're getting any System or Application errors that might point at, say, failing hardware, or some such. In your shoes, I'd do this just in case - it's not at all certain that this is the problem, but better safe than sorry.)

If you're not aware: in your save folder, there's a backup for each save. So if a save fails to load, you can get back to the previous version by using the .bak files. What's in each save folder is:

descriptor.xml
campaign.xml
descriptor.xml.bak
campaign.xml.bak

And you want to move off the .xml files and then remove the .bak extension from the backup files so they get used by the game. Chances are it'll be a more recent version that your latest save copy.

And, finally - what are the error messages you're getting? The stack trace from the log would be good to see as well. If you're able to send a non-working save to me (fractalsoftworks [at] gmail [dot] com) that might shed some light on the situation, too.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24103
    • View Profile
Re: Save Files Will Not Load
« Reply #3 on: November 29, 2020, 11:31:29 AM »

Got your email with the save, thank you!

So, hmm the main savefile with the data - campaign.xml - is actually missing here. But there IS a campaign.xml.inprogress.

Basically, the process when the game is saved is:
1) Write out a temporary campaign.xml.inprogress file with the new save data
2) Rename the old campaign.xml to campaign.xml.bak
3) Rename campaign.xml.inprogress to campaign.xml

This is done so that if something goes wrong while saving, there's a chance that a working copy of the save will still be present. In this case, it looks like step 3) failed for some reason. So, if you manually rename "campaign.xml.inprogress" to "campaign.xml", that should get you a working save.

As to why this keeps happening for you, I'm not sure! One possibility is it's a file system permissions issue. One thing that might help is always running the game as administrator. Another is whitelisting the executable - both starsector.exe, and the java.exe found under jre/bin in the game folder - with whatever antivirus you've got running.
Logged