Opened 14 years ago

Closed 13 years ago

#3315 closed defect (fixed)

DOTT: loading game leads to assertion

Reported by: sev- Owned by: fingolfin
Priority: high Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Day of the Tentacle


SVN version, FreeBSD

1. Run some SCUMM game. I tried Indy4 and DOTT. 2. Save at any point 3. Quit ScummVM 4. Try to load the savegame from the command line with '-x' switch

you get

Assertion failed: ((paused && _pauseLevel >= 0) || (!paused && _pauseLevel)), function pause, file sound/mixer.cpp, line 80.

Ticket imported from: #1752226. Ticket imported from: bugs/3315.

Change History (6)

comment:1 by fingolfin, 14 years ago

Owner: set to fingolfin

comment:2 by fingolfin, 14 years ago

Hm, I can't reproduce this on Mac OS X. Odd. Neither with old nor new savegames, in Indy4 and DOTT. Can you name some specific game versions (e.g. with MD5) where this occurred, and maybe attach a savegame?

Maybe some kind of race condition? On a cursory glance (just before leaving for work :) I see nothing that looks "wrong".

comment:3 by eriktorbjorn, 14 years ago

I can reproduce it on my Linux box. I added a breakpoint and got this backtrace:

#0 Audio::Channel::pause (this=0x8212568, paused=false) at sound/mixer.cpp:80 #1 0x0812bffe in Audio::Mixer::pauseAll (this=0x82358e0, paused=false) at sound/mixer.cpp:297 #2 0xb750a00e in Scumm::Sound::pauseSounds (this=0x8212100, pause=false) at engines/scumm/sound.cpp:884 #3 0xb74d9905 in Scumm::ScummEngine::loadState (this=0x823e0f0, slot=31, compat=false) at engines/scumm/saveload.cpp:377 #4 0xb74fa984 in Scumm::ScummEngine::go (this=0x823e0f0) at engines/scumm/scumm.cpp:1727 #5 0x08094a2b in runGame (plugin=0x81cdc30, system=@0x81a0008, edebuglevels=@0xbfd450e8) at base/main.cpp:217 #6 0x08095203 in scummvm_main (argc=4, argv=0xbfd454d4) at base/main.cpp:318 #7 0x08093b85 in main (argc=4, argv=0xbfd454d4) at backends/platform/sdl/sdl.cpp:123

(At this point, _pauseLevel is 0.)

The problem seems to be that while the loadState() function will call both _sound->pauseAll(true) and, later, _sound->pauseAll(false), on the first call _vm->_roomResource() is still 0. That means the pauseSounds() function never reaches _mixer->pauseAll().

comment:4 by fingolfin, 14 years ago

OK, so the real puzzle here is: Why exactly is that check for _roomResource in there? It was added by Ender in rev 6441, but the commit message is rather mysterious: "Fix old-game resource error dialog". ho-hum.

See also: <> <>

comment:5 by fingolfin, 13 years ago

Resolution: fixed
Status: newclosed

comment:6 by fingolfin, 13 years ago

Since i disabled the assertion some time ago, this bug should be fixed (if not, please reopen).

Note: See TracTickets for help on using tickets.