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

Memory leak in JavaFX ProgressBar with progress=-1 on Linux

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 8u45
    • javafx
    • x86_64
    • linux

      FULL PRODUCT VERSION :
      java version "1.8.0_74"
      Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
      Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Fedora Linux 4.4.5-300.fc23.x86_64 GNU/Linux

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      The same issue when booting with kernel-4.2.3-300.fc23.x86_64.

      A DESCRIPTION OF THE PROBLEM :
      Java process starts using more and more memory when setting ProgressBar progress to -1 until it fills both ram and swap.

      I'm getting the same memory leak with jdk 1.8.0_74, 1.8.0_73 and 1.8.0_45.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Make a simple JavaFX application with ProgressBar.
      Set ProgressBar progress value to -1 somewhere in the code.
      Start the application.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Simple JavaFX application with moving progress bar.
      ACTUAL -
      Java process gradually uses more and more memory until both raw and swap are full in just a few minutes.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      package sample;

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.ProgressBar;
      import javafx.stage.Stage;

      public class ProgressBarMemoryLeak extends Application {

          ProgressBar progress = new ProgressBar(-1);

          @Override
          public void start(Stage primaryStage) throws Exception {
              primaryStage.setScene(new Scene(progress, 100, 100));
              primaryStage.show();
          }

          public static void main(String[] args) {
              launch(args);
          }

      }
      ---------- END SOURCE ----------

            jgiles Jonathan Giles
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: