JVM crash playing AudioClip

XMLWordPrintable

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: P2
    • 8
    • Affects Version/s: 7u45
    • Component/s: javafx
    • Environment:

      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();

        1. test.mp3
          14 kB
          Kirill Kirichenko
        2. AudioClipTest.java
          1 kB
          Kirill Kirichenko

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

              Created:
              Updated:
              Resolved:
              Imported: