#12060 closed defect (fixed)
SCI: GK1: Can not restore saved game.
Reported by: | vanfanel | Owned by: | sluicebox |
---|---|---|---|
Priority: | normal | Component: | Engine: SCI |
Version: | Keywords: | ||
Cc: | Game: | Gabriel Knight 1 |
Description
Hi there!
Using latest .DEB version of Scummvm, 2.2.0 as of this writting. Also tried stock Ubuntu version, which is currently 2.1.0.
I have tried on both X86_64 and ARM aarch64.
I have been using Scummvm for years, and I have never encountered this bug with any other game.
With the GOG version of GK1, I can save the game but I can not restore it. The engine says: The game was saved under a different game or interpreter version.
With my own spanish CD copy, it says the same, except... well, in spanish.
I can also see this on the console:
WARNING: Save game was created for game version ��4�U, but the current game version is �I�ɮU!
Version numbers look like that. Any idea on what could be happening here?
The game is listed as supported.
Thanks!
Attachments (1)
Change History (6)
by , 4 years ago
Attachment: | gk1-cd.001 added |
---|
comment:1 by , 4 years ago
comment:2 by , 4 years ago
Yes, creating this file manually works. Thanks!
Maybe SCUMMVM should warn about this file being missing at start?
comment:3 by , 4 years ago
Maybe SCUMMVM should warn about this file being missing at start?
That's what I would have thought too, but I'm not sure which games actually require it. Hopefully someone more familiar with SCI will be able to tell us.
I noticed that I had missed copying the VERSION file for some of my SCI games that I haven't gotten around to playing yet, which made me a bit worried. But at least for some it didn't seem to make a difference. And for a few - I forget which ones - I couldn't even find such a file on the CD.
comment:4 by , 4 years ago
Component: | --Unset-- → Engine: SCI |
---|---|
Game: | → Gabriel Knight 1 |
Summary: | [SCI][Gabriel Knight][GNU/Linux/SD:2] Can not restore saved game. → SCI: GK1: Can not restore saved game. |
comment:5 by , 4 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
SCI games depend on many game-specific and version-specific files and if they're run without them they'll fail in different ways. GK1 has dozens of files that are indirectly relied upon. The SCI instructions are to copy all of the files: https://wiki.scummvm.org/index.php/Datafiles#All_SCI32_.28SCI2.2F3.29_games
The gibberish bytes are because ScummVM returns uninitialized memory when reading a string from an invalid file handle. The GK1 game scripts don't do any error checking when reading VERSION (which Sierra fixed in later SCI32 games) so when there's no VERSION you're getting random bytes. Those random bytes got saved in save-files and then compared to new random bytes upon Restore with unpredictable results. You can see this because ScummVM always logs "WARNING: Attempt to use invalid/unused file handle 65535!" when you start GK1 without VERSION.
I've improved this slightly by changing ScummVM to always initialize kFileIOReadString's output so that the results will be consistent. Now if you save a GK1 game without a VERSION file it will still load if you don't have the VERSION file. But that just keeps a bad situation from getting worse.
The real problem here was missing game files. You gotta have 'em all! =)
https://github.com/scummvm/scummvm/commit/89c67944f4c0d51c1fc6f81c2bbc3c78ca862812
I know very little about the SCI engine, but it looks to me like the version it's referring to is the one found in the file called VERSION. At least in my copy of the game, this is just a text file (with CRLF line breaks) that contains the text "01.100.000".
If I look at the start of a savefile I just made, I see this:
So the version gets stored there. So I tried removing the VERSION file. The game still starts, but my next savegame looked like this:
Where the version should be stored, there's now only random (?) garbage. And when I try to load this later, I guess it's checking against different random garbage and determines that the save file is incompatible.
Could this be a clue?