GNOME Bugzilla – Bug 105296
2ns instance of cdplayer applet hangs
Last modified: 2004-12-22 21:47:04 UTC
This problem happens in Solaris in machine where there is no audio cable from the cddrive to the sound card. In this type of machines cdda method is used to write to the audio device. When the first instance of cdplayer applet is playing, if I try to add a second instance of the applet, the panel hangs. Even the timer in the first instance stops and I cannot do any operation in the first instance. I need to do a pkill cdplayer. Sometimes panel comes back properly, sometimes panel crahes. The second instance of the applet waits in a open call cdda->audio = open(cdda->audio_device, O_WRONLY | O_NDELAY) in writer-solaris.c (cdda_audio_open).
When the first instance is playing the audio device is being used and it opened with O_WRONLY, hence the second instance waits in this open call and hence the applet and the panel hang. I am attaching a patch that will do the following Now the audio device is opened with O_WRONLY | O_NDELAY flags so when a second instance is added it does not wait in the open call. Hence the second instance is added to the panel properly. Since only one of this insantce can play the cd, A dialog is poped when the user clicks on the play of the second instance when the first instance is already playing and vice versa. Thanks.
Created attachment 14147 [details] [review] Patch for this bug
With this patch pause functionality is not working, sorry. Working on a new patch. Thanks.
Correct the problem, and attaching the patch which solves the problem Thanks.
Created attachment 14185 [details] [review] Patch for this bug
Bala: the patch looks okay to me (though I can't test on Solaris). Only thing is that you can get rid of the #ifdef HAVE_GTK_MULTIHEAD since that is no longer needed. Please commit.
Thanks Kevin, Checked in the patch to the HEAD, since the patch adds a new string I didn't commit the patch to gnome-2-2 branch. Shall I send a mail to gnome-i18n@gnome.org and then commit the patch to gnome-2-2 branch? Thanks. 2003-03-20 Balamurali Viswanathan <balamurali.viswanathan@wipro.com> * cdplayer.c, cdrom-solaris.c, writer-solaris.[ch] Give a error dialog if the Audio device is busy. Solves bug #105296
Bala: yes send an email. Thanks!
Bala: Have you commited to gnome-2-2? The sooner the better so translators can update.
Kevin: I have checked into gnome-2-2 brnach also. Thanks. 2003-04-04 Balamurali Viswanathan <balamurali.viswanathan@wipro.com> * cdplayer.c, cdrom-solaris.c, writer-solaris.[ch] Give a error dialog if the Audio device is busy. Solves bug #105296