Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 264231

Summary: media-sound/gimmix-0.5.6.1 segfaults or fails opening song info box
Product: Gentoo Linux Reporter: Christopher Head <bugs>
Component: Current packagesAssignee: Christoph Mende (RETIRED) <angelos>
Status: VERIFIED FIXED    
Severity: normal CC: priyankmg, sound
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch to fix this bug
Updated patch to fix compilation errors.

Description Christopher Head 2009-03-30 01:47:03 UTC
When I run gimmix against a local installation of mpd (mpd-0.14.2, libmpd-0.17.0), the track information command doesn't work. Right-clicking a track in the playlist typically pops up a dialog box stating "An error occurred while trying to get song information. Please try again."

If instead I click the Add button then navigate to a music file in the browser, right-click the file, and click Information, gimmix segfaults. There isn't anything useful in the backtrace (built with debug info; looks like the stack was destroyed):

This GDB was configured as "i686-pc-linux-gnu"...
(gdb) r
Starting program: /usr/bin/gimmix 

(gimmix:18341): Gtk-CRITICAL **: gtk_widget_hide: assertion `GTK_IS_WIDGET (widget)' failed
connected to mpd

Program received signal SIGSEGV, Segmentation fault.
0x4ee2e8bd in ?? ()
(gdb) bt
#0  0x4ee2e8bd in ?? ()
#1  0x00000000 in ?? ()
(gdb) 

note that the GTK_IS_WIDGET assertion is printed when Gimmix is started up, NOT right before the segfault.

Reproducible: Always

Steps to Reproduce:
Comment 1 Lars Wendler (Polynomial-C) gentoo-dev 2009-03-31 19:55:04 UTC
Please post your "emerge --info" and attach a backtrace from the crash if possible...

  http://www.gentoo.org/proj/en/qa/backtraces.xml

This URL should provide all necessary information for providing the backtrace.
Comment 2 Christopher Head 2009-04-01 05:38:41 UTC
# emerge --info
Portage 2.1.6.7 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.28-hardened-r7 i686)
=================================================================
System uname: Linux-2.6.28-hardened-r7-i686-Intel-R-_Pentium-R-_M_processor_1.70GHz-with-glibc2.0
Timestamp of tree: Mon, 30 Mar 2009 19:45:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.5.2-r7
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo ftp://gentoo.arcticnetwork.ca/pub/gentoo ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LANG="en_CA.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_CA"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/usr/portage/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync21.us.gentoo.org/gentoo-portage"
USE="X a52 alsa bzip2 cairo caps cdda cddb cdio cgi cli cups dri dvd firefox flac gif gimp glibc-omitfp gmp gnutls gtk hpn isdnlog java jce joystick jpeg kdehiddenvisibility libsamplerate midi mikmod mmx mp3 mpeg multiuser ncurses nls nptl nptlonly nsplugin ntfs offensive ogg opengl pam pdf pg-intdatetime pic plotutils png pppd qq readline reflection replytolist scanner scenarios session sockets spell spl sse sse2 svg symlink sysfs theora timidity truetype unicode usb vim-syntax vorbis win32codecs x86 xcb xinerama xorg xulrunner xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="mouse keyboard synaptics wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_CA" USERLAND="GNU" VIDEO_CARDS="intel"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Christopher Head 2009-04-01 05:51:47 UTC
# CFLAGS="-O1 -ggdb" FEATURES=nostrip LDFLAGS=-nopie emerge -1 libmpd gimmix
<yada yada>

$ gdb gimmix
(gdb) r
Starting program: /usr/bin/gimmix 

(gimmix:20398): Gtk-CRITICAL **: gtk_widget_hide: assertion `GTK_IS_WIDGET (widget)' failed
connected to mpd

<press + button, navigate to song, right-click, choose Information>

Program received signal SIGSEGV, Segmentation fault.
0x4ac508bd in ?? ()
(gdb) bt full
#0  0x4ac508bd in ?? ()
No symbol table info available.
#1  0x00000000 in ?? ()
No symbol table info available.

Note that the uselessness of the trace MAY be due to the crash being in glibc and that being built PIE (for hardened); I could rebuild with LDFLAGS=-nopie but this would of course take a long time so I'd prefer not to if there's another avenue open.
Comment 4 Samuli Suominen gentoo-dev 2009-05-22 11:58:41 UTC
Can you try with latest libmpd-0.18 and libnxml-0.18.2 from ~arch?
Comment 5 Samuli Suominen gentoo-dev 2009-05-22 13:36:21 UTC
"When I run gimmix against a local installation of mpd (mpd-0.14.2,"

local? please don't waste our time if everything related isn't from portage.
Comment 6 Christopher Head 2009-05-24 09:36:44 UTC
"local? please don't waste our time if everything related isn't from portage."

Misunderstanding of terminology: local as in controlling an mpd on the same computer rather than over the network :)

Upgraded libmpd to 0.18.0. Don't have any package called libnxml installed. Rebuilt gimmix and mpd for good measure. Restarted mpd. Fired up Gimmix. Exactly the same problem.
Comment 7 Samuli Suominen gentoo-dev 2009-05-24 10:12:29 UTC
(gimmix:21521): Gtk-CRITICAL **: gtk_widget_hide: assertion `GTK_IS_WIDGET (widget)' failed
connected to mpd
state changed

Same warning here but still works fine, with ~ version of mpd by the way, 0.15_beta2.

There's no way of reproducing this.. plus there's no usable backtrace, I suppose you don't expect something happening here before you make a push for it? :-)
Comment 8 Christopher Head 2009-05-24 23:44:53 UTC
OK, I'm pretty sure I see what the problem is, though I'm not sure what the proper solution is.

First, the error message when opening a song in the playlist has inexplicably vanished.

The segfault when showing info from the library is still there, though, and here's why:

When opening the info box from the playlist, there's an #ifdef region (gimmix-playlist.c:1383) such that if built with tageditor support enabled, gimmix_tag_editor_populate() is called with the string filename of the file, but if built without tageditor support, gimmix_tag_editor_populate() is instead called with the value returned by mpd_playlist_get_current_song(), which is of type mpd_Song*.

When opening the info box from the library browser (gimmix-playlist.c:1348), a string path is always passed, which is clearly wrong with without tageditor!

I don't know enough about libmpd to know whether it's possible to get an mpd_Song* for a song not in the playlist; if it is, that's how the library info command ought to work—if not, perhaps remove the command from the menu altogether?
Comment 9 Priyank Gosalia 2009-06-22 19:58:23 UTC
Created attachment 195500 [details, diff]
Patch to fix this bug

Ok, i must admit it's a bug in Gimmix. So, heres a patch that fixes this issue.
Comment 10 Christopher Head 2009-06-23 04:53:18 UTC
Yep, that patch seems to fix it! After applying it, I can see song info both in the playlist and in the browser.
Comment 11 Samuli Suominen gentoo-dev 2009-07-19 15:29:11 UTC
After applying the patch, it doesn't compile anymore:

gimmix-tagedit.c: In function ‘gimmix_tag_editor_save’:
gimmix-tagedit.c:281: error: void value not ignored as it ought to be
gimmix-tagedit.c:282: error: void value not ignored as it ought to be
gimmix-tagedit.c:283: error: void value not ignored as it ought to be
gimmix-tagedit.c:284: error: void value not ignored as it ought to be
Comment 12 Priyank Gosalia 2009-07-20 06:07:51 UTC
Created attachment 198531 [details, diff]
Updated patch to fix compilation errors.

patch updated
Comment 13 Priyank Gosalia 2009-07-20 06:08:23 UTC
(In reply to comment #11)
> After applying the patch, it doesn't compile anymore:
> 
> gimmix-tagedit.c: In function ‘gimmix_tag_editor_save’:
> gimmix-tagedit.c:281: error: void value not ignored as it ought to be
> gimmix-tagedit.c:282: error: void value not ignored as it ought to be
> gimmix-tagedit.c:283: error: void value not ignored as it ought to be
> gimmix-tagedit.c:284: error: void value not ignored as it ought to be
> 

try the new patch and see if it works.
Comment 14 Samuli Suominen gentoo-dev 2009-07-20 08:24:57 UTC
(In reply to comment #13)
> (In reply to comment #11)
> > After applying the patch, it doesn't compile anymore:
> > 
> > gimmix-tagedit.c: In function ‘gimmix_tag_editor_save’:
> > gimmix-tagedit.c:281: error: void value not ignored as it ought to be
> > gimmix-tagedit.c:282: error: void value not ignored as it ought to be
> > gimmix-tagedit.c:283: error: void value not ignored as it ought to be
> > gimmix-tagedit.c:284: error: void value not ignored as it ought to be
> > 
> 
> try the new patch and see if it works.
> 

Thanks for your quick reaction. :-)

+*gimmix-0.5.6.1-r1 (20 Jul 2009)
+
+  20 Jul 2009; Samuli Suominen <ssuominen@gentoo.org>
+  +gimmix-0.5.6.1-r1.ebuild, +files/gimmix-0.5.6.1-tag_info_bugfix1.patch:
+  Fix song info box opening wrt #264231, thanks to Christopher Head and
+  Priyank Gosalia (upstream).

Applied to -r1. Don't know if these warnings are related. I'm seeing these when I click a song (MP3) and using MPD 0.15:

(gimmix:8580): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1: Character '=' is not valid inside an entity name
state changed

Just FYI.
Comment 15 Priyank Gosalia 2009-07-20 11:37:15 UTC
(In reply to comment #14)
> (In reply to comment #13)
> > (In reply to comment #11)
> > > After applying the patch, it doesn't compile anymore:
> > > 
> > > gimmix-tagedit.c: In function ‘gimmix_tag_editor_save’:
> > > gimmix-tagedit.c:281: error: void value not ignored as it ought to be
> > > gimmix-tagedit.c:282: error: void value not ignored as it ought to be
> > > gimmix-tagedit.c:283: error: void value not ignored as it ought to be
> > > gimmix-tagedit.c:284: error: void value not ignored as it ought to be
> > > 
> > 
> > try the new patch and see if it works.
> > 
> 
> Thanks for your quick reaction. :-)
> 
> +*gimmix-0.5.6.1-r1 (20 Jul 2009)
> +
> +  20 Jul 2009; Samuli Suominen <ssuominen@gentoo.org>
> +  +gimmix-0.5.6.1-r1.ebuild, +files/gimmix-0.5.6.1-tag_info_bugfix1.patch:
> +  Fix song info box opening wrt #264231, thanks to Christopher Head and
> +  Priyank Gosalia (upstream).
> 
> Applied to -r1. Don't know if these warnings are related. I'm seeing these when
> I click a song (MP3) and using MPD 0.15:
> 
> (gimmix:8580): Gtk-WARNING **: Failed to set text from markup due to error
> parsing markup: Error on line 1: Character '=' is not valid inside an entity
> name
> state changed
> 
> Just FYI.
> 

That warning is not related to the change introduced by this patch. It could probably happen because of invalid characters in the song's ID3 info. However, i'll test it on my side and see if i can reproduce it here too.
Comment 16 Christopher Head 2009-07-27 23:10:25 UTC
-r1 fixes, thanks!