Opened 16 years ago
Closed 16 years ago
#3315 closed defect (fixed)
DOTT: loading game leads to assertion
|Reported by:||sev-||Owned by:||fingolfin|
|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
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 , 16 years ago
comment:2 by , 16 years ago
comment:3 by , 16 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 , 16 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: <http://scummvm.svn.sourceforge.net/viewvc/scummvm/scummvm/trunk/engines/scumm/sound.cpp?view=diff&r1=6440&r2=6441> <http://scummvm.svn.sourceforge.net/viewvc/scummvm/scummvm/trunk/engines/scumm/sound.cpp?revision=6441&view=markup>
comment:5 by , 16 years ago
|Status:||new → closed|
comment:6 by , 16 years ago
Since i disabled the assertion some time ago, this bug should be fixed (if not, please reopen).
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".