Opened 4 years ago
Closed 4 years ago
#12036 closed defect (fixed)
TWINE: No items in save game
Reported by: | vvs- | Owned by: | vvs- |
---|---|---|---|
Priority: | normal | Component: | Engine: TwinE |
Version: | Keywords: | ||
Cc: | Game: | Little Big Adventure |
Description
After restoring a save game the inventory is empty. Get ID card and Holomap, leave asylum and exit the game. After restoring from saved game there is nothing in inventory.
Attachments (4)
Change History (26)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
comment:3 by , 4 years ago
Twinsen respawned on the outside of asylum in nurse costume but with empty inventory, savegame attached.
comment:4 by , 4 years ago
Summary: | No items in save game → TWINE: No items in save game |
---|
comment:5 by , 4 years ago
All game flags are zero after choosing "Continue saved game".
BTW game flag 70 is always zero, is that right?
comment:6 by , 4 years ago
gameflag 70: this is set to 1 if inventory items are taken from Twinsen when he goes to jail (inventory is empty), Set back to 0 by the scripts (if you leave the scene or get your stuff back).
comment:8 by , 4 years ago
Nothing has changed. I've attached a new save game for ScummVM commit ad01f082649137f755b287854764556410f98b50. Choosing "Continue saved game" from the main menu still produced empty inventory.
comment:9 by , 4 years ago
Oh, sorry. For some reason my repository clone didn't updated. I should check again.
comment:10 by , 4 years ago
Hmm... OTOH this is the latest TwinE commit as of today's morning. I guess there is something strange with the date ordering of commits in the GitHub repo.
So, yes, I confirm that nothing has changed in the latest ScummVM version.
comment:11 by , 4 years ago
comment:12 by , 4 years ago
No luck in commit 0d55a6f69b79e98d3b14b523f62ba7ee34da7973 either. I still get empty inventory after restoring from saved game. All game flags are zero. Before using save game everything is fine and game flags 0 and 10 are set to 1. But not after restoring.
This looks like system specific bug to me. Something is non-portable there.
Here are my specs:
NixOS 20.09
gcc 9.3.0
32-bit Intel x86 arch
There are a few warnings during compilation, but they seem unrelated. Wild guess: probably serializing/de-serializing game data to save game file isn't working properly on 32-bit arch?
comment:13 by , 4 years ago
It loads it fine, but definitely corrupts the saved game.
I did an experiment. Using original DOS executable I've got the saved game file there. Then decompressed ScummVM LBA save game file and overwrited its beginning with the DOS one. Then compressed it again and loaded in ScummVM. This time all inventory was there. But after exit and restore it was empty again.
comment:14 by , 4 years ago
I've just pushed a commit with further debug messages - if you be nice, if you could start scummvm like this "scummvm -d 2" and attach the debug messages that you get when playing up to leaving the asylum.
There was also a minor modification which I highly doubt should change anything: fded279bc7a937f380e3a998de7daf8b37f7b977 - but if it does, I have to investigate that particular issue and maybe also rework the holomap flag saving.
comment:16 by , 4 years ago
BTW, I've noticed that this debug message won't appear if you just close the window instead of using Quit
menu item. There is a call to clear game state in that menu item.
comment:17 by , 4 years ago
Thank you very much. I've debugged further and still can't find anything. It should really not be platform dependent. I've therefore extended the debug logging again. If you could do me the favor to perform the steps with debug logging active again, that might help to nail it down (I've added more context debug messages). And sorry for all the testing (but also a big thank you!).
comment:18 by , 4 years ago
I believe the culprit should be right here:
https://github.com/scummvm/scummvm/blob/dd0e481f4d09f5fb51c46d2a6c1a2e516d0283aa/engines/twine/scene/gamestate.cpp#L511
Which is called from here:
https://github.com/scummvm/scummvm/blob/dd0e481f4d09f5fb51c46d2a6c1a2e516d0283aa/engines/twine/menu/menu.cpp#L786
comment:19 by , 4 years ago
I've attached new debug logs which confirm my hypothesis. Leaving by choosing Quit
in menu produce empty inventory in saved game, while leaving by closing window is not.
comment:20 by , 4 years ago
Thanks a lot - I'm not sure why there should be an autosave on giveup at all. For LBA1 we already performed an autosave on entering the scene. If you abort it you should not override the autosave imo. I'll for now just disable that particular autosave. Thanks a lot for nailing it down.
comment:21 by , 4 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → pending |
Could you please attach such a savegame?