[Scummvm-tracker] [ScummVM :: Bugs] #13953: TINSEL: DW2 - random setMusicSceneDetails() mutex lock-ups when changing scenes
ScummVM :: Bugs
trac at scummvm.org
Tue Jul 4 22:20:19 UTC 2023
#13953: TINSEL: DW2 - random setMusicSceneDetails() mutex lock-ups when changing
scenes
--------------------------+-----------------------------
Reporter: dwatteau | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: Tinsel
Version: | Resolution:
Keywords: mutex,lock-up | Game: Discworld II
--------------------------+-----------------------------
Comment (by PushmePullyu):
Interesting find, thanks for the info! This looks like a deadlock due to a
locking order problem with "Audio::MixerImpl::_mutex" and
"Tinsel::PCMMusicPlayer::_mutex". The main thread seems to lock them in
reverse order compared to the audio thread.
I can reproduce the bug on Linux x86_64 by adding a delayMillis() call in
setMusicSceneDetails() (see https://github.com/PushmePullyu/scummvm/tree
/tinsel-dw2-repro-music-deadlock, which also includes a commented out
potential fix). Starting a new game or changing scenes with this
immediately deadlocks.
I will open a PR once I have done some more testing.
--
Ticket URL: <https://bugs.scummvm.org/ticket/13953#comment:3>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list