Opened 19 years ago
Closed 19 years ago
Last modified 19 years ago
#1636 closed defect (fixed)
MIVGA: Mug o' grog
|Reported by:||SF/chrilith||Owned by:||eriktorbjorn|
|Cc:||Game:||Monkey Island 1|
Someone report me that there is a problem in Monkey Island VGA after using the mug with the barrel in the scummbar.
Mug object names :
- mug o' grog - melting mug - mug near death - pewter wad
then crash with error : ERROR: (35: 65: 0xCE): Invalid actor 117 in o5_putActorInRoom
Seems to occured only where you are out of the scummbar (mug simply disapear if you stay in).
Tested on PalmOS with snapshot 2004-04-20 and 2004- 05-25 and Windows snapshot 2004-05-23
Ticket imported from: #960674. Ticket imported from: bugs/1636.
Change History (10)
by , 19 years ago
comment:1 by , 19 years ago
comment:2 by , 19 years ago
Fingolfin, what's your take on this? It appears to be one of the regressions you warned might happen when you changed the object naming code, and obviously we'll have to make sure the script pointer is correctly updated like it used to be.
However, I can't even see why we call getOBCDFromObject() to begin with. It doesn't appear to actually do anything other than returning or, in this case, failing to return a pointer, and as far as I can see we don't even use it afterwards. Could that part of the code simply be removed, or am I missing something obvious?
comment:3 by , 19 years ago
by , 19 years ago
Patch against a May 27 CVS snapshot
comment:4 by , 19 years ago
Just to clarify, this is what the patch would look like.
comment:5 by , 19 years ago
|Summary:||Mug o' grog → MIVGA: Mug o' grog|
comment:6 by , 19 years ago
Looks fine to me. Feel free and apply it, erik (and then take over & close this bug report :-)
comment:7 by , 19 years ago
comment:8 by , 19 years ago
|Status:||new → closed|
Hmm... I can understand part of what's happening. Here's the end of script-65:
[00A7] (D4) setObjectName(Local,"pewter wad") [00B5] (2E) delay(300) [00B9] (A9) setOwnerOf(Local,0) [00BD] (A9) setOwnerOf(Local,15) [00C1] (D4) setObjectName(Local,"mug") [00C8] (0C) unlockScript(66) [00CB] (A0) stopObjectCode() END
However, here's the end of the debug output:
getResourceAddress(Script,65) == 01653244 Script 65, offset 0xc8: [D4] o5_setObjectName() readvar(16384) Can't find OBCD to rename object 375 Script 65, offset 0xcb: [6D] o5_putActorInRoom() readvar(103) (41:65:0xCE): Invalid actor 117 in o5_putActorInRoom
There shouldn't be any putActorInRoom opcode after setObjectName. However, since getOBCDFromObject() failed we won't ever reach loadPtrToResource(), so the script pointer won't be properly updated.
Notice how putActorInRoom is opcode 0x6D. That's not an opcode in this case - it's the "m" in "mug". Ouch!