[ scummvm-Patches-993803 ] Possible fix for COMI hanging while looking through gunport

SourceForge.net noreply at sourceforge.net
Mon Jul 19 16:29:16 CEST 2004


Patches item #993803, was opened at 2004-07-19 16:29
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=993803&group_id=37116

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Torbjörn Andersson (eriktorbjorn)
Assigned to: Nobody/Anonymous (nobody)
Summary: Possible fix for COMI hanging while looking through gunport

Initial Comment:
This bug happens both with 0.6.1 and the CVS version.
The patch is against the CVS version.

If I spend too much time looking out through the
gunport in LeChuck's ship, ScummVM will hang with 100%
CPU usage. The music continues to play, but the
animations - even the screen updates - stop.

As far as I can tell, it's the room-11-2016 script
that's hanging, waiting for a sound to stop. This is
what the relevant part of it looks like:

[0396] (65)   if (isSoundRunning(localvar0)) {
[03A2] (B2)     soundKludge([12,localvar0,1792,127])
[03BC] (B2)     soundKludge([12,localvar0,1536,localvar3])
[03D6] (66)     jump 397
[03DB] (**)   }

I don't understand the purpose of this script yet - it
looks stupid to me - but it seems that for as long as a
certain sound is running, it will keep setting the
panning and volume for it.

I think what may be happening is that as long as this
loop is running, flushTracks() is never called, and
Digital iMUSE depends on that function to mark the
sound as stopped. So the loop never ends.

What the patch does is to make getSoundStatus() check
not just track->used but also track->readyToRemove,
since that's set by the Digital iMUSE callback,
regardless of whether flushTracks() is called or not.

It can take some time for the hang to happen, but
usually not that long. In fact, I first thought it had
something to do with Murray, because the hang would
sometimes happen before I had finished talking to him.
(The first two times I saw it, it even happened on the
same line of speech!) Thus, I cannot be sure that my
patch really does fix the problem, but I did leave the
scene running while vacuuming my apartment, and it
still wasn't hanging when I returned.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=993803&group_id=37116




More information about the Scummvm-tracker mailing list