View Issue Details

IDProjectCategoryLast Update
0017329Stars Beyond ReachBug - OtherJun 25, 2015 5:05 pm
ReporterTolc Assigned Tokeith.lamothe  
Severitymajor 
Status resolvedResolutionfixed 
Product Version0.897 
Fixed in Version0.899 (Stop Wiggling, RAM!) 
Summary0017329: Windows and Linux version of the game interpret the same savefile differently
DescriptionI played a SBR game on my Linux system today (Xubuntu 15.04 x86_64) and made some nice progress. After I was done I saved the game, Steam uploaded the savefile into the steam cloud and I switched back to Windows. After loading said savefile in the Windows version I suddenly had ridiculous amounts of crime and pollution and a negative value for the amount of trash storage space (see attached screenshots).

I verified that Steam didn't do anything to the savefile as both the original file (which still loads fine under Linux) and the file I loaded in Windows have the same md5 hash.

Both screenshots are from the same game. The one with the high crime number is taken from an earlier savefile of the same game ("international_waters_include_land.save")
TagsNo tags attached.

Activities

Tolc

Jun 20, 2015 5:59 pm

reporter  

Tolc

Jun 20, 2015 6:01 pm

reporter  

Tolc

Jun 20, 2015 6:01 pm

reporter  

incomp_testsave.save (182,421 bytes)

Tolc

Jun 20, 2015 6:02 pm

reporter  

Chris_McElligottPark

Jun 23, 2015 3:36 pm

administrator   ~0042407

Are you sure that both the windows and linux versions are on the same version of the game? Can you look in the upper left corner of the main menu for the game on each, and make sure it's the same, and then make sure that the interpretation is different?

My best guess is that the windows version updated and hence the difference, while the linux version was an older build.

Tolc

Jun 23, 2015 7:48 pm

reporter   ~0042416

No, both have the same version. I actually installed that Linux version only after the last version (0.897) was released. On Windows I let Steam check the game cache, but that always comes up with one file that needs to be acquired no matter how many times I run it. No change to the outcome, though.

I'll add a screenshot that I took in the incomp_testsave.save savefile on Linux, which shows the normal values.

Anything I could try or any info I could provide you with?

Tolc

Jun 23, 2015 7:50 pm

reporter  

Chris_McElligottPark

Jun 23, 2015 7:51 pm

administrator   ~0042417

Hmm, okay. I'll see what we can do with checking that out on windows to see if there is anything unusual there. If you hit end turn, does it change anything?

Chris_McElligottPark

Jun 23, 2015 7:52 pm

administrator   ~0042418

Oh! Can you run the 32bit linux version and see if it has the same issue as the windows version?

Tolc

Jun 23, 2015 7:55 pm

reporter   ~0042420

Nope, hitting end turn multiple times has no effect, I tried that before reporting.

Sure, I'll run the 32bit version, just let me reboot into Linux real quick.

Tolc

Jun 23, 2015 8:10 pm

reporter   ~0042425

Took a bit longer as I needed to install a bunch of 32bit libraries, but the outcome is the same as with the 64bit version. Both Linux binaries load the save file just fine.

Chris_McElligottPark

Jun 23, 2015 8:14 pm

administrator   ~0042426

Ah, gotcha -- well, thank you for the sleuthing! That definitely sounds like it is not a savegame issue then, per se, but rather some sort of calculation issue that is differing between OS. Which is, frankly, terrifying. ;) We'll see what we can see.

Tolc

Jun 23, 2015 8:19 pm

reporter   ~0042427

No worries :)

I'll try to start another game on Linux tomorrow and see if I can reproduce this, but now I need some sleep.

Chris_McElligottPark

Jun 23, 2015 8:35 pm

administrator   ~0042428

No worries at all -- I appreciate it. :)

For now I'd say just leave this alone and we'll see what we can figure out, and Keith may have some more specific questions for you. I suppose one other suggestion would be to save this same savegame as something like [savename]v2.save on your windows machine, and then see what your linux machine thinks of that. Does reading it in to the windows machine, then saving it back out without changing anything else, make it read in the same way on linux? That would be useful to know. I doubt it will make a difference, but knowing if it did would be one clue.

Tolc

Jun 24, 2015 5:31 am

reporter   ~0042433

Ok, then I'll wait for further instructions.

Yep, the savegame stays "corrupted" when I save it to another savefile on Windows and load it under Linux (both 64bit and 32bit executables)

Chris_McElligottPark

Jun 24, 2015 8:36 am

administrator   ~0042434

Okay, very awesome. Thank you! Can you upload the corrupted one just for reference?

Tolc

Jun 24, 2015 12:41 pm

reporter  

win_lin_test.save (181,217 bytes)

Tolc

Jun 24, 2015 12:41 pm

reporter   ~0042441

No problem and done ("win_lin_test.save")

keith.lamothe

Jun 25, 2015 5:05 pm

administrator   ~0042474

For 0.899:

* Fixed a bug where the serialization/deserialization of floating-point numbers in the save files was not using the invariant culture, and thus the saves were not cross-platform compatible (it could manifest as some numbers, like a city's stored trash, reading back as much higher than they actually were before the saves).
** Note that this does not repair old saves, there's really no clear way to do that, but what you can do is re-save the save on the originating platform (not the target platform) in the new version and it should load just fine wherever after that.

Thanks :)

Issue History

Date Modified Username Field Change
Jun 20, 2015 5:59 pm Tolc New Issue
Jun 20, 2015 5:59 pm Tolc File Added: Screenshot_2015_06_20_23_40_17.png
Jun 20, 2015 6:01 pm Tolc File Added: Screenshot_2015_06_20_23_40_55.png
Jun 20, 2015 6:01 pm Tolc File Added: incomp_testsave.save
Jun 20, 2015 6:02 pm Tolc File Added: international_waters_include_land.save
Jun 23, 2015 3:36 pm Chris_McElligottPark Note Added: 0042407
Jun 23, 2015 7:48 pm Tolc Note Added: 0042416
Jun 23, 2015 7:50 pm Tolc File Added: Screenshot_2015-06-24_01-29-55.png
Jun 23, 2015 7:51 pm Chris_McElligottPark Note Added: 0042417
Jun 23, 2015 7:51 pm Chris_McElligottPark Assigned To => keith.lamothe
Jun 23, 2015 7:51 pm Chris_McElligottPark Status new => assigned
Jun 23, 2015 7:52 pm Chris_McElligottPark Note Added: 0042418
Jun 23, 2015 7:55 pm Tolc Note Added: 0042420
Jun 23, 2015 8:10 pm Tolc Note Added: 0042425
Jun 23, 2015 8:14 pm Chris_McElligottPark Note Added: 0042426
Jun 23, 2015 8:19 pm Tolc Note Added: 0042427
Jun 23, 2015 8:35 pm Chris_McElligottPark Note Added: 0042428
Jun 24, 2015 5:31 am Tolc Note Added: 0042433
Jun 24, 2015 8:36 am Chris_McElligottPark Note Added: 0042434
Jun 24, 2015 12:41 pm Tolc File Added: win_lin_test.save
Jun 24, 2015 12:41 pm Tolc Note Added: 0042441
Jun 25, 2015 5:05 pm keith.lamothe Note Added: 0042474
Jun 25, 2015 5:05 pm keith.lamothe Status assigned => resolved
Jun 25, 2015 5:05 pm keith.lamothe Fixed in Version => 0.899 (Stop Wiggling, RAM!)
Jun 25, 2015 5:05 pm keith.lamothe Resolution open => fixed