Mataniko / scummvm

ScummVM main repository
http://www.scummvm.org/
GNU General Public License v3.0
0 stars 0 forks source link

MI1VGA: freeing Otis #370

Closed Mataniko closed 22 years ago

Mataniko commented 22 years ago

Issue migrated from trac ticket # 370

component: Engine: SCUMM | priority: normal

2002-07-28 03:35:45: SF/inguin created the issue


I just tried to free Otis from his prison cell by carrying a mug 
of grog from the bar to the prison. Unfortunately I waited a 
little too long before filling the grog from the melting mug 
into a fresh one -- I tried it at the very moment when the 
mug dissolved completely. Suddenly ScummVM crashed, 
dropping this message:

Error\(34:65:0xD2\): Can't set name of object 375\!

ScummVM did automatically save the game before crashing 
\(see the attached file\), but unfortunately I can't prevent it 
from crashing if I load that savegame. I'm gonna start all 
over to see if it's reproducable.
Ticket imported from: !#587553. Ticket imported from: bugs/370.
Mataniko commented 22 years ago

2002-07-28 03:35:45: SF/inguin uploaded file monkeyvga.s00 (33.7 KiB)

Savegame - seconds before crash

Mataniko commented 22 years ago

2002-07-28 14:24:46: SF/inguin commented



OK, I tried it and it is reproducible: Just fill a mug with grog, wait 
till it dissolves completely and ScummVM will crash. This time I 
saved the game before filling the mug.
Mataniko commented 22 years ago

2002-07-28 14:24:46: SF/inguin uploaded file monkeyvga.s07 (34.1 KiB)

Savegame - before filling the mug

Mataniko commented 22 years ago

2002-07-28 19:40:57: SF/madm00se commented



This is a consistent crash for me. But it doesn't crash if
Guybrush is standing in the scumm bar when the mug disolves.

Here is the relevant part of script 65, which causes this crash:

...
\[009C\] \(2E\) Delay\(300\);
\[00A0\] \(DD\) SetClass\(Local\[0\],\[12\]\)
\[00A7\] \(D4\) SetObjectName\(Local\[0\],"pewter wad"\)
\[00B5\] \(2E\) Delay\(300\);
\[00B9\] \(A9\) SetOwnerOf\(Local\[0\],0\)
\[00BD\] \(A9\) SetOwnerOf\(Local\[0\],15\)
\[00C1\] \(D4\) SetObjectName\(Local\[0\],"mug"\)
\[00C8\] \(0C\) unlockScript\(66\)
\[00CB\] \(A0\) StopScript\(\)

The last call to SetObjectName is what fails with an
Error\(41:65:0xCA\): Can't set name of object 374\!
when the mug has been destroyed and is being returned to the
scumm bar.

This is most likely due to the calls SetOwnerOf but I have
no idea how object ownership works.
Mataniko commented 22 years ago

2002-07-30 16:59:44: SF/ender commented



Anyone know if this bug is reproducable using the original interpreter? :\) 
Mataniko commented 22 years ago

2002-07-30 17:56:50: SF/inguin commented



I just tried the original .EXE in DosEmu: The game does not 
crash.
Just to see if I get that right: The script removes the molten 
mug from the inventory and then tries to rename it? If it is so, 
then the original interpreter obviously just ignores the request 
while ScummVM errors out.
Mataniko commented 22 years ago

2002-08-01 11:28:39: SF/ender changed owner from * to SF/ender*

Mataniko commented 22 years ago

2002-08-01 11:28:39: SF/ender changed status from new to closed

Mataniko commented 22 years ago

2002-08-01 11:28:39: SF/ender commented



This should work now.