Arcen Games

General Category => AI War Classic => AI War Classic - Technical Support => : SpaceJelly March 17, 2011, 08:44:50 AM

: 5.004 - Save Game Error
: SpaceJelly March 17, 2011, 08:44:50 AM
My first post, and unfortunately a bug with the latest beta release :(

Updated this morning and loaded my 5.003 saves without any problems. Played for about 15 minutes or so, saved and quit.

Now, just tried to go back into and load up the latest save and I get the following error;

(http://www.greenberry.co.uk/error.png)

I've loaded up a 5.003 save again and tried re-saving and re-opening and the same happens :(

System is Windows 7 x64.

Any suggestions?

Cheers,

Spacey
: Re: 5.004 - Save Game Error
: keith.lamothe March 17, 2011, 08:53:46 AM
It would be very helpful if you could post the save that doesn't load right :)
: Re: 5.004 - Save Game Error - SOLVED
: SpaceJelly March 17, 2011, 08:56:03 AM
ok, Answering my own question here! I checked the advanced tab in the settings and the 'Don't compress saves' wasn't ticked. I ticked this and tried again. Still wouldn't load the save.

So, I loaded up the 5.003 save and immediately re-saved this file. I then evaluated my latest 5.004 save that won't open with the fresh 5.003 converted save and found that the 5.004 save that doesn't open has this at the top; COMP 5.004

The fresh save doesn't! So I deleted that line and re-saved the file manually (I used EmEditor, as notepad won't line break correctly) and tried loading the save.....

It works!

So it looks like the game is saving them oddly if that 'Don't compress saves' isn't ticked. It looked like they were uncompressed, but had a compressed header (I believe that's what COMP means)

Old 5.003 save looked a little like this;

COMP 5.003
EGcRAB+LCABhNYFNAP <SNIP>

5.004 save that won't load looked like this;
COMP 5.004
5004|1
19|11314
46|1,1,60,2,,0,0,0,1,1,1,1,1,1,1,1,0,0,1,0,-1,False,,,,,1,2,1,0,1,1,

and the 5.004 file that does load after being re-saved with the 'Don't compress saves' box ticked looks like this;
5004|1
19|11314
46|1,1,60,2,,0,0,0,1,1,1,1,1,1,1,1,0,0,1,0,-1,False,,,,,1,2,1,0,1,1,
: Re: 5.004 - Save Game Error
: SpaceJelly March 17, 2011, 08:57:47 AM
It would be very helpful if you could post the save that doesn't load right :)

I sure can, but hopefully my findings above explains what's happened :)

: Re: 5.004 - Save Game Error
: keith.lamothe March 17, 2011, 09:01:00 AM
That does make sense, yes, it seemed that the 5.004 logic for saving a compressed save game is either not compressing it as thoroughly as 5.003 or simply not compressing it at all, but is flagging it as compressed, so the loading code throws up its hands when it gets a "compressed" string that's rather invalid.
: Re: 5.004 - Save Game Error
: x4000 March 17, 2011, 09:12:02 AM
Yeah, that's my bad. I'll push a fix for that this morning! Thanks for the sleuthing. :)
: Re: 5.004 - Save Game Error
: SpaceJelly March 17, 2011, 09:16:58 AM
Glad to help, and thanks for the fantastic game!
: Re: 5.004 - Save Game Error
: x4000 March 17, 2011, 10:07:40 AM
Many thanks!

This is coming in 30 minutes or so:

* Savegames from 5.004 were accidentally all uncompressed, though flagged as compressed, which caused them to not be able to be read back in.  Two fixes:
** First, fixed the actual cause of this, so new savegames in 5.005 will be saved properly.
** Second, updated the load savegame process so that it can read even the "corrupt" saves from 5.004 without issue.