dcsimg
Sound in Applets causes deadlock
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Monday, February 24, 2003 12:23 AM

I run a Java application playing sounds in a browser in form of applets. My trouble is that such application sometimes crashes and when I trace the Java Plug-In console I see that my thread dedicated exclusively to play sound is waiting for a monitor that never is liberated. The stack trace is like that: "AudioThread" prio=4 tid=0x142F6D28 nid=0x560 waiting for monitor entry [20bf000..20bfd8c] at com.sun.media.sound.AbstractDataLine.stop AbstractDataLine.java:177) - waiting to lock <05FFD3E8> (a com.sun.media.sound.HeadspaceMixer) - locked <069C5320> (a com.sun.media.sound.MixerClip) at com.sun.media.sound.JavaSoundAudioClip.st   More>>


I run a Java application playing sounds in a browser in form of applets.


My trouble is that such application sometimes crashes and when I trace the Java Plug-In console I see that my thread dedicated exclusively to play sound is waiting for a monitor that never is liberated.


The stack trace is like that:



"AudioThread" prio=4 tid=0x142F6D28 nid=0x560 waiting for monitor entry [20bf000..20bfd8c]
at com.sun.media.sound.AbstractDataLine.stop AbstractDataLine.java:177)
- waiting to lock <05FFD3E8> (a com.sun.media.sound.HeadspaceMixer)
- locked <069C5320> (a com.sun.media.sound.MixerClip)
at com.sun.media.sound.JavaSoundAudioClip.stop(JavaSoundAudioClip.java:193)
- locked <06AB09A8> (a com.sun.media.sound.JavaSoundAudioClip)
at sun.applet.AppletAudioClip.stop(AppletAudioClip.java:207)
- locked <06AB09D0> (a sun.applet.AppletAudioClip)
at sun.applet.PluginAudioClip.stop(ActivatorAppletAudioClipRef.java:202)
at sprite.AudioThread.run(AudioThread.java:73)



It seems like the sun toolkit classes are running a thread that does not leave the synchronized segment of code. Is it for a bad use of a thread used exclusively to play sounds? Can anyone help me?

Thanks.

   <<Less
About | Sitemap | Contact