wwmm / easyeffects

Limiter, compressor, convolver, equalizer and auto volume and many other plugins for PipeWire applications
GNU General Public License v3.0
6.65k stars 270 forks source link

EasyEffects doesn't close the process #3531

Open zaps166 opened 21 hours ago

zaps166 commented 21 hours ago

EasyEffects Version

7.2.1

What package are you using?

Arch (easyeffects)

Distribution

Manjaro

Describe the bug

Closing EasyEffects window (Shutdown on Window Closing option is enabled) stops audio processing and closes the window, but easyeffects process keeps running and eats RAM. Happens often, but not always (at least one effect must be enabled).

Expected Behavior

easyeffects process closes.

Debug Log

On debugger I can notice hang/SIGSEGV/SIGABRT on close. Here is SIGABRT with Equalizer effect as example.

Debug Log (easyeffects-debug-7.2.1 package)
``` #0 0x00007ffff5ca53f4 in ??? () at /usr/lib/libc.so.6 #1 0x00007ffff5c4c120 in raise () at /usr/lib/libc.so.6 #2 0x00007ffff5c334c3 in abort () at /usr/lib/libc.so.6 #3 0x00007ffff5c34354 in ??? () at /usr/lib/libc.so.6 #4 0x00007ffff5c43fa6 in ??? () at /usr/lib/libc.so.6 #5 0x00007ffff5ca69da in ??? () at /usr/lib/libc.so.6 #6 0x00007ffff7f31d08 in ??? () at /usr/lib/libpipewire-0.3.so.0 #7 0x00007ffff7f279c5 in pw_thread_loop_lock () at /usr/lib/libpipewire-0.3.so.0 #8 0x0000555555840bd5 in PipeManager::lock (this=) at ../easyeffects-7.2.1/src/pipe_manager.cpp:1927 #9 PluginBase::~PluginBase (this=0x555555bb4400, this=) at ../easyeffects-7.2.1/src/plugin_base.cpp:333 #10 0x00005555555e4fda in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x555555bb43f0) at /usr/include/c++/14.2.1/bits/shared_ptr_base.h:346 #11 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x555555bb43f0) at /usr/include/c++/14.2.1/bits/shared_ptr_base.h:317 #12 0x00005555557557f9 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x555557f16858, this=) at /usr/include/c++/14.2.1/bits/shared_ptr_base.h:1069 #13 std::__shared_ptr::~__shared_ptr (this=0x555557f16850, this=) at /usr/include/c++/14.2.1/bits/shared_ptr_base.h:1525 #14 std::shared_ptr::~shared_ptr (this=0x555557f16850, this=) at /usr/include/c++/14.2.1/bits/shared_ptr.h:175 #15 ui::equalizer_box::Data::~Data (this=0x555557f16840, this=) at ../easyeffects-7.2.1/src/equalizer_ui.cpp:85 #16 ui::equalizer_box::finalize (object=0x555557e471e0) at ../easyeffects-7.2.1/src/equalizer_ui.cpp:1123 #17 0x00007ffff7cc11e5 in g_object_unref () at /usr/lib/libgobject-2.0.so.0 #18 0x000055555587e2d2 in std::function::operator() (this=0x7ffe884d1290) at /usr/include/c++/14.2.1/bits/std_function.h:591 #19 operator() (__closure=0x0, d=0x7ffe884d1270) at ../easyeffects-7.2.1/src/util.cpp:322 #20 _FUN () at ../easyeffects-7.2.1/src/util.cpp:327 #21 0x00007ffff7dc8559 in ??? () at /usr/lib/libglib-2.0.so.0 #22 0x00007ffff7e2b157 in ??? () at /usr/lib/libglib-2.0.so.0 #23 0x00007ffff7dc7a55 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0 #24 0x00007ffff6fd8d6b in g_application_run () at /usr/lib/libgio-2.0.so.0 #25 0x00005555555db660 in main (argc=1, argv=0x7fffffffdeb8) at ../easyeffects-7.2.1/src/easyeffects.cpp:67 ```

Additional Information

EasyEffects and PipeWire from Arch/Manjaro official repositories. Issue happens for longer while.

wwmm commented 20 hours ago

Happens often, but not always (at least one effect must be enabled).

I am doing some tests and it does not happen when no audio is passing through EasyEffects. Only after something is playing audio to it that the issue happens. Really odd...

Using the Quit entry in our menus works fine. What is not entirely surprising considering that this and ctrl+Q make sure that app quits. Something unexpected is happening when just closing the window.

wwmm commented 20 hours ago

0x00007ffff7f279c5 in pw_thread_loop_lock () at /usr/lib/libpipewire-0.3.so.0

Hum... This is a sign that somewhere a lock done to the pipewire's loop could not be followed by the corresponding unlock call.

zaps166 commented 11 hours ago

Thanks for investigation! Indeed the Ctrl+Q works correctly!