News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

Repair corrupted savegame file

Started by pletiplot, August 08, 2009, 10:59:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pletiplot

Hi,
I have a savegame with long history recently I save it. But now I cant load it. It says:
FATAL ERROR: loadsave_t::rdwr_str()
string longer (376) than allowed size (256)
PRESS ANY KEY

and then windows throws Runtime Error and simutrans quits.

I then did a memtest and I found twou defect bits!
So I think the defect bit corrupted the saving process and the file is corrupted.
Is there some possibility, how to repair the file? Or some documentation on the savegame format (and I could repair it myself).
I have a backup from June, but I would be pleased if I have the recent one.
I think this could be chalange for all simutrans haxors.

IgorEliezer

Hmmm... didn't you see the board description?

QuoteSaved Games
Show us your proudest moments or latest projects. Screenshots and saved games most welcome.

If you need help, you should have posted in Help Request board. ;)

whoami

Quote from: pletiplot on August 08, 2009, 10:59:01 PM
I then did a memtest and I found twou defect bits!
It's really hard to understand why ECC didn't become standard (again) with nowaday's RAM prices. Even my gaming PC has ECC, but it's an old "workstation", the premium variant of computer. PC manufacturers reserve these professional features to the high-end segment. I conclude, from personal experience, that (in the low-end market) even rented "servers" may not have ECC etc., but may contain low-end/consumer components in a rack-mount case.

QuoteSo I think the defect bit corrupted the saving process and the file is corrupted.
It need not just have corrupted two bits when creating the savegame. Depending on the use of the defective bytes (in the address space) and the number of changes to the map (with defective RAM), any number of bits may have become defective. Therefore, many more corruptions may hide behind the first.
The loading routine could be changed to ignore defects (= omitting the object/structure with invalid data), but this would (usually) break your savegame as well, if many defects were present.

QuoteIs there some possibility, how to repair the file? Or some documentation on the savegame format (and I could repair it myself).
After saving the map in XML format, it can be edited with a text editor. But your savegame doesn't even load, to it cannot be (easily) converted to XML.

gerw

Quote from: pletiplot on August 08, 2009, 10:59:01 PM
Is there some possibility, how to repair the file? Or some documentation on the savegame format (and I could repair it myself).
The 'documentation' of the save game format is the code itself :) The rdwr-routines tell it to you... But it may become very time-consuming to repair the save game by hand.

pletiplot

I know much about IT and I know, that the defective bits in ram can affect much more bytes then them itselves. But the game was running properly, I experienced no problems. So I hoped that only few bytes are invalid and it will be repairable. I read something about the simutrans savegames, the savegame is primarily a zip with some binary data. I tried to unzip it and I saw a 3GB file inside instead of 100MB which I should see. If I repair a zip file the data can be saved, but I think not much of it. I will write some reports next time.

prissi

It could be also an error in simutrans, that you renamed something (and simutrans will automaically extend the string) but then saved a toolong string. However, usuallything isjustgone wrong.

The games are notzip, but Z compressed. Since you uncompressed file is more thn five time of the compressed file, I think rather the file itself is damaged, since typically the ompression is not as good (depends of course on the game in question). Damaged savegames are usually way too large after unpacking.