After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 105296 - 2ns instance of cdplayer applet hangs
2ns instance of cdplayer applet hangs
Status: RESOLVED FIXED
Product: gnome-applets
Classification: Other
Component: cdplayer
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-02-05 12:32 UTC by Balamurali Viswanathan
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for this bug (3.97 KB, patch)
2003-02-06 06:58 UTC, Balamurali Viswanathan
none Details | Review
Patch for this bug (3.79 KB, patch)
2003-02-07 12:49 UTC, Balamurali Viswanathan
none Details | Review

Description Balamurali Viswanathan 2003-02-05 12:32:01 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).
Comment 1 Balamurali Viswanathan 2003-02-06 06:57:34 UTC
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.
Comment 2 Balamurali Viswanathan 2003-02-06 06:58:25 UTC
Created attachment 14147 [details] [review]
Patch for this bug
Comment 3 Balamurali Viswanathan 2003-02-06 15:16:40 UTC
With this patch pause functionality is not working, sorry.
Working on a new patch.
Thanks.
Comment 4 Balamurali Viswanathan 2003-02-07 12:47:56 UTC
Correct the problem, and attaching the patch which solves the problem
Thanks.
Comment 5 Balamurali Viswanathan 2003-02-07 12:49:06 UTC
Created attachment 14185 [details] [review]
Patch for this bug
Comment 6 Kevin Vandersloot 2003-03-12 16:02:05 UTC
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.
Comment 7 Balamurali Viswanathan 2003-03-20 15:37:17 UTC
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
Comment 8 Kevin Vandersloot 2003-03-20 16:00:33 UTC
Bala: yes send an email. Thanks!
Comment 9 Kevin Vandersloot 2003-04-04 00:15:00 UTC
Bala: Have you commited to gnome-2-2? The sooner the better so
translators can update.
Comment 10 Balamurali Viswanathan 2003-04-04 07:14:24 UTC
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