Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4365713

JavaSound EventDispatcher thread never exits

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • None
    • 1.3.0
    • client-libs



      Name: kb87695 Date: 08/24/2000


      Run this class with parameter being the name of an audio file.


      import java.applet.Applet;
      import java.applet.AudioClip;
      import java.net.URL;
      import java.net.MalformedURLException;

      class AudioTest {

              URL urlBell1;
              AudioClip aclip;

              AudioTest (String audioFile) {
                      try {
                              this.urlBell1 = new URL( "file", "", audioFile );
                      } catch ( MalformedURLException ex ) {
                              ex.printStackTrace();
                              System.exit( 255 );
                      }
                      this.aclip = Applet.newAudioClip( this.urlBell1 );
                      this.aclip.play();

                      try {
                              Thread.sleep( 1 * 1000 );
                      } catch ( InterruptedException ex ) {
                              ex.printStackTrace();
                              System.exit( 255 );
                      }
              }
              public static void main( String[] args ) {
                      new AudioTest(args[0]);
              }
      }



      ====================================================
      Stack Trace:
      ====================================================

      Finalizer:
        [1] java.lang.Object.wait (native method)
        [2] java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:108), pc =
      48
        [3] java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:123), pc = 2

        [4] java.lang.ref.Finalizer$FinalizerThread.run (Finalizer.java:162), pc
      = 6
      Reference Handler:
        [1] java.lang.Object.wait (native method)
        [2] java.lang.Object.wait (Object.java:420), pc = 2
        [3] java.lang.ref.Reference$ReferenceHandler.run (Reference.java:110), pc
      = 49
      Signal dispatcher:
      Thread-0:
        [1] java.lang.Object.wait (native method)
        [2] java.lang.Object.wait (Object.java:420), pc = 2
        [3] com.sun.media.sound.EventDispatcher.dispatchEvents
      (EventDispatcher.java:144), pc = 10
        [4] com.sun.media.sound.EventDispatcher.run (EventDispatcher.java:195),
      pc = 4
      Headspace mixer frame proc thread:
        [1] java.lang.Thread.sleep (native method)
        [2] com.sun.media.sound.MixerThread.runNative (native method)
        [3] com.sun.media.sound.MixerThread.run (MixerThread.java:317), pc = 30
      (Review ID: 108571)
      ======================================================================

            Unassigned Unassigned
            kevibrow Kevin Brown
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: