Closed pgervais closed 9 months ago
Hi, can you check with this appimage if this still happens? Now it should show an error dialog complaining about pipewire instead: https://github.com/ossia/score/releases/tag/continuous
I compiled Ossia score at 8a2f759284bd5c0bac447227657d51ddb92e2f13, which matches the appimage you pointed. I confirm that the crash is gone, and replace by a popup saying "The desired audio settings could not be applied. Please change them."
From my perspective that's a much better behavior. Thank you!
Reproduction
The crash happens when the pipewire client binaries and conf files are missing. It's the
pipewire-bin
package on Debian Bookworm (file list). No crash happens when these binaries are present but not the daemons (pipewire, wireplumber).Release mode:
Debug mode (with or without the vanilla jack daemon running):
In both cases the crash happens in pw_filter_add_port() from /lib/x86_64-linux-gnu/libpipewire-0.3.so. This library is part of the
libpipewire-0.3-dev
package on Bookworm, which is the only one necessary to compile Ossia Score.System: Linux Debian Bookworm Ossia compiled from source at abfeb0c3cb556e25c7945362b2da7f0795816e13
Debug information
Output in the console in debug compilation mode:
Full backtrace, obtained from gdb:
Analysis
Looking at Ossia's source code where the crash happens (https://github.com/ossia/libossia/blob/590c9af897202c993d0da06f93a86e0151f2c03e/src/ossia/audio/pipewire_protocol.hpp#L562), gdb says that
this->filter
is NULL, which means that pw.filter_new_simple() above returns NULL. Gdb says this function's parameters are all non-null.From pipewire's source code (https://github.com/PipeWire/pipewire/blob/8e6d070148fc018df78a30ec410ed35340b9f53b/src/pipewire/filter.c#L1319) it looks like pw.filter_new_simple` only returns NULL on errors. I don't know the pipewire client code at all, but I have a hunch this is where the missing binaries/conf are involved.
It's probably a good idea to test whether
this->filter
is NULL inpipewire_protocol.hpp
and abort more gracefully instead of getting into a segfault, though it might be too late for error handling at this point.Hope this helps, happy to dig deeper if you cannot reproduce the issue locally.