Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#832 closed defect (fixed)

FOA: Invalid actor

Reported by: SF/grandepuffo Owned by: fingolfin
Priority: normal Component: Engine: SCUMM
Version: Keywords: script
Cc: Game: Indiana Jones 4


In room 222 (crashed door, robot and chain), crossing the door causes scummvm to entering console, showing the following log

Loading room 222 loadResource(Script,23) loadResource(Room,94) loadResource(Script,33) loadResource(Script,19) loadResource(Script,45) loadResource(Script,10) loadResource(Script,131) (94:206:0x15FFA): Invalid actor 205 in o5_getActorRoom(94:206:0x15FFA): Invalid actor 205 in o5_getActorRoom!

i'm using today (05/30/2003) cvs snapshot (0.4.2cvs)

Ticket imported from: #746349. Ticket imported from: bugs/832.

Attachments (1)

atlantis.s11 (84.9 KB ) - added by SF/grandepuffo 18 years ago.
Savegame just before the crash

Download all attachments as: .zip

Change History (9)

comment:1 by SF/grandepuffo, 18 years ago

Summary: Invalid actorINDY4: Invalid actor

by SF/grandepuffo, 18 years ago

Attachment: atlantis.s11 added

Savegame just before the crash

comment:2 by fingolfin, 18 years ago

I can't even load this savegame. Was it made with a non-english version of FOA by chance (your name sounds italian :-)

comment:3 by fingolfin, 18 years ago

Owner: set to fingolfin

comment:4 by fingolfin, 18 years ago

Found my own savegame for that place to reproduce the problem.

comment:5 by fingolfin, 18 years ago

This seems to be either a bug in the FOA scripts, or we have a bug in our script engine. Script 206 (in room 94) is run from script 200, like this:

... [0019] (10) Var[442] = getObjectOwner(586) [001E] (2A) startScript(201,[Var[442]]) [0024] (6A) startScript(206,[Var[442]]) ...

The problem is that script 201 gets to run first, and it changes the value of Var[442], so by the time script 206 is invoked, it gets a bad value as param.

So, either: 1) A script bug, and we should just "ignore" it 2) An engine bug, several things possible: 2a) Maybe high vars should be "buffered", kind of like local vars? That seems odd... but then again it seems odd to use a global var like 442 for something which is clearly a local business 2b) Maybe we shouldn't be running script 201/206 immediately but rather just queue them for running. But that seems very unlikely.

Var[442] is really used a lot for temporary results, in many scripts. I wonder why they didn't use a localvar instead. Maybe this was kind of a "TEMP_REGISTER" variable or so.

comment:6 by fingolfin, 18 years ago

Keywords: script added
Owner: fingolfin removed
Summary: INDY4: Invalid actorFOA: Invalid actor

comment:7 by fingolfin, 18 years ago

Put a workaround into CVS; but I don't like this a bit, hm...

comment:8 by fingolfin, 18 years ago

Owner: set to fingolfin
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.