Created attachment 5264 xfce4-panel backtrace Hi. I have two ALSA outputs in my MPD server, and xfce4-mpc-plugin crashes by just moving the mouse over it, and xfce4-panel gives the attached backtrace. If I just set an ALSA output, the applet it works fine. mpc shows both outputs, and I can enable/disable them perfectly, same with ncmpcpp. My outputs at my mpd.conf: audio_output { type "alsa" name "ALSA-Analog" device "analog" } audio_output { type "alsa" name "ALSA-Spdif" device "spdif" } mpc working with both outputs: ~ > mpc outputs Output 1 (ALSA-Analog) is enabled Output 2 (ALSA-Spdif) is enabled Output 3 (httpd) is disabled Output 4 (fifo) is disabled
Versions: they're the latest for the applet (0.44-2), xfce4-panel (4.10.1), and mpd (0.18.5)
That's not really a usable backtrace... what distro are you using ? do you know if it's built against libmpd or uses the internal reduced simple-libmpd implementation ? I'll need the debug log of the plugin to be able to understand the issue, so please try to rebuild it with --enable-debug=full and check the X log for the debug messages from the plugin.
Created attachment 5270 debug log
I'm using Debian (Sid). I experience the same issue with a locally-compiled plugin. I've attached a debug log.
Great, thanks for the log. can you reproduce the issue if you build the plugin using --with-libmpd (having installed the libmpd headers/lib of course) ? Just to make sure the crash happen in my simple-libmpd.c code, maybe in one of the strfreev() around http://git.xfce.org/panel-plugins/xfce4-mpc-plugin/tree/panel-plugin/simple-libmpd.c#n460. I'll try to reproduce it, because i dont remember trying with more than two or three outputs. Does it happen too if you only have two outputs ? Can you attach gdb to the running plugin (ie gdb -p $(pgrep -fl mpc-plugin) /path/to/panel/wrapper/binary), put a breakpoint on parse_outputs_answer() & run step-by-step to pinpoint the exact crash ?
Looking again at this bug, i have an idea.. can you change http://git.xfce.org/panel-plugins/xfce4-mpc-plugin/tree/panel-plugin/simple-libmpd.c#n454 to be only g_strchug(tokens[1]) without the assignation to tokens[1] ? ie -tokens[1] = g_strchug(tokens[1]); +g_strchug(tokens[1]); and check if the crash still happens.
This was probably fixed by https://git.xfce.org/panel-plugins/xfce4-mpc-plugin/commit/?id=06b89a03504817776563b8cdb5db4420d9c2bae5 - please reopen if this isnt the case.