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

Bug 74831

Summary: XMMS segfaults upon exit after failed assertion in gtkwidget.c (xmms-eq plugin)
Product: Gentoo Linux Reporter: Sybren Stüvel <sybren>
Component: Current packagesAssignee: Luis Medinas (RETIRED) <metalgod>
Status: RESOLVED FIXED    
Severity: minor CC: as.gentoo, stian, tcort
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: eq-xmms-0.6-exit_fix.patch

Description Sybren Stüvel 2004-12-18 06:33:29 UTC
Whenever I exit xmms, I get the following message:

Gtk-CRITICAL **: file gtkwidget.c: line 1387 (gtk_widget_destroy): assertion `widget != NULL' failed.

Segmentation fault


Reproducible: Always
Steps to Reproduce:
1. Start XMMS
2. Close XMMS


Actual Results:  
XMMS closes with a segmentation fault.

Expected Results:  
Close without a segmentation fault

I've got media-sound/xmms-1.2.10-r5  +3dnow +alsa +cjk -debug -directfb +esd
+ipv6 +mikmod +mmx +nls +oggvorbis +opengl +oss +xml

Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1,
2.6.9-gentoo-r1 i686)
=================================================================
System uname: 2.6.9-gentoo-r1 i686 AMD Athlon(TM) XP 2000+
Gentoo Base System version 1.4.16
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.14.90.0.8-r1
Headers:  sys-kernel/linux26-headers-2.6.8.1
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=athlon-xp -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/mc /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/bind /var/qmail/control /var/www/localhost/error"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-mcpu=athlon-xp -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://www.gigaload.org/gentoo.org/"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/opt/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow S3TC X X509 aalib acl acpi alsa apache2 apm avi berkdb bitmap-fonts
bonobo cdr cjk compositor crypt cups dedicated dga dvd dvdr encode esd f77 fam
flac foomaticdb fortran gdbm geoip ggi gif gimpprint gnome gpm gstreamer gtk
gtk2 gtkhtml guile gvim imagemagick imap imlib ipv6 jabber jack java jpeg junit
kerberos krb4 ldap libcaca libg++ libwww lirc mad maildir mbox mikmod mmx mng
motif mozilla moznocompose moznoirc moznomail mozsvg mozxmlterm mpeg mysql
ncurses nls odbc oggvorbis opengl oss pam pda pdflib perl png postgres ppds
python qt quicktime readline samba sdl speex spell sse ssl svga tcltk tcpd tetex
theora tiff truetype unicode v4l v4l2 vhosts vim wifi x86 xml xml2 xmms xsl xslt
xv zlib"
Comment 1 Stian Skjelstad 2004-12-18 07:25:11 UTC
What plugins do you have in xmms. Might be a plugin that makes that error as-well. (I use the same version without problemes). What output do you use? etc.
Comment 2 Sybren Stüvel 2004-12-18 08:44:53 UTC
Input plugins, all enabled:

- libcdread.so
- libcdaudio.so
- libxmmsmad.so
- libmikmod.so
- libmp4.so
- libmpg123.so
- libvorbis.so
- libxmms-flac.so
- libsmpeg_xmms.so
- libmid.so
- libtonegen.so
- libwav.so

Output plugins:

- libALSA.so (in use)
- libcrossfade.so
- libdisk_writer.so
- libesdout.so
- libOSS.so

Effect plugins, none enabled:

- libecho.so
- libstereo.so
- libcompress.so
- libnormvol.so
- libvra.so
- libvoice.so

General plugins, none enlabled:

- libir.so
- libitouch.so
- libjoy.so
- libsong_change.so

Visualization plugins, none enabled:

- libbscope.so
- libblursk.so
- libdflowers.so
- libdscope.so
- libdspectogram.so
- gdancer.so
- libinfiinte.so
- libiris.so
- libjess.so
- libnebulus.so
- libogl_spectrum.so
- libsanalyzer.so
- libgoom.so

I use ALSA output, but the same error occurs when using OSS output.
Comment 3 Jeremy Huddleston (RETIRED) gentoo-dev 2004-12-18 14:20:33 UTC
uninstall your plugins until youu find the one that causes this please.
Comment 4 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-03 03:54:24 UTC
no response for 3 weeks... closing.
Comment 5 Sybren Stüvel 2005-01-03 04:06:38 UTC
Ok, removing all possible plugins fixed it. Thanks.
Comment 6 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-03 12:43:22 UTC
I'd rather you tell me which plugin is causing this problem.
Comment 7 Attila Stehr 2006-01-03 10:09:57 UTC
Please reopen this bug and update the summary!

The plugin wich caused this problem is eq-xmms.

---START---output before unemerge-----------------------
magic xmms # xmms

** CRITICAL **: file configfile.c: line 266 (xmms_cfg_write_string): assertion `value != NULL' failed.

** CRITICAL **: file configfile.c: line 266 (xmms_cfg_write_string): assertion `value != NULL' failed.

** CRITICAL **: file configfile.c: line 266 (xmms_cfg_write_string): assertion `value != NULL' failed.

Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkWidget'

Gtk-CRITICAL **: file gtkwidget.c: line 1387 (gtk_widget_destroy): assertion `widget != NULL' failed.

Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkWidget'

Gtk-CRITICAL **: file gtkwidget.c: line 1387 (gtk_widget_destroy): assertion `widget != NULL' failed.

GLib-CRITICAL **: file gmain.c: line 500 (g_source_remove): assertion `tag > 0' failed.
magic xmms # emerge unmerge xmms-eq -vDp
---STOP-------------------------------------------------
Comment 8 Attila Stehr 2006-01-03 10:10:54 UTC
LOL, I just noticed the bug was closed exactly 1 year ago.
xD
Comment 9 Attila Stehr 2006-01-03 17:18:29 UTC
And please alter Hardware to "AMD64".
Comment 10 Luis Medinas (RETIRED) gentoo-dev 2006-01-03 17:30:21 UTC
ok reopening the bug and researching about it
Comment 11 Luis Medinas (RETIRED) gentoo-dev 2006-01-03 17:30:55 UTC
reassign bug to me since Jeremy is no longer xmms maintainer.
Comment 12 Attila Stehr 2006-01-03 18:13:27 UTC
thx =)
Comment 13 Luis Medinas (RETIRED) gentoo-dev 2006-01-04 11:01:41 UTC
buggy plugin try to write a patch to fix this issue :).
Comment 14 Thomas Cort (RETIRED) gentoo-dev 2006-01-06 15:30:20 UTC
I grabbed eq-xmms from CVS today and the bug is still present. There is an open upstream bug report[1] from 11-Nov-2004.

I changed the bug report summary from xmms-eq to eq-xmms as the name of the package is eq-xmms[2] not xmms-eq, xmms-eq doesn't exist in portage. Now people who click on the "Bugs" link for this package on packages.gentoo.org will be able to find this bug :)

[1] http://sourceforge.net/tracker/index.php?func=detail&atid=496208&aid=1064985&group_id=61119
[2] http://packages.gentoo.org/search/?sstring=eq-xmms
Comment 15 Attila Stehr 2006-01-07 14:19:14 UTC
"I changed the bug report summary from xmms-eq to eq-xmms"

*cough* you did not ;)
Comment 16 Attila Stehr 2006-01-07 14:20:41 UTC
btw: 
Isn't this a good occasion to alter the packages name from eq-xmms to xmms-eq?
Comment 17 Thomas Cort (RETIRED) gentoo-dev 2006-01-07 15:02:44 UTC
(In reply to comment #15)
> "I changed the bug report summary from xmms-eq to eq-xmms"
> *cough* you did not ;)

bugs.gentoo.org outputs an HTML text field for the summary which makes it appear as though it is editable by me, but it doesn't apply my changes or give any warnings/errors after I submit it.
Comment 18 Attila Stehr 2006-01-07 16:20:37 UTC
I know that kind of bug :-(
Only gentoo ppl (andmins?) and the bugs reporter can alter the summary. That's kind of logic, anyway you're right ... there should be _no_ input field for data you can not alter.
Btw, my comment was no criticism, just a note. :)
Comment 19 Thomas Cort (RETIRED) gentoo-dev 2006-01-13 23:59:38 UTC
Created attachment 77051 [details, diff]
eq-xmms-0.6-exit_fix.patch

The following 3 warnings happened because the plugin was attempting to write a configuration file when the user hadn't configured the plugin. Fixed to use the default values if the user hasn't configured the plugin.

** CRITICAL **: file configfile.c: line 266 (xmms_cfg_write_string): assertion `value != NULL' failed.

** CRITICAL **: file configfile.c: line 266 (xmms_cfg_write_string): assertion `value != NULL' failed.

** CRITICAL **: file configfile.c: line 266 (xmms_cfg_write_string): assertion `value != NULL' failed.


The following 4 warnings happened because the plugin's cleanup function always gets called, even if the init function doesn't get called. The init function doesn't get called when the plugin is disabled. The cleanup function was trying to remove things that hadn't been initialized. Fixed to check if widget == NULL before trying to remove the widget.

Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkWidget'

Gtk-CRITICAL **: file gtkwidget.c: line 1387 (gtk_widget_destroy): assertion `widget != NULL' failed.

Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkWidget'

Gtk-CRITICAL **: file gtkwidget.c: line 1387 (gtk_widget_destroy): assertion `widget != NULL' failed.


The cleanup function was trying to remove a timeout that hadn't been added (because init wasn't called for the same reason as above). Fixed to check that the timeout has a tag > 0 before attempting to remove the timeout.

GLib-CRITICAL **: file gmain.c: line 500 (g_source_remove): assertion `tag > 0' failed.


I tested the patch on Alpha and it works as expected.

While testing other functionality I noticed that if you try random things like configuring the plugin before enabling it, you will get a lot of errors. Just clicking the Apply button causes some console messages. When I contact the upstream dev(s) about the fix for this bug I'll ask if/when there will be a future release[1] and if/when the plugin will come out of beta[2].

[1] last release May 15, 2004
http://sourceforge.net/project/showfiles.php?group_id=61119

[2] Project page says: "Development Status  : 4 - Beta" 
http://sourceforge.net/projects/equ
Comment 20 Luis Medinas (RETIRED) gentoo-dev 2006-01-16 10:55:47 UTC
patch commited Thanks Thomas.