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

JVM crash playing AudioClip

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P2 P2
    • 8
    • 7u45
    • javafx
    • Windows 7, Windows 8, JRE7u45 32 bits at least

      When playing many AudioClip, the JVM crashes brutally.

      Don't know is it's related to playing always the same or just very frequently.
      In this test, the period is set to 50ms but with 500ms or more it crashes on not very recent PCs.
      Only tested under Windows 7 and 8.

      I think this test will work for you. If it doesn't, the mp3 file maybe involved and I'll provide it.

      Test :

      URL soundUrl = Main.class.getResource("/application/sound.mp3");
      final AudioClip clip = new AudioClip(soundUrl.toString());
      new Thread(new Runnable() {

      @Override
      public void run() {
      while (true) {
      try {
      Thread.sleep(50);
      } catch (InterruptedException e) {
      e.printStackTrace();
      }
      Platform.runLater(new Runnable() {

      @Override
      public void run() {
      clip.play();
      }
      });

      }

      }
      }).start();

            stayer Kirill Kirichenko (Inactive)
            pmarsonjfx Pitt Marson (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: