Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#3194 closed defect (fixed)

FT: Error on loading a game saved during a dialogue

Reported by: SF/glorifindel Owned by: sev-
Priority: normal Component: Engine: SCUMM
Keywords: Cc:
Game: Full Throttle

Description

Hi, I encounter this bug in Full Throttle with the Italian CD version (sound and voice compressed in ogg) running on ScummVM 0.10.0svn 18 May 2007 under WinXP sp2:
If you save the game during a dialogue (for example with the barman in the Kickstand) and try to load this savegame during the intro an error occur:

Error: charset 0 not in room 7 at 4029960+0 in ft.la1!

The error occur ONLY when you try to load the savegame during the intro.

Ticket imported from: #1722153. Ticket imported from: bugs/3194.

Attachments (6)

scummvm00000.png (23.8 KB) - added by SF/glorifindel 12 years ago.
Screen of the dialogue
scummvm00001.png (17.6 KB) - added by SF/glorifindel 12 years ago.
The load screen with the savegame
scummvm00002.png (3.6 KB) - added by SF/glorifindel 12 years ago.
Error when loading
ft-it.rar (17.9 KB) - added by SF/glorifindel 12 years ago.
Savegame
1722153.diff (998 bytes) - added by cyxx 12 years ago.
1722153-2.diff (2.5 KB) - added by cyxx 12 years ago.

Download all attachments as: .zip

Change History (20)

Changed 12 years ago by SF/glorifindel

Attachment: scummvm00000.png added

Screen of the dialogue

comment:1 Changed 12 years ago by SF/glorifindel

File Added: scummvm00000.png

Changed 12 years ago by SF/glorifindel

Attachment: scummvm00001.png added

The load screen with the savegame

comment:2 Changed 12 years ago by SF/glorifindel

File Added: scummvm00001.png

comment:3 Changed 12 years ago by SF/glorifindel

Summary: Error on loading a game saved during a dialogueFT: Error on loading a game saved during a dialogue

Changed 12 years ago by SF/glorifindel

Attachment: scummvm00002.png added

Error when loading

comment:4 Changed 12 years ago by SF/glorifindel

File Added: scummvm00002.png

Changed 12 years ago by SF/glorifindel

Attachment: ft-it.rar added

Savegame

comment:5 Changed 12 years ago by SF/glorifindel

File Added: ft-it.rar

Changed 12 years ago by cyxx

Attachment: 1722153.diff added

comment:6 Changed 12 years ago by cyxx

Looks like CharsetRenderer::_curId isn't part of the save/load data. If you load a game during the introduction, _curId is equal to 0 (no scripts have changed it to a "proper" value so far). If you load this savegame, the engine calls drawVerbs, which saves the current charset Id (== 0) in order to restore it at the end of the function. Then, CharsetRenderer::setCurId is called with id == 0, which calls getResourceAddress(rtCharset, 0).

Possible patch attached.

File Added: 1722153.diff

comment:7 Changed 12 years ago by sev-

Owner: set to sev-
Resolution: fixed
Status: newclosed

comment:8 Changed 12 years ago by sev-

Patch looks like exactly the right thing. Thank you, committed.

comment:9 Changed 12 years ago by fingolfin

Note: The patch won't fix existing savegames. Not sure how wide spread the error is, but it might be a nice enhancement to also reset the charset ID to a sane value for old save games...

comment:10 Changed 12 years ago by cyxx

>> Patch looks like exactly the right thing.

The patch fixes the issue but not in a elegant way (which is why I
haven't committed it in the first place). Wouldn't turning the
CharsetRender class into a subclass of Serializable be better ?

>> [...] reset the charset ID to a sane value for old
>> save game...

Yes, definitely. But what is the "sane value" ? _string[0].charset ?

Changed 12 years ago by cyxx

Attachment: 1722153-2.diff added

comment:11 Changed 12 years ago by cyxx

Status: closednew

comment:12 Changed 12 years ago by cyxx

New version of the patch, which should address both issues. I also added the _color class member to the saveload data to prevent similar problems (all other class members seem to be set/initialized before use).

Not sure how to deal with the previous commit now, I incremented the saveLoad version and added the skipping of the previously saved byte. This bloat the saveload code even more but during a testing period, I guess it's not acceptable to break all savestates written since revision 26947...

File Added: 1722153-2.diff

comment:13 Changed 12 years ago by sev-

Okay, this patch looks perfect to me. And although there is a very slight chance that someone created saves since yesterday, it's sane to bump save version anyway. So that saveload code bloat (mind you, just 2 extra lines) is my fault.

The patch has been committed.

comment:14 Changed 12 years ago by sev-

Status: newclosed
Note: See TracTickets for help on using tickets.