-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Pipewire audio output driver does not cleanly destroy when FluidSynth exits #1305
Comments
I found some time to look into this. However, I must admit that I never got pipewire working on my system and this time wasn't any different ( Unfortunately, I don't see what causes this error either. The audio driver is created here: Line 1135 in eabae3b
and destroyed here: Line 1198 in eabae3b
Both is done by the main-thread. I'd welcome a PR for this. |
I can reproduce this on my machine with pipewire 1.0.3 and FluidSynth 2.3.4. No errors when playing a MIDI file and exiting via |
When I add code to stop the thread loop before destroying the stream, I don't see any errors from pipewire anymore. |
Actually, the correct fix seems to be to grab the thread lock before destroying the stream. The error message even hints at that: "check thread and locking". I've updated the PR accordingly. |
FluidSynth version
Describe the bug
Various PipeWire functions related to destroying the context produce numerous errors when FluidSynth exits or otherwise wants to destroy the audio context.
Occasionally, this can result in a segfault or abort.
Expected behavior
The PipeWire context should be cleanly removed, and not produce these error messages.
Steps to reproduce
Launch FluidSynth in a interactable shell with the PipeWire audio driver
$ fluidsynth -a pipewire
Type quit into the shell
Additional context
The Mumble project ran into similiar pitfalls; more information here: mumble-voip/mumble#6103
https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3150#note_1862593
The text was updated successfully, but these errors were encountered: