[Scummvm-cvs-logs] scummvm master -> 21c057ce7545d9fbb1cd958d22cbce5716384882

digitall dgturner at iee.org
Sat Aug 11 21:11:14 CEST 2012


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
21c057ce75 CINE: Fix lockup in Scene 5 when "operate Girl" underwater.


Commit: 21c057ce7545d9fbb1cd958d22cbce5716384882
    https://github.com/scummvm/scummvm/commit/21c057ce7545d9fbb1cd958d22cbce5716384882
Author: D G Turner (digitall at scummvm.org)
Date: 2012-08-11T12:08:03-07:00

Commit Message:
CINE: Fix lockup in Scene 5 when "operate Girl" underwater.

Traced with gdb to sound.cpp:792 i.e. _fadeOutTimer infinite loop.

This bug was introduced by the addition of the MT-32 output driver for
Future Wars and associated mutex changes.
The _fadeOutTimer increment is done by the timer callback occuring
during the load method call, but this was excluded by the mutex.

Fixed by moving the mutex in the load method.

Changed paths:
    engines/cine/sound.cpp



diff --git a/engines/cine/sound.cpp b/engines/cine/sound.cpp
index b2e992e..52e1cda 100644
--- a/engines/cine/sound.cpp
+++ b/engines/cine/sound.cpp
@@ -785,7 +785,6 @@ PCSoundFxPlayer::~PCSoundFxPlayer() {
 
 bool PCSoundFxPlayer::load(const char *song) {
 	debug(9, "PCSoundFxPlayer::load('%s')", song);
-	Common::StackLock lock(_mutex);
 
 	/* stop (w/ fade out) the previous song */
 	while (_fadeOutCounter != 0 && _fadeOutCounter < 100) {
@@ -793,6 +792,8 @@ bool PCSoundFxPlayer::load(const char *song) {
 	}
 	_fadeOutCounter = 0;
 
+	Common::StackLock lock(_mutex);
+
 	stop();
 
 	_sfxData = readBundleSoundFile(song);






More information about the Scummvm-git-logs mailing list