Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Save game can't open (liblzma returned error code)? #7649
Reddit told me this was the best place to go for answers on this
Version of OpenTTD - 1.9.1
Expected result - Should let me load the game
Actual result - Load game screen says that libIzma returned error code
Steps to reproduce - No idea
Screenshot - https://imgur.com/a/w7nodN1
Non-working Save game - https://drive.google.com/file/d/1HOTRSZLrYPpJAhrD-4mNg9bFLhQPwZs4/view?usp=sharing
Save game with nothing done - https://drive.google.com/file/d/1fT7tQiDB6tLun7BSiBGxVoRi2sMU27L_/view?usp=sharing
The exact scenario that I used - https://drive.google.com/file/d/1m2PGehKRn_g0Gv00N-1pdL1KOGoP31P-/view?usp=sharing
The scenario that it is all ultimately based on - https://drive.google.com/file/d/1qGrdczGatKrdaz-EgPRC1nyVLIRp7JXX/view?usp=sharing
I tried loading the savegame under debugger to get the exact error code. The LZMA library returns error 9 (LZMA_DATA_ERROR): "Decoders return this error if the input data is corrupt. This can mean, for example, invalid CRC32 in headers or invalid check of uncompressed data."
In short, the save file is plain broken. As far as I can tell from the internal data, the error happens about 128 kb before the end of the file.
Is there any way to display the exact error code that is being outputted by the LZMA library inside of the error text in the savegame select windows (i.e. "Broken savegame - liblzma returned error code 9") in the standard nightly OpenTTD versions? If so, how?