Opened 21 years ago

Closed 21 years ago

#1584 closed defect (fixed)

MI2: Recent instability

Reported by: eriktorbjorn Owned by: fingolfin
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Monkey Island 2

Description

It seems to me that with the latest CVS snapshot, MI2 (english PC version) is a lot less stable than it used to be. Perhaps other games as well, but this is the one I've tried.

I haven't found any exactly repeatable way of triggering crashes. Once it crashed right after examining an object, but the only crash I've caught in a debugger happened when leaving a room. In that case, it crashed on a free() and the backtrace looked like this:

(gdb) bt #0 0x77f75a59 in _libwinmm_a_iname () #1 0x77f9cb5e in _libwinmm_a_iname () #2 0x77f9e139 in _libwinmm_a_iname () #3 0x77f85010 in _libwinmm_a_iname () #4 0x77f58b37 in _libwinmm_a_iname () #5 0x77c2ab2e in _libwinmm_a_iname () #6 0x0044500d in Scumm::ScummEngine::nukeResource(int, int) (this=0x14c0ba8, type=10, idx=1) at scumm/resource.cpp:1823 #7 0x0046cc2c in Scumm::ScummEngine::initScreens(int, int) (this=0x14c0ba8, b=0, h=200) at scumm/gfx.cpp:177 #8 0x0043c222 in Scumm::ScummEngine_v5::o5_roomOps() (this=0x14c0ba8) at scumm/script_v5.cpp:1848 #9 0x00438b73 in Scumm::ScummEngine_v5::executeOpcode(unsigned char) ( this=0x14c0ba8, i=51) at scumm/script_v5.cpp:369 #10 0x00457ad7 in Scumm::ScummEngine::executeScript() (this=0x14c0ba8) at scumm/script.cpp:425 #11 0x00457561 in Scumm::ScummEngine::runScriptNested(int) (this=0x14c0ba8, script=1) at scumm/script.cpp:317 #12 0x004594f4 in Scumm::ScummEngine::runEntryScript() (this=0x14c0ba8) at scumm/script.cpp:806 #13 0x00421550 in Scumm::ScummEngine::startScene(int, Scumm::Actor*, int) ( this=0x14c0ba8, room=2, a=0x15591d4, objectNr=21) at scumm/scumm.cpp:2090 #14 0x0043b3d2 in Scumm::ScummEngine_v5::o5_loadRoomWithEgo() (this=0x14c0ba8) at scumm/script_v5.cpp:1491 #15 0x00438b73 in Scumm::ScummEngine_v5::executeOpcode(unsigned char) ( this=0x14c0ba8, i=36) at scumm/script_v5.cpp:369 #16 0x00457ad7 in Scumm::ScummEngine::executeScript() (this=0x14c0ba8) at scumm/script.cpp:425 #17 0x00457561 in Scumm::ScummEngine::runScriptNested(int) (this=0x14c0ba8, script=2) at scumm/script.cpp:317 #18 0x00456fe4 in Scumm::ScummEngine::runObjectScript(int, int, bool, bool, int*, int) (this=0x14c0ba8, object=202, entry=11, freezeResistant=false, recursive=false, vars=0x22f5e0, slot=2) at scumm/script.cpp:123 #19 0x0043cf68 in Scumm::ScummEngine_v5::o5_startObject() (this=0x14c0ba8) at scumm/script_v5.cpp:2195 #20 0x00438b73 in Scumm::ScummEngine_v5::executeOpcode(unsigned char) ( this=0x14c0ba8, i=247) at scumm/script_v5.cpp:369 #21 0x00457ad7 in Scumm::ScummEngine::executeScript() (this=0x14c0ba8) at scumm/script.cpp:425 #22 0x00459203 in Scumm::ScummEngine::runAllScripts() (this=0x14c0ba8) at scumm/script.cpp:755 #23 0x0041f458 in Scumm::ScummEngine::scummLoop(int) (this=0x14c0ba8, delta=6) at scumm/scumm.cpp:1479 #24 0x0041e55b in Scumm::ScummEngine::mainRun() (this=0x14c0ba8) at scumm/scumm.cpp:1263 #25 0x0041cb4c in Scumm::ScummEngine::go() (this=0x14c0ba8) at scumm/scumm.cpp:879 #26 0x00407d79 in runGame(GameDetector&, OSystem*) (detector=@0x22ff28, system=0x14b3fb8) at base/main.cpp:263 #27 0x0040844a in main (argc=2, argv=0x3f2578) at base/main.cpp:373

I'll see if I can repeat it at home, where I have better tools to study it.

Ticket imported from: #929818. Ticket imported from: bugs/1584.

Change History (6)

comment:1 by eriktorbjorn, 21 years ago

I couldn't reproduce the crash today, so for now I'm going to assume that it was fixed along with bug #929724. I haven't checked exactly what the fix did, but the impression I got was that graphics weren't clipped properly at the top of the screen. It seems reasonable to me to assume that this may have caused memory corruption.

comment:2 by eriktorbjorn, 21 years ago

Owner: set to eriktorbjorn
Resolution: fixed
Status: newclosed

comment:3 by fingolfin, 21 years ago

As we discussed on another bug report of yours, this may have been caused by the bug in akos.cpp/costume.cpp with regards to negative actor coordinates. Do you still get any troubles?

It might be a good idea if somebody run ScummVM + MI2 through Valgrind anyway...

comment:4 by fingolfin, 21 years ago

Owner: changed from eriktorbjorn to fingolfin
Resolution: fixed
Status: closednew

comment:5 by eriktorbjorn, 21 years ago

As I wrote when I closed this bug report, I couldn't get ScummVM to crash with today's snapshot.

comment:6 by fingolfin, 21 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.