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

Memory leak in PaintRunnable: root.removed is not cleared

XMLWordPrintable

      ListViewMemTest which creates new ListView on each pulse and removes
      previously created one fails with OOM after ~182,000 iterations.

      Memory Analyzer shows the memory leak is in com.sun.javafx.tk.quantum.PaintRunnable
      and is because root.removed elements are not cleared. As result they occupy all heap and
      application fails with OOM.

      Please see also memory profiles attached.

      To run the test do:
      1) compile ListViewMemTest
      2) java -cp "jfxrt.jar;." -Xmx16m ListViewMemTest


      Filing this bug as critical because this memory leak in basic class,
      so any application could fail with OOM due to this issue.

        1. Ensemble_histpgram.JPG
          Ensemble_histpgram.JPG
          155 kB
        2. Ensemble_memoryleak.JPG
          Ensemble_memoryleak.JPG
          124 kB
        3. ListViewMemTest.java
          4 kB
        4. PaintRunnableMemLeak.JPG
          PaintRunnableMemLeak.JPG
          278 kB
        5. TreeViewExpandPerfTest.java
          6 kB

            msladecek Martin Sládeček
            epavlova Ekaterina Pavlova
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: