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

JVM crash playing AudioClip

    XMLWordPrintable

    Details

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

      Windows 7, Windows 8, JRE7u45 32 bits at least

      Description

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

        Attachments

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

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported: