Opened 3 years ago

Closed 3 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)

lba.000 (14.0 KB ) - added by vvs- 3 years ago.
empty inventory
log.gz (1.3 KB ) - added by vvs- 3 years ago.
scummvm -d 2 debug log
logquit.txt.gz (1.5 KB ) - added by vvs- 3 years ago.
debug log when leaving through menu
logclose.txt.gz (1.5 KB ) - added by vvs- 3 years ago.
debug log when leaving through window closing

Download all attachments as: .zip

Change History (26)

comment:1 by mgerhardy, 3 years ago

Could you please attach such a savegame?

comment:2 by mgerhardy, 3 years ago

The first scene reset the gameflags:
and thus removes the items from your inventory. This should not happen in the second scene. Are you respawning in the asylum after loading? or on the outside?

gameflag[70]=0
gameflag[0]=0
gameflag[10]=0

comment:3 by vvs-, 3 years ago

Twinsen respawned on the outside of asylum in nurse costume but with empty inventory, savegame attached.

comment:4 by sev-, 3 years ago

Summary: No items in save gameTWINE: No items in save game

comment:5 by vvs-, 3 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 mgerhardy, 3 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:7 by mgerhardy, 3 years ago

I can't reproduce this anymore.

by vvs-, 3 years ago

Attachment: lba.000 added

empty inventory

comment:8 by vvs-, 3 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 vvs-, 3 years ago

Oh, sorry. For some reason my repository clone didn't updated. I should check again.

comment:10 by vvs-, 3 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 mgerhardy, 3 years ago

I still can not reproduce this - I'm starting a new game and play through the first scene. The savegame that is automatically produced at the beginning of the second scene does contain the inventory items gameflags[0] and gameflags[10] is set to 1

comment:12 by vvs-, 3 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 vvs-, 3 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 mgerhardy, 3 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.

by vvs-, 3 years ago

Attachment: log.gz added

scummvm -d 2 debug log

comment:15 by vvs-, 3 years ago

I've attached the log. There is clear all gameStateFlags at the end.

comment:16 by vvs-, 3 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 mgerhardy, 3 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!).

by vvs-, 3 years ago

Attachment: logquit.txt.gz added

debug log when leaving through menu

by vvs-, 3 years ago

Attachment: logclose.txt.gz added

debug log when leaving through window closing

comment:19 by vvs-, 3 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 mgerhardy, 3 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.

see 525391c2d17ad882d3151d00c38fd4785376d952

comment:21 by mgerhardy, 3 years ago

Owner: set to mgerhardy
Resolution: fixed
Status: newpending

comment:22 by vvs-, 3 years ago

Owner: changed from mgerhardy to vvs-
Status: pendingclosed

Thanks! Fixed.

Note: See TracTickets for help on using tickets.