Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 127270 - XMMS hangs if pressing a button on song change
Summary: XMMS hangs if pressing a button on song change
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Luis Medinas (RETIRED)
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2006-03-23 00:01 UTC by Gerry
Modified: 2006-05-23 20:40 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
xmms-mad-0.8-hang.patch (xmms-mad-0.8-hang.patch,472 bytes, patch)
2006-04-03 19:50 UTC, Thomas Cort (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gerry 2006-03-23 00:01:00 UTC
If one of the song navigation buttons (previous/play/pause/stop/next) are pressed exactly at the end of a song (ie on song change), XMMS hangs.  Quitting xmms in this state makes the window disappear but leaves it running, so it has to be killed.  Pressing any buttons when song change is not in progress works fine.

This is 100% reproducable (hitting a button on song change isn't very difficult, it turns out), using the latest version of xmms in portage (1.2.10-r15) and the ALSA output plugin.  (I haven't tried other output plugins, as I've only got the ALSA one installed.)

emerge --info:

Portage 2.0.54 (default-linux/amd64/2006.0, gcc-3.4.4, glibc-2.3.5-r2, 2.6.15-gentoo-r5 x86_64)
=================================================================
System uname: 2.6.15-gentoo-r5 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
Gentoo Base System version 1.6.14
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib64/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="ftp://trumpetti.atm.tut.fi/gentoo/ http://mirror.gentoo.no/"
LANG="nb_NO"
LC_ALL="nb_NO"
LINGUAS="nb no en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="amd64 16bit 7zip S3TC X Xaw3d a52 aac aalib acl acpi alsa apache2 applet artworkextra asf audiofile avi bash-completion berkdb bitmap-fonts browserplugin bzip2 cairo ccache cdparanoia cdr cli crypt css ctype cups curl dba dbus dga dri dvd dvdr dvdread eds elf emboss encode ethereal exif expat fam fame fastbuild fat ffmpeg flac flash foomaticdb force-cgi-redirect fortran ftp gcj gd gdb gif gimp glitz glut glx gnome gpm graphviz gstreamer gtk gtk2 gtkhtml guile gzip h323 hal i8x0 idn ieee1394 imagemagick imap imlib imlib2 intl ipv6 jabber jack jack-tmpfs java javascript jpeg junit kde kdeenablefinal kqemu lame lcms libcaca libwww linguas_nb linuxthreads-tls logitech-mouse lua lzo lzw lzw-tiff mad matroska md5sum memlimit mhash mikmod ming mjpeg mmap mng mod modplug mono mozilla mp3 mp4live mpeg mpeg2 mplayer music musicbrainz ncurses nforce2 nls nptl nsplugin ntfs nvidia nvram objc ocaml ogg oggvorbis openal opengl openssh openssl oss pam pcre pdflib perl physfs png pnp posix povray python qemu-fast qt quicktime rar readline real samba scanner sdk sdl session sharedext sharedmem sid simplexml slang smp sms soap sockets speex spell spl sse-filters ssl startup-notification stencil-buffer subtitles subversion svg sysfs tcpd tga theora thesaurus threads tiff timidity tokenizer transcode truetype truetype-fonts type1 type1-fonts udev usb videos vorbis wma wma123 wxwindows x264 xanim xine xml xml2 xmms xpm xrandr xscreensaver xsl xv xvid yv12 zip zlib linguas_no linguas_en userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS
Comment 1 Thomas Cort (RETIRED) gentoo-dev 2006-03-23 11:20:58 UTC
I was unable to reproduce this bug on x86. The problem doesn't present itself by holding the button down in the last second of the song and then releasing it after the next song starts. I don't know if I hit the button exactly between songs though. I tried slowing the system down with a bunch of "cat /dev/random | bzip2 -c > /dev/null" commands, but I still couldn't reproduce the error. Do you have any hints for pressing one of the navigation buttons exactly at the end of the song? I'd be really helpful if you could do a backtrace too ( more info on backtraces here: http://www.gentoo.org/doc/en/bugzilla-howto.xml#doc_chap2 ). Thanks for the bug report :)

media-sound/xmms-1.2.10-r15  USE="alsa arts esd flac mad mikmod mp3 nls oss sndfile vorbis -3dnow -directfb -jack -lirc -mmx"

# emerge --info
Portage 2.1_pre6-r6 (default-linux/x86/2006.0, gcc-3.4.5, glibc-2.3.6-r3, 2.6.15-gentoo-r2 i686)
=================================================================
System uname: 2.6.15-gentoo-r2 i686 AMD Duron(tm)
Gentoo Base System version 1.12.0_pre16
dev-lang/python:     2.3.5-r2, 2.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-Os -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://cs.ubishops.ca:2121/pub/gentoo http://adelie.polymtl.ca/ ftp://gentoo.arcticnetwork.ca/pub/gentoo/ http://gentoo.mirrored.ca/ http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/diskless /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X a52 aac aalib acpi aim alsa apache2 arts audacious audiofile avi bash-completion berkdb bitmap-fonts bzip2 cairo calendar cdinstall cdparanoia cdr cli crypt cscope ctype cups curl curlwrappers dba dbus dri dvd dvdr dvdread eds emacs emboss encode esd ethereal expat fastbuild ffmpeg firefox flac flash foomaticdb force-cgi-redirect fortran ftp gcj gd gdbm gif glut gmp gnome gnutls gphoto2 gpm gstreamer gtk gtk2 hal icq imagemagick imlib ipv6 jabber java javascript jpeg jpeg2k kde libg++ libwww lua mad memlimit mikmod mono motif mozilla mp3 mpeg msn ncurses nis nls nocd nptl nptlonly ogg oggvorbis opengl oscar oss pam pam_console pcre pda pdf pdflib perl php png posix python qt quicktime readline ruby sdl session shorten simplexml sndfile soap sockets spell spl ssl szip tcltk tcpd threads tiff tokenizer truetype truetype-fonts type1-fonts udev vcd videos vorbis win32codecs wma wmf wxwindows xface xine xml xml2 xmlrpc xmms xpm xsl xv yahoo zlib elibc_glibc kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LC_ALL, LINGUAS
Comment 2 Gerry 2006-03-25 08:23:43 UTC
I'm not holding the button down, I'm just clicking it normally.  In fact, I've discovered that holding the button down like you describe doesn't make xmms hang here either.

In any case, the bug isn't hard to reproduce here at all.  Just click a button normally when a song ends; don't hold it in or anything like that.  The timing must be correct, of course, but there's no need to be overly exact either -- there's enough leeway there to make the bug easy to trigger under normal use.

Also, when this happens, xmms doesn't crash, it just hangs (ie stops responding).  To give a backtrace I'd have to interrupt the process, and depending on the nature of the problem that may not be as useful (if it's a tight infinite loop it'd help, but if the code jumps all over the place it'd be less useful).  I could still do it, of course, but I'd have to install xmms with debug symbols first.
Comment 3 Gerry 2006-03-25 08:34:25 UTC
Oh, and there's probably no need to try to slow the system down either.  The bug is easy to trigger on an otherwise idle Athlon64x2 4200+ (2x2200 mhz).
Comment 4 Thomas Cort (RETIRED) gentoo-dev 2006-04-03 19:50:47 UTC
Created attachment 83855 [details, diff]
xmms-mad-0.8-hang.patch

I was finally able to reproduce the bug. I couldn't reproduce it before because I wasn't trying it with mp3 files. The problem occurs when xmms-mad finishes decoding the mp3. The decoder thread just sleeps in a loop waiting for the song to finish playing. When a button is pushed the plugin waits for the decoder thread to finish executing, but the decoder thread never breaks out of the loop. This patch adds another condition to the loop so that it breaks out of the loop if a button is pushed.
Comment 5 Tomas 2006-04-19 20:34:41 UTC
this is probably a duplicate of bug 127270 ?
Comment 6 Tomas 2006-04-19 20:35:45 UTC
sorry copy-pasted wrong
this is probably a duplicate of bug 96414 ?
Comment 7 Tomas 2006-05-23 18:14:49 UTC
I tried the patch Thomas Cort created. It fixes some things:
 At the end of a song:
  - pressing previous, play, stop & next works as expected;
  - pressing pause acts as if next is pressed;
  - pressing arrow-left or arrow right (skipping 5 seconds back or ahead) does nothing, but XMMS doesn't hang either. This isn't necessarily a bug.

Could you please also have a look at bug 96414, which reports the same problems, but additional similar problems when using the mpg123 decoder. The fix there might be similar?
Comment 8 Thomas Cort (RETIRED) gentoo-dev 2006-05-23 20:40:31 UTC
The patch has been add per MetalGOD's request in #gentoo-media and will appear in xmms-mad-0.8-r2.