[ scummvm-Patches-1839861 ] Possible workaround for bugs related to cloneToFadeOutTrack

SourceForge.net noreply at sourceforge.net
Tue Nov 27 23:57:48 CET 2007


Patches item #1839861, was opened at 2007-11-28 00:57
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=1839861&group_id=37116

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Filippos Karapetis (thebluegr)
Assigned to: Nobody/Anonymous (nobody)
Summary: Possible workaround for bugs related to cloneToFadeOutTrack

Initial Comment:
Hello

I don't really know how iMUSE digital works, but I think I've found a possible workaround which prevents ScummVM from crashing when an issue with cloneToFadeOutTrack occurs in MI3. I've tried this with the savegames from bug reports #1527274 and #1763227, and the issue still occurs, but ScummVM doesn't crash anymore.

As detailed in bug report #1635361, this issue occured for me when a track was being unloaded and another one was being loaded. Specifically, the problem started at line 387 of scumm/dimuse.cpp, and then continued at line 418 of scumm/dimuse.cpp, which in turn kept being called - it seems that line 418 is the place it's failing when this occurs.

The workaround is to place the following lines right after line 316 in scumm/dimuse_track.cpp:

if (track->toBeRemoved) {
warning("IMuseDigital::cloneToFadeOutTrack: Tried to play a track to be removed");
return NULL;
}

Normally, this shouldn't occur, but as mentioned, it seems there is a racing issue occuring sometimes when a track is being unloaded, where cloneToFadeOutTrack shouldn't be called at that point.

As I said this is a workaround, it doesn't address the actual issue, but it prevents ScummVM from crashing when it occurs (at least for me). I don't know if the game audio stops playing when ScummVM reaches such a state (it shouldn't though - at least it didn't for me) so I'm submitting this as a patch in case someone finds it useful.

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

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




More information about the Scummvm-tracker mailing list