Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#4909 closed defect (fixed)

GOB1 : Engine Abort on Lose

Reported by: digitall Owned by: DrMcCoy
Priority: low Component: Engine: Gob
Keywords: script Cc:
Game: Gobliiins

Description

If you lose by depleting the life bar, the engine aborts with the message :
WARNING: unimplemented opcodeGob: 39 [0x27]!
Unknown block type 0 in Inter::callSub()!

My version is gob1-win-gb i.e. Gob1 Windows Multilingual

This may be a regression of the correction for bug #1324814
i.e. patch #1325224 which was very similar for the EGA version,
or something similar.

Valgrind does report a number of invalid memory accesses to
offset etc.

ScummVM 1.2.0svn50104 (Jun 21 2010 06:34:29)
Features compiled in: Vorbis FLAC MP3 ALSA RGB zLib FluidSynth
on Linux x86_32

Ticket imported from: #3018918. Ticket imported from: bugs/4909.

Attachments (1)

output-log.zip (5.7 KB ) - added by digitall 9 years ago.
Output Log running with Valgrind and -d10 --debugflag=GoblinOpcodes

Download all attachments as: .zip

Change History (10)

comment:1 by digitall, 9 years ago

I have successfully replicated this with r48000, so this is not a recent regression.
This has also been replicated by Strangerke with both UK and FR game versions.

by digitall, 9 years ago

Attachment: output-log.zip added

Output Log running with Valgrind and -d10 --debugflag=GoblinOpcodes

comment:2 by Strangerke, 9 years ago

I've added the initialization of paramCount in gob1. This fixes the valgrind error and the engine doesn't abort any longer (r50209). On the other hand, after you enter a level code to "restore" a game, the game is in a wrong state and is not playable.

Code used to test the behavior : UOTODDV

comment:3 by digitall, 9 years ago

I doubt the UOTODDV issue was linked to this change (except that before this you are unable to reload so would not have seen this).

Full replication details :
Load UOTODDV (Screen with Apple Tree and Diamond Mine, holding Picaxe, 1 life point left)
Use the Technical Goblin's Picaxe on the second apple from right.
You lose the game, so reload UOTODDV.
The game is now in a stuck state with no goblin movement or switching possible, though the engine is not stuck.

This is not associated with any valgrind issues, so it is likely that the issue is a bug in the engine scripts.

This is likely present in the original interepeter, but I have been unable to get this to run, so can not confirm this.
Will continue to investigate and try to trace down the root cause of this.

comment:4 by DrMcCoy, 9 years ago

Yes, this seems to be a script bug, it happens in in the original interpreter too (which you have to start with the command line argument "290869", otherwise it immediately exists).

Probably not much I can do about it, but will try to trace the scripts when I find the time.

comment:5 by DrMcCoy, 9 years ago

Keywords: script added
Priority: normallow

comment:6 by digitall, 9 years ago

Traced problem to Script 11289 in AVT00.TOT.
var32_1140 ( 285) and var32_236 (59) need to be reset to allow Goblin Movement.
Have added workaround to do this i.e. r50480, and tested for that screen.

comment:7 by fingolfin, 9 years ago

So, can this item be closed now?

comment:8 by digitall, 9 years ago

Workaround seems good and doesn't break non Win Gob1 versions. Closing...

comment:9 by digitall, 9 years ago

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