! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Crash when multiple ALSA outputs are defined
Status:
RESOLVED: FIXED
Product:
Xfce4-mpc-plugin
Component:
General

Comments

Description libalpm 2013-12-15 20:39:49 CET
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
Comment 1 libalpm 2013-12-15 20:42:02 CET
Versions: they're the latest for the applet (0.44-2), xfce4-panel (4.10.1), and mpd (0.18.5)
Comment 2 Landry Breuil editbugs 2013-12-16 20:36:19 CET
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.
Comment 3 libalpm 2013-12-19 16:25:52 CET
Created attachment 5270 
debug log
Comment 4 libalpm 2013-12-19 16:26:26 CET
I'm using Debian (Sid). I experience the same issue with a locally-compiled plugin. I've attached a debug log.
Comment 5 Landry Breuil editbugs 2013-12-21 08:53:31 CET
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 ?
Comment 6 Landry Breuil editbugs 2015-01-25 11:44:51 CET
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.
Comment 7 Landry Breuil editbugs 2018-12-25 10:19:27 CET
This was probably fixed by https://git.xfce.org/panel-plugins/xfce4-mpc-plugin/commit/?id=06b89a03504817776563b8cdb5db4420d9c2bae5 - please reopen if this isnt the case.

Bug #10549

Reported by:
libalpm
Reported on: 2013-12-15
Last modified on: 2018-12-25

People

Assignee:
Landry Breuil
CC List:
0 users

Version

Version:
unspecified

Attachments

xfce4-panel backtrace (6.87 KB, text/plain)
2013-12-15 20:39 CET , libalpm
no flags
debug log (12.21 KB, text/plain)
2013-12-19 16:25 CET , libalpm
no flags

Additional information