GNOME Bugzilla – Bug 102025
[Patch] Crash on exit/stop if sound was already in use
Last modified: 2004-12-22 21:47:04 UTC
Its primarily with rhythmbox-0.4.1. If the sound device (OSS) was in use before rhythmbox are started, and you either: 1) start to play a song, and then pause it 2) exit gstreamer segfault. gdb output of crash: ---------------------------------------- # gdb /usr/bin/rhythmbox GNU gdb 5.3 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"... (gdb) run Starting program: /usr/bin/rhythmbox [New Thread 16384 (LWP 4438)] INFO ( 4438: 0) Initializing GStreamer Core Library version 0.5.0 INFO ( 4438: 0) CPU features: (00000000) MMX SSE registry: loaded user_registry in 0.000195 seconds (/root/.gstreamer/registry.xml) registry: loaded global_registry in 0.097420 seconds (/var/lib/cache/gstreamer-0.5/registry.xml) building level building level building level building level building level building level building level building level building level building level building level building level building level building level building level [New Thread 32769 (LWP 4447)] [New Thread 16386 (LWP 4448)] [New Thread 32771 (LWP 4449)] building level building level [New Thread 49156 (LWP 4450)] [New Thread 65541 (LWP 4451)] ** (rhythmbox:4451): WARNING **: osscommon: unable to open the sound device (in use ?) Program received signal SIGINT, Interrupt.
+ Trace 32067
Thread 65541 (LWP 4451)
Created attachment 13233 [details] [review] gstreamer-0.5.0-segfault-on-state_change.patch
Above patch fixes this problem. Its probibly more a kludge than the real fix. Ask if more info are needed.
Sorry for this horde of posts, but it is late (or early rather) :/ Should have mentioned that I have had the same issues with gstreamer 0.4.1 and 0.4.2 and rhythmbox 0.4.0. I do not use much else that make use of gstreamer, and have not had time before to verify that this will fix the issue for those versions as well, but I do imagine so.
Yes, I am an idiot ... now it does not play at all. Ill go to bed now and have a look again tomorrow.
Created attachment 13244 [details] [review] gst-plugins-0.5.0-never-return-on-oss-busy.patch
Created attachment 13245 [details] [review] gst-plugins-0.4.2-never-return-on-oss-busy.patch
Ok, the problem is that in linux you cannot open /dev/dsp (or whatever) without O_NONBLOCK if the device are in use, as it then never returns. We thus need to open it O_NONBLOCK, and then use fcntl() to set it to blocking mode. This is at least what both esound and mplayer does. Attached is two patches, one for gst-plugins-0.5.0 and one for gst-plugins-0.4.2, althoug the latter are just for reference or whatever. --------------------------------------------------- # gdb /usr/bin/gst-launch GNU gdb 5.3 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"... (gdb) run filesrc location=/space/MP3/Nine_Days/Radiohead-Karma_Police_\(live\).mp3 ! mad ! osssink Starting program: /usr/bin/gst-launch filesrc location=/space/MP3/Nine_Days/Radiohead-Karma_Police_\(live\).mp3 ! mad ! osssink [New Thread 16384 (LWP 32035)] INFO (32035: 0) Initializing GStreamer Core Library version 0.5.0 INFO (32035: 0) CPU features: (00000000) MMX SSE registry: loaded user_registry in 0.000111 seconds (/root/.gstreamer/registry.xml) registry: loaded global_registry in 0.099663 seconds (/var/lib/cache/gstreamer-0.5/registry.xml) GStreamer-INFO: 0 live buffer(s) GStreamer-INFO: 0 live bufferpool(s) GStreamer-INFO: 0 live event(s) RUNNING pipeline ** (process:32035): WARNING **: osscommon: unable to open the sound device (in use ?) Program received signal SIGINT, Interrupt.
+ Trace 32080
Thread 16384 (LWP 32035)
Patch applied to CVS and will be in 0.5.2, thanks Martin!