#6683 closed defect (fixed)
SCUMM: INDY3-VGA/DOS Saving during Cutscene corrupts savestate
Reported by: | SF/segra | Owned by: | bluegr |
---|---|---|---|
Priority: | normal | Component: | Engine: SCUMM |
Version: | Keywords: | ||
Cc: | Game: | Indiana Jones 3 |
Description
ScummVM 1.7.0git6476-g6c2a7f0 (Apr 29 2014 09:13:29) on Windows 7 64-bit
(also occurred on 1.6)
Saved during a cut scene and the save game is now corrupt, crashing on load with "Room 0: data not found"
User picked target 'indy3-vga' (gameid 'indy3')... Looking for a plugin supporting this gameid... SCUMM [all games] Starting 'Indiana Jones and the Last Crusade' Room 0: data not found (engines/scumm/room.cpp:259)!
Ticket imported from: bugs/6683.
Attachments (2)
Change History (23)
by , 10 years ago
Attachment: | indy3-vga.s20 added |
---|
by , 10 years ago
Attachment: | INDY3 Castle Cutscenes.rar added |
---|
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Summary: | INDY3 DOS-VGA → SCUMM: INDY3-VGA/DOS Saving during Cutscene corrupts savestate |
---|
comment:3 by , 10 years ago
diggly: You indicated that this occurs on v1.6.0 as well. However, please test with the Win32 versions instead and see if this occurs there i.e. is this specific to 64-bit builds?
Also, if you could test with v1.5.0 and earlier and see if this is a regression. Thanks.
comment:4 by , 10 years ago
Replicated the bug with mingw-w32-stable-87ef1c39 1.7.0pre77-g87ef1c3 (32-bit), scummvm-1.6.0-win32, scummvm-1.5.0-win32 and scummvm-1.4.1-win32.
comment:6 by , 10 years ago
Replicated bug with scummvm-1.0.0-win32. I kept getting a "Failed to save game state" error in 0.6.1 so I was unable to test it.
comment:7 by , 10 years ago
Can you try with 0.5.0 and earlier, and with 0.7.1 to 0.13.1 and see if this has ever worked? This is a "gross" bisection and will indicate if this was a regression.
comment:10 by , 10 years ago
segra: EXCELLENT. Thank you for doing this "gross bisection".
I will now use your INDY3 savegames to repeat this on each commit between 0.7.1 and 0.8.0 and see if I can locate the exact point of regression.
Please stand by.
comment:11 by , 10 years ago
Ah. This is not easy as GCC 4+ will not compile code of that age anymore as it contains errors which the older compilers did not detect, but are now fatal to compilation. Will need to setup an older Linux virtual machine with GCC 3.xx and bisect there.
comment:12 by , 10 years ago
segra: Can you please attach savegames to help replicate this saved with v0.7.1 please?
Newer savegames have a format which can not be loaded by older builds, though we try to ensure that older savegames can be loaded by newer builds. Hence to test this easily, I need a savegame from v0.7.1 just before a cutscene with instructions to trigger the start of the cutscene. Also, a savegame during from both v0.7.1 and (bad save) from v0.8.0 would be useful as the SCUMM developers can have a look at the format and see if they can work out the issue that way.
comment:13 by , 10 years ago
hey digitall,
apologies for slow response, you can just use the debugger 'room' command to skip to the castle entrance, upon leaving the castle the cut-scene will start.
I've tested with method, and played the game through to this point (the issue with saving is the same both ways)
off the top of my head, i cant remember which room number it is... but i can put some saves together if you really really want :)
i spent a an hour or so going over the code/revisions between the two versions, unfortunately nothing obvious stood out.. might do some playing around this weekend (its been about 2.5 years since my last work on the MMC64 engine, so will take a bit to get all the libraries setup again ;)
comment:14 by , 10 years ago
Robert: Thank you for continuing to look at this.
Just tested using your savegame with latest git master. It is Room 22.
If you jump to this from a new game start, you need to punch out the guard and then leave and rejoin the room to get the first cut scene you gave a savegame for i.e. "Meanwhile in the castle..."
If you can get v0.7.1 to v0.8.0 codebase to compile then it would probably be best to do this by playtesting with git bisection. I suspect the cause will be subtle :/
comment:15 by , 10 years ago
Turns out this occurs for any game which has a 'lead up' to a cutscene (black screen, text at the top)...
as this is considered 'room 0', thus _currentroom is set to 0
The exact commit which 'breaks' it is 973cb9a281e7b2dc73b7c640172954cc5f0bacfd (27/04/2005)
" * Make use of the new loadRoomSubBlocks (which only loads static room data now) in the save/load code; this also means we have to save a bit less data, and reduce code duplication "
this is because a check was added to roomptr, prior to this it didn't check if it successfully loaded the room or not.
i've done a fix, not sure if its the correct solution or not.. but it works for mm/zak/indy https://github.com/scummvm/scummvm/pull/522
comment:16 by , 10 years ago
segra: Excellent work! Thanks for this.
The SCUMM engine developers will look at this and your proposed fix in the Pull Request and see about getting this fixed.
Thanks again.
comment:17 by , 10 years ago
i did a check with MI1 CD ver, and after leaving the Scumm-Bar for the first time.. it goes to a cutscene under MI with Lechuck... but it starts with just black text at the top saying 'Meanwhile'
while this occurs, 'Save' is grayed out in the menu.. but as soon as the actual cutscene is playing, you can save again.
I'll have to check the disk version, but perhaps we should just be disabling save while in room0?
comment:18 by , 10 years ago
That sounds likely as most games don't allow load or save during a cutscene. Checking the behaviour with the original interpreter under DOSBox would be best.
comment:19 by , 10 years ago
segra has submitted a bug fix for this problem as a Pull Request here: https://github.com/scummvm/scummvm/pull/522
However, this still may be that we should be preventing saving during room 0 instead.. Once we get either fix merged to the master, we can close this bug as fixed.
comment:20 by , 10 years ago
Component: | → Engine: SCUMM |
---|---|
Game: | → Indiana Jones 3 |
Owner: | set to |
Resolution: | → fixed |
Status: | new → closed |
comment:21 by , 10 years ago
Since the original doesn't allow saving in these locations either, I've pushed my changes in commit 40b224f, based off segrax's work. It's better to completely disallow saving in such cases, instead of adding explicit checks for them.
Many thanks for your work segrax :) Closing this as resolved
Replicated with mingw-w64-stable-bccbdb75 1.7.0pre64-gbccbdb7 (64-bit) in Windows 7.
It seems this bug occurs in both the VGA and EGA versions.
I've included saves just before the castle cutscenes start in both versions of the game. If you save your game when the green text at the start of the cutscenes is displayed, you will be unable to load that save later.