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)

SKY-VM.013 (13.7 KB ) - added by digitall 14 years ago.
Savegame for Replication taken from Debian Bug
SKY.001 (52.5 KB ) - added by digitall 14 years ago.
Original Interpreter Savegame for Replication
SKY.SAV (1005 bytes ) - added by digitall 14 years ago.
Original Interpreter Save Index for Replication

Download all attachments as: .zip

Change History (13)

comment:1 by eriktorbjorn, 14 years ago

Summary: giving glasses to travel agent 4 times in a row leads to invBASS: Invalid Mode when giving shades to travel agent

comment:2 by eriktorbjorn, 14 years ago

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

by digitall, 14 years ago

Attachment: SKY-VM.013 added

Savegame for Replication taken from Debian Bug

comment:3 by digitall, 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 digitall, 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 digitall, 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 digitall, 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...

by digitall, 14 years ago

Attachment: SKY.001 added

Original Interpreter Savegame for Replication

by digitall, 14 years ago

Attachment: SKY.SAV added

Original Interpreter Save Index for Replication

comment:7 by sev-, 14 years ago

Priority: normalhigh

comment:8 by sev-, 14 years ago

This bug is nice to get fixed before the release. Raising priority for keeping the track.

comment:9 by joostp, 13 years ago

Keywords: script added
Owner: set to joostp
Resolution: fixed
Status: newclosed

comment:10 by joostp, 13 years ago

Should be fixed in 2eb624b

Note: See TracTickets for help on using tickets.