JDK-4304996 : Aging applet stops receiving events from Java Sound
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.sound
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2000-01-15
  • Updated: 2001-11-30
  • Resolved: 2001-11-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.0 rc1Fixed
Related Reports
Relates :  
Description

Name: kk38543			Date: 01/14/2000


An applet which is reloaded, or stopped and restarted,
may no longer receive events from Java Sound (such as
START and STOP).

To reproduce the problem:  Run the Java Sound demo as
an applet.  In the Capture/Playback panel, record and
playback audio a few times.  Notice that sound records
and plays back successfully.  Now, from the menu, choose
"Stop" and then "Restart."  Note that you can now record
audio one more time.  However, when you stop recording, 
the audio device remains open and you get error messages
when you try to play back or record more audio.

Investigating a bit, it turns out that the Java Sound
demo app depends on receiving START and STOP events
to determine when recording and playback have begun or 
stopped.  Once the applet has been stopped and restarted,
no more events are generated.


======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: merlin-rc1 FIXED IN: merlin-rc1 INTEGRATED IN: merlin-rc1
14-06-2004

EVALUATION This happens because events are dispatched by thread objects which are instantiated in the static blocks of AbstractLine and AbstractMidiDevice. When an applet is restarted or reloaded, the event threads can be interrupted and events are generated no more! I am finishing up and testing a fix for this problem. Note that this fix is required as part of the fix for bug #4302884: "Audio device is not released when AudioClip stops." kara.kytle@Eng 2000-01-14 To test the fix, run the attached applet. Once the applet starts, you see messages printed every second when events are received when the device opens and closes. Reload. You should still see the event messages. Without the fix, the event messages are gone. kara.kytle@Eng 2000-01-26 ###@###.### 2001-11-02 A workaround in Java Plugin temporarily fixed this bug. However, the workaround caused new problems, so a better solution is now implemented as fix for bug #4521048. I have not seen Kara's fix which she mentions above.
11-06-2004

PUBLIC COMMENTS Aging applet stops receiving events from Java Sound
10-06-2004