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

NativeMediaPlayer objects are not garbage collected till shutdown hooks are called.

XMLWordPrintable

      Ensemble based reliability test failed with "OutOfMemoryError: unable to create new native thread".
      The reason is because there are 1,909 instances of com.sun.media.jfxmediaimpl.NativeMediaPlayer objects
      after 953 test iteration have been successfully passed. 953 iterations means Ensemble AdvancedMedia sample
      was ran 953 times.

      MAX_MEMORY_USAGE was 1,692,589 kb at the time the test failed.

      There are also 1,909 instances javafx.scene.media.MediaPlayerShutdownHook.
      It looks like the reason is because NativeMediaPlayer objects are not removed
      till shutdown hooks are called which happens only at shutdown time.

      Perhaps there should be programmatic way (API) to destroy mediaplayer related objects
      when MediaPlayer is not needed anymore.

            almatvee Alexander Matveev
            epavlova Ekaterina Pavlova
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: