Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#10471 closed defect (fixed)

SFINX: ScummVM crashing during projector cutscene

Reported by: Kriz1 Owned by: criezy
Priority: normal Component: Engine: CGE2
Version: Keywords:
Cc: Game: Sfinx

Description

While playing Sfinx Polish version ScummVM crashes after clicking on the projector and shortly after the custscene starts with the following message: "ERROR: Bad PHASE in SEQ 04ta1200.SPR!". I'm attaching save file for analysis.

ScummVM 2.0
OS: Windows 10 build 1709 64-bit

Attachments (1)

sfinx-pl.002 (27.0 KB ) - added by Kriz1 7 years ago.

Download all attachments as: .zip

Change History (7)

by Kriz1, 7 years ago

Attachment: sfinx-pl.002 added

comment:1 by Kriz1, 7 years ago

Summary: ScummVM crashing during projector cutsceneSFINX: ScummVM crashing during projector cutscene

comment:2 by criezy, 7 years ago

I can confirm the crash with the attached savegame.
I could not reproduce the crash with savegames I had for the English version however. So I replayed both the Polish and English version from the start with the exact same steps and I can confirm that the Polish version does crash shortly after the start of the cutscene while the English version does not.

comment:3 by criezy, 7 years ago

Some more investigation: the crash happens on line 436 in engines/cge2/vga13h.cpp
With the Polish version when it crashes we have maxnow and shpcnt both equal to 23.
With the English version for the same file we have maxnow equal to 23 but shpcnt is equal to 24.

After extracting the data I can indeed confirm that the number of phases differs between the polish and english version for the file 04tal200.spr

Polish version:

[phase]
dummy
04tal202
04tal203
04tal204
04tal205
04tal206
04tal207
04tal208
04tal209
04tal210
04tal211
04tal212
04tal213
04tal214
04tal215
04tal216
04tal217
04tal218
04tal219
04tal220
04tal221
04tal222
04tal223

English version:

[phase]
dummy
.Strangerke - the next line has been renamed from 04tal201 to 04tal202, because the file is missing in the original game data
04tal202
04tal202
04tal203
04tal204
04tal205
04tal206
04tal207
04tal208
04tal209
04tal210
04tal211
04tal212
04tal213
04tal214
04tal215
04tal216
04tal217
04tal218
04tal219
04tal220
04tal221
04tal222
04tal223

As you can see there is also an interesting comment from Strangerke in the English version indicating that the file 04tal201}} does not exist (and indeed it doesn't), but this was handled differently between the Polish and English version. In the English version it was renamed to {{{04tal202, which means we have two 04tal202 entries. For the Polish version is was removed (or was it ever there?) so we have one less phase.

It seems to me the issue is with the Polish data file, so we may want to modify it in the same way as the English one and repackage it to provide a v1.1 Polish version.

comment:4 by criezy, 7 years ago

As noticed by bonki there is actually a workaround in the Bitmap constructor for the missing 04tal201 to use 04tal202 instead, so it looks like we didn't actually need to removed or renamed it in the 04tal200.spr file.

And in addition to the issue in the [phase] section for the Polish file, we might want to also modify the [seq] section to remove the double execution of sequence 2, as done in the English version by Strangerke.

comment:5 by criezy, 7 years ago

Owner: set to criezy
Resolution: fixed
Status: newclosed

After checking the original Polish package, I did confirm that it contained 24 phase entries, as it has a 04tal201 entry before the 04tal202. So the package we provide was modified, and apparently nobody checked that it works :-(

I have now uploaded a new v1.1 Polish package for Sfinx, to our server, updated the link to this new package on http://www.scummvm.org/games/#sfinx and added the detection entry for it in ScummVM.

Note that existing savegames will not work as the bitmaps are saved (with the wrong information) in the savegames, so you will have to start again from the start. Fortunately it is not far from the start.

Thank you for reporting the issue.

comment:6 by bonki, 7 years ago

Note that existing savegames will not work as the bitmaps are saved (with the wrong information) in the savegames, so you will have to start again from the start. Fortunately it is not far from the start.

Should we mention this in the ChangeLog?

Note: See TracTickets for help on using tickets.