Opened 14 years ago
Closed 13 years ago
#5567 closed defect (fixed)
BASS: Invalid Mode when giving shades to travel agent
Reported by: | SF/jmmdebian | Owned by: | joostp |
---|---|---|---|
Priority: | high | Component: | Engine: Sky |
Version: | Keywords: | script | |
Cc: | Game: | Beneath a Steel Sky |
Description
Please see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=462595 for a savegame and a complete step of instructions leading to the invalid mode.
Cheers, Moritz
Ticket imported from: #3149412. Ticket imported from: bugs/5567.
Attachments (3)
Change History (13)
comment:1 by , 14 years ago
Summary: | giving glasses to travel agent 4 times in a row leads to inv → BASS: Invalid Mode when giving shades to travel agent |
---|
comment:2 by , 14 years ago
comment:3 by , 14 years ago
Information for replication taken from Debian Bug : Version: 0.0372-3
Giving the dark glasses to the man in the travel agency 4 times in a row leads to an invalid mode, turning on the debugger and exiting the debugger ends the program. Here are steps to reproduce this:
0) Backup your own .scummvm directory and put the saved-state files I am (SKY-VM.SAV and SKY-VM.013) attaching into .scummvm directory. 1) start game with command `sky` 2) restore following game with F5: 14: restarted, almost with ticket 3) Give dark glasses to the man (travel agent). Nothing will happen. 4) Give glasses to the man 3 more times. 5) Upon the fourth attempt, The debugger starts automatically, saying ... Debugger started, type 'exit' to return to the game. ... ERROR: Invalid Mode (16) ...
comment:4 by , 14 years ago
This bug seems to derive from a corrupt gamestate given by the attached savegame.
In more plain English, it should not be possible IMHO to have the "Dark Glasses" i.e. Shades when you get to the Travel Agent.
You get them from Reich's corpse when leaving the Recycling Centre on the top level, but to get to the Travel Agent which is at the right of the middle level, you need to power the Elevator. To do this, you need to enable the power, which requires the Plastic Explosive from the Factory Storeroom. However, upon leaving the Factory Storeroom, Potts will search you and take a liking to the Dark Glasses which you gladly give him. This is based on Original Interpreter 0.0372CD.
Will check in latest ScummVM HEAD.
comment:5 by , 14 years ago
Ah, I am incorrect. It is possible, though not the most direct game path. You need to not search Reich's Corpse in the Furnace Room until after you have got the Plastic Explosive and thus been searched by Potts. This allows you to retain the Dark Glasses.
comment:6 by , 14 years ago
Replicated in Original Interpreter 0.0372 under DOSBox. Though this takes about 10-12 offers of the Dark Glasses to the Travel Agent to crash the interpreter with : Fatal System Error cs:eip = 2b:be010e Sorry!
Am attaching Original Interpreter savegame for replication. Will look at implementing a workaround...
comment:7 by , 14 years ago
Priority: | normal → high |
---|
comment:8 by , 14 years ago
This bug is nice to get fixed before the release. Raising priority for keeping the track.
comment:9 by , 13 years ago
Keywords: | script added |
---|---|
Owner: | set to |
Resolution: | → fixed |
Status: | new → closed |
I would guess it's a script bug (unless it's a bug in sky.cpt like the Blount animation in bug #1507756, but I have no idea how to tell the difference). At least for me, the travel agent doesn't react at all when I try to give him the shades. For every other object I try, there is a brief exchange where Robert offers him the object and he - usually - declines.
In either case, it hits the Logic::fnTheyStartSub() function, where cpt->mode is increased by 4 and it sets some "magic" values to the Compact object depending on what the mode is. My guess is that it's supposed to set cpt->actionSub and cpt->actionSub_off to tell it to run some script, and when the script is finished it's supposed to decrease cpt->mode again; see Logic::logicScript().
But for the shades, this never happens so the next time cpt->mode gets increased again. Eventually, it reaches an undefined value.
Unfortunately, since I don't know enough about how the sky engine works all I can do is quote The Nightmare Before Christmas and say, "Interesting reaction... but what does it mean?!"