Opened 18 years ago

Closed 17 years ago

Last modified 17 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
Version: 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 18 years ago.
Screen of the dialogue
scummvm00001.png (17.6 KB ) - added by SF/glorifindel 18 years ago.
The load screen with the savegame
scummvm00002.png (3.6 KB ) - added by SF/glorifindel 18 years ago.
Error when loading
ft-it.rar (17.9 KB ) - added by SF/glorifindel 18 years ago.
Savegame
1722153.diff (998 bytes ) - added by cyxx 18 years ago.
1722153-2.diff (2.5 KB ) - added by cyxx 18 years ago.

Download all attachments as: .zip

Change History (20)

by SF/glorifindel, 18 years ago

Attachment: scummvm00000.png added

Screen of the dialogue

comment:1 by SF/glorifindel, 18 years ago

File Added: scummvm00000.png

by SF/glorifindel, 18 years ago

Attachment: scummvm00001.png added

The load screen with the savegame

comment:2 by SF/glorifindel, 18 years ago

File Added: scummvm00001.png

comment:3 by SF/glorifindel, 18 years ago

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

by SF/glorifindel, 18 years ago

Attachment: scummvm00002.png added

Error when loading

comment:4 by SF/glorifindel, 18 years ago

File Added: scummvm00002.png

by SF/glorifindel, 18 years ago

Attachment: ft-it.rar added

Savegame

comment:5 by SF/glorifindel, 18 years ago

File Added: ft-it.rar

by cyxx, 18 years ago

Attachment: 1722153.diff added

comment:6 by cyxx, 18 years ago

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 by sev-, 18 years ago

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

comment:8 by sev-, 18 years ago

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

comment:9 by fingolfin, 18 years ago

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 by cyxx, 18 years ago

>> 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 ?

by cyxx, 18 years ago

Attachment: 1722153-2.diff added

comment:11 by cyxx, 18 years ago

Status: closednew

comment:12 by cyxx, 18 years ago

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 by sev-, 17 years ago

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 by sev-, 17 years ago

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