JDK-8152426 : Memory leak in JavaFX ProgressBar with progress=-1 on Linux
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: 8u45
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86_64
  • Submitted: 2016-03-19
  • Updated: 2016-03-29
  • Resolved: 2016-03-29
Related Reports
Duplicate :  
Duplicate :  
Description
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 ----------


Comments
Kevin is right. This issue is blocked by JDK-8090322, and JDK-8090322 blocks issues JDK-8151165 and JDK-8151166, which are almost certainly duplicates of this issue. I'm closing this issue as a duplicate of those two.
29-03-2016

@Jonathan: is this related to the bug Chien is looking at with treeVisible?
24-03-2016