Menu

#6683 SCUMM: INDY3-VGA/DOS Saving during Cutscene corrupts savestate

closed-fixed
5
2014-10-29
2014-07-13
No

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)!

1 Attachments

Discussion

  • douglas

    douglas - 2014-07-13

    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.

     
  • digitall

    digitall - 2014-07-13
    • summary: INDY3 DOS-VGA --> SCUMM: INDY3-VGA/DOS Saving during Cutscene corrupts savestate
     
  • digitall

    digitall - 2014-07-13

    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.

     
  • douglas

    douglas - 2014-07-13

    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.

     

    Last edit: douglas 2014-07-13
  • digitall

    digitall - 2014-07-14

    Hmm. Could you try scummvm-1.0.0-win32 and scummvm-0.6.1-win32 please?

     
  • douglas

    douglas - 2014-07-14

    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.

     
  • digitall

    digitall - 2014-07-17

    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.

     
  • Robert Crossfield

    saving during cutscene works fine with 0.5.0

     
  • Robert Crossfield

    Works with 0.7.1
    Broken by 0.8.0

     
  • digitall

    digitall - 2014-07-26

    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.

     
  • digitall

    digitall - 2014-07-26

    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.

     
  • digitall

    digitall - 2014-07-26

    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.

     
  • Robert Crossfield

    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 ;)

     
  • digitall

    digitall - 2014-10-08

    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 :/

     
  • Robert Crossfield

    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

     
  • digitall

    digitall - 2014-10-11

    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.

     
  • Robert Crossfield

    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?

     
  • digitall

    digitall - 2014-10-21

    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.

     
  • digitall

    digitall - 2014-10-26

    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.

     
  • Filippos Karapetis

    • labels: --> SCUMM, Saving
    • status: open --> closed-fixed
    • assigned_to: Filippos Karapetis
    • Group: *None --> Indiana Jones 3 (VGA)
     
  • Filippos Karapetis

    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