Opened 5 months ago

Last modified 5 months ago

#15591 new defect

GOB: Goblins 3 - Latest save is not loaded

Reported by: Jerome-Labbe-RedArtGames Owned by:
Priority: normal Component: Engine: Gob
Version: Keywords:
Cc: Game: Goblins 3

Description

ScummVM version:
ScummVM 2.8.1 (Mar 16 2024 13:01:03)

Bug details:

It seems that the latest save is not properly displayed/loaded unless if you hover another save, or if you quit the game.

To reproduce:

  1. Launch Gob3
  2. Save on Slot 1 without moving at all
  3. Move your character on the right of the screen and overwrite save on Slot 1
  4. Go in the "LOAD" menu and hover the save you just made
  5. you'll see that the preview is not refreshed, Blount is not on the right of the screen as when you saved but on the left, as it was during the first save. If you click on it it will load the previous save before your latest save...

If you quit the game and launch it again, the latest save is now previewed properly and can be loaded.
I also noted that if you have another save on Slot 2, if you hover on it, and hover the current save again on Slot 1, you'll see the Slot 1 preview is now refreshed and you can load it properly.

This bug doesn't happen when playing in DOSBox.

Language of game: any

Version of game: PC DOS Floppy and PC DOS CD

Your OS: Windows 10 Home 10.0.19045 Build 19045

Change History (3)

comment:1 by Jerome-Labbe-RedArtGames, 5 months ago

It seems to be a regression.
According to my tests, it was working properly in 0.13.1, and the bug was introduced in ScummVM1.0.0rc1

comment:2 by BJNFNE, 5 months ago

Tried under the Windows version of Gobliins 3 and there it happens aswell.

comment:3 by Antonin-Carette-RedArtGames, 5 months ago

I have found the issue: when saving, the GameHandler registers the slot index to save the game (in the example we name "0"), but the current _reader detains the old save state!

Reloading the same save slot right after, the _reader is not recreated as the condition

// In 'bool createReader(int slot)' from saveload_v3.cpp

if (!_reader || (_reader->getSlot() != ((uint32)slot))) { ... }

is false.

If you select another save, the slot is not the previous one, so the _reader will be recreated.

I have two different solutions for that:

  1. Forget the condition to recreate the _reader from scratch each time, in the createReader function,
  2. Recreate the _reader right after a save.

I would prefer the first solution personally.

Also, looking at the code, I think the same mistake has been reproduced on other games like Inca2 and all games that uses v4 or v6.

Last edited 5 months ago by Antonin-Carette-RedArtGames (previous) (diff)
Note: See TracTickets for help on using tickets.