Java plugin never lets go of sound device.

RESOLVED INCOMPLETE

Status

Core Graveyard
Java: OJI
P3
minor
RESOLVED INCOMPLETE
18 years ago
5 years ago

People

(Reporter: Mike Akers, Assigned: stanley.ho)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: jpibug, URL)

(Reporter)

Description

18 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.4.0-test6 i686; en-US; m18) Gecko/20001004
BuildID:    2000100409

If i visit a page with an applet that uses sound. Mozilla doesnt doesnt let go
of the sound device unless you exit mozilla.

Reproducible: Always
Steps to Reproduce:
1.start mozilla with java plugin
2.visit a page with an applet that uses sound (the specified url for example)
3.goto another page without an applet
4.try to play a sound using another program (i.e. play an mp3 with xmms)

Actual Results:  other program cannot play sound untill mozilla exits.			

Expected Results:  other program should be able to play sound since nothing in
mozilla is playing a sound right?			

The oji plugin I'm using is the one from netscape 6 pr3. I just copied the
contents of plugins/ from my pr3 install to plugins/ in my mozilla directory, If
this is not the proper way to get java working in mozilla, let me know.

Comment 1

18 years ago
Are you sure this is OJI?
It may be about how moz handle devices as such: see bug 55135.

Comment 2

17 years ago
Reporter is this still a problem in the latest nightlies?

Comment 3

17 years ago
Hi Joe,

Can you please look into this?  I can't seem to reproduce it on my Solaris box,
but I don't know if audio works properly on that machine.

Thanks,

Ed
Assignee: edburns → joe.chou
(Reporter)

Comment 4

17 years ago
Keyser Sosez: The Java plugin from http://home.netscape.com/plugins/jvm.html
doesnt seem to work amymore with the nightlies. Do you know where i can find a
plugin that works?
(Reporter)

Comment 5

17 years ago
ok, the jre from ns6 works with the latest lightlies so i could test some more.
This is still happening. I was also able to get the same thing to happen using
the Java2D demo applet that comes with the jdk 1.3, but the JavaSound demo
applet will let go of the sound. So this may be a case of buggy applet writing.

Comment 6

17 years ago
but buggy or not, sound device should be freed when browser window with the
"buggy" applet is closed.. the current behaviour is very annoying. can the
java_vm (be told to) use esd or something?

Comment 7

17 years ago
Are we still seeing this in the latest nightlies?

Comment 8

17 years ago
Still occurs exactly as reported in 2000121908.

In the opposite case - having xmms playing and subsequently opening the page
just results in the Java music not playing... Not sure what the behavior should
be for this case.

Comment 9

17 years ago
Marking NEW as per comments.
Status: UNCONFIRMED → NEW
Ever confirmed: true
*** Bug 88561 has been marked as a duplicate of this bug. ***

Comment 11

17 years ago
Tested on Linux with the recent trunk build, the problem still existed.
Also tested on Solaris, it seemed working OK and did not see the prpblem.
 
To reproduce the problem, first go play some WSUN Radio report by using Java,
then stop playing, and try to play some other thing (i.e., RealPlayer, MP3,
etc.). On linux, the second play will fail.

This seems to be a Java plugin bug, assign to Java plugin. Also opened a SUN
internal bug 4480490.
Assignee: joe.chou → stanley.ho
Whiteboard: jpibug

Comment 12

17 years ago
SPAM: reassigning all OJI bugs to new OJI QA, pmac ( 227 bugs)
QA Contact: shrir → pmac

Comment 13

16 years ago
bugtraq 4302884 (bugtraq 4480490 was closed as dupe of this bug)

From evaluation (florian.bomers@sun.com)

> Fixing it (which would involve modifying core elements of the Java Sound
> engine) in a rush (code freeze was already over when the last avaluation
> comment was made), was considered very risky, in terms of breaking
> compatibility. I tried very hard to get the fix through, but unfortunately I
am
> not the only one who decides which fixes are still allowed after code freeze.
> Postponed to be fixed for Tiger (1.4.1).

As workaround they suggest to 
>  use javax.sound.sampled.Clip and closing it explicitely. 

But we can not force applet writer's to do this.

> Invoking explicit garbage collection is also a good idea, as the
> clips are closed on disposal. Be sure to not hold a reference on the AudioClip
> instance ! 

We can try to implement this but applet instances have references
from cached pages even if page with applet is not shown anymore.
This will make garbage collection unefficient.

Comment 14

16 years ago
*** Bug 116090 has been marked as a duplicate of this bug. ***

Comment 15

16 years ago
Bug 116090 was reported for Win98 
 => Changing Plaftorm to All
OS: Linux → All
Target Milestone: --- → Future

Comment 16

16 years ago
This is very serious. if you open up a java applet, like a game on yahoo.com you
will not be able to use any sound devices until you reboot the computer!
http://games.yahoo.com/games/dynomite.html is a good example of a java applet
with sound. 
Severity: normal → blocker
Keywords: nsbeta1

Updated

15 years ago
QA Contact: pmac → petersen

Comment 17

15 years ago
Hi,
I just thought about creating my own Bug, but it might be the same.

On my PC (Linux, Mozilla 1.2.1a, automatically installed Mozilla Java-plugin),
once the plugin is beeing loaded it never gets unloaded.

What i did (maybe you can reproduce it):
Created a new User-account
Opend mozilla
Opend a site using java (www.map24.de: adressuche: Straße = Implerstrasse, Stadt
= München...go, or alternativly the yahoo-site with sound)
Wait for Java to be loaded
Switch to a different site (www.slashdot.org).
View Processlist (currently i have 27 lines of 
chr      26443  0.0 16.9 220336 32404 pts/5  S    18:19   0:00 java_vm)
The more often i open the Java-Site, the more processes i get).

My assumption is, that if your Java_vm also never gets closed, it also wouldn't
release the sound device. But if you figure out, that my problem has nothing to
do with this bug, please let me know, and if you can, point me to the right
solution ;-)

Comment 18

15 years ago
*** Bug 191618 has been marked as a duplicate of this bug. ***

Comment 19

15 years ago
-- Verified in the latest trunk build on Win2K with JRE1.4.1_02. Cannot
reproduce the problem. When i open the above url the applet opens the sound file
and if i visit some other page the sound is not longer there. Working as expected.
But when i bring the cursor over the sound file i get ClassCastException

java.lang.ClassCastException at
DigitsApplet.handleEvent(C:\work\dan_may\pi_anim\DigitsApplet.java:298)
at java.awt.Component.postEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
stopping applet's clock

Reducing the severity. owner, if you still see sound file problem change the
severity back.
Severity: blocker → minor

Updated

15 years ago
QA Contact: cpetersen0953 → dsirnapalli

Comment 20

15 years ago
adt: nsbeta1-
Keywords: nsbeta1 → nsbeta1-

Comment 21

11 years ago
Above URL is dead; shouldn't this bug be closed, unless someone has another bright idea or two?

Comment 22

9 years ago
After using sound in firefox, no other app has access until firefox is exited.
"lsof /dev/dsp" says it's not in use. E.G:- skype will not output audio. Longstanding bug in 3.0.x(3.0.8 currently in use), I haven't tried 3.1.x.
In firefox sound always work.
Using openSUSE 11.2 Alpha0 with latest vanilla kernel 2.6.29-git8, but it has behaved like that since perhaps 11.0.

Updated

7 years ago
Component: Java: OJI → Java: OJI
Product: Core → Core Graveyard
QA Contact: dsirnapalli → java.oji

Comment 23

5 years ago
Mass-closing bugs in the "OJI" component: OJI plugin integration was replaced with npruntime long ago, and these bugs appear to be irrelevant now. If there is in fact a real bug that remains, please file it new in the "Core" product, component "Plug-ins".
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.