-
Bug
-
Resolution: Fixed
-
P2
-
fx2.0
There is memory leak in ProgressBar and ProgressIndicator Ensmeble samples
caused by memory leak in ProgressBar and ProgressIndicator controls (RT-16799).
Ensemble run with -Xmx64m fails with OOM after clicking on ProgressBar and ProgressIndicator
30 times. So, this is pretty noticeable memory leak which could lead to OOM pretty quickly.
It is not clear whether there is a time to fixRT-16799.
So, I propose to add the following workaround into Ensemble.
diff -r 8e58578a9bb0 ga-samples/Ensemble/src/ensemble/samples/controls/ProgressBarSample.java
--- a/ga-samples/Ensemble/src/ensemble/samples/controls/ProgressBarSample.java Wed Sep 07 15:52:13 2011 +0200
+++ b/ga-samples/Ensemble/src/ensemble/samples/controls/ProgressBarSample.java Wed Sep 07 13:40:45 2011 -0700
@@ -82,5 +82,10 @@
getChildren().addAll(p1,p2,p3,p4,p5,p6); }
+
+ @Override public void stop() {
+ // Workaround forRT-16799
+ getChildren().clear();
+ }
}
diff -r 8e58578a9bb0 ga-samples/Ensemble/src/ensemble/samples/controls/ProgressIndicatorSample.java
--- a/ga-samples/Ensemble/src/ensemble/samples/controls/ProgressIndicatorSample.java Wed Sep 07 15:52:13 2011 +0200
+++ b/ga-samples/Ensemble/src/ensemble/samples/controls/ProgressIndicatorSample.java Wed Sep 07 13:40:45 2011 -0700
@@ -34,6 +34,8 @@
import ensemble.Sample; import javafx.scene.control.ProgressIndicator;
import javafx.scene.layout.GridPane;
+import javafx.scene.Group;
+import javafx.scene.Node;
/**
* A sample that demonstrates the Progress Indicator control in various modes.
@@ -73,5 +75,13 @@
getChildren().add(g);
}
+
+ @Override public void stop() {
+ // Workaround forRT-16799
+ GridPane g = (GridPane) getChildren().get(0);
+ g.getChildren().clear();
+ getChildren().clear();
+ }
+
}
I have run Ensemble reliability test with proposed workaround and the test passed more than 300 iterations
without memory leak and memory growth.
caused by memory leak in ProgressBar and ProgressIndicator controls (
Ensemble run with -Xmx64m fails with OOM after clicking on ProgressBar and ProgressIndicator
30 times. So, this is pretty noticeable memory leak which could lead to OOM pretty quickly.
It is not clear whether there is a time to fix
So, I propose to add the following workaround into Ensemble.
diff -r 8e58578a9bb0 ga-samples/Ensemble/src/ensemble/samples/controls/ProgressBarSample.java
--- a/ga-samples/Ensemble/src/ensemble/samples/controls/ProgressBarSample.java Wed Sep 07 15:52:13 2011 +0200
+++ b/ga-samples/Ensemble/src/ensemble/samples/controls/ProgressBarSample.java Wed Sep 07 13:40:45 2011 -0700
@@ -82,5 +82,10 @@
getChildren().addAll(p1,p2,p3,p4,p5,p6); }
+
+ @Override public void stop() {
+ // Workaround for
+ getChildren().clear();
+ }
}
diff -r 8e58578a9bb0 ga-samples/Ensemble/src/ensemble/samples/controls/ProgressIndicatorSample.java
--- a/ga-samples/Ensemble/src/ensemble/samples/controls/ProgressIndicatorSample.java Wed Sep 07 15:52:13 2011 +0200
+++ b/ga-samples/Ensemble/src/ensemble/samples/controls/ProgressIndicatorSample.java Wed Sep 07 13:40:45 2011 -0700
@@ -34,6 +34,8 @@
import ensemble.Sample; import javafx.scene.control.ProgressIndicator;
import javafx.scene.layout.GridPane;
+import javafx.scene.Group;
+import javafx.scene.Node;
/**
* A sample that demonstrates the Progress Indicator control in various modes.
@@ -73,5 +75,13 @@
getChildren().add(g);
}
+
+ @Override public void stop() {
+ // Workaround for
+ GridPane g = (GridPane) getChildren().get(0);
+ g.getChildren().clear();
+ getChildren().clear();
+ }
+
}
I have run Ensemble reliability test with proposed workaround and the test passed more than 300 iterations
without memory leak and memory growth.
- is blocked by
-
JDK-8118952 Memory leak in ProgressBar and ProgressIndicator in case group.clear() is not called
-
- Closed
-