-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
jfx14
-
generic
-
generic
ADDITIONAL SYSTEM INFORMATION :
Lenovo ThinkCenter i7/ JavaFX 14 / Windows 10
A DESCRIPTION OF THE PROBLEM :
This bug was reported fixed for 8, but it can be reproduced (using the text-case in the bug report) in version 14.
REGRESSION : Last worked in version 8
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Take the testcase from BugJDK-8119136 and run it. Test case is copied and pasted from original bug report for convenience.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The bug does not reproduce.
ACTUAL -
The bug is reproduced
---------- BEGIN SOURCE ----------
public class StageTest extends Application {
Test test = new Test();
boolean b = true;
int i = 0;
int j = 0;
public void start(Stage stage) {
test.init();
Group root = new Group();
Scene scene = new Scene(root, 100, 100);
Button btn = new Button("Show");
btn.setMinSize(100, 100);
btn.setOnAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent arg0) {
try {
while (true) {
// show and count
i++;
test.show();
Thread.sleep(100);
// hide and count
j++;
test.hide();
Thread.sleep(100);
i++;
// console
System.out.println("Work fine, show count=" + i + ", hide count=" + j);
}
} catch (Exception e) {
// exception, about 15610 times
// java.lang.RuntimeException: could not create platform window
System.out.println("Exception, show count=" + i + ", hide count=" + j);
e.printStackTrace();
}
}
});
root.getChildren().add(btn);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
public class Test {
Stage stage;
Scene scene;
AnchorPane anchorpane;
public void init() {
anchorpane = new AnchorPane();
stage = new Stage();
Scene scene = new Scene(anchorpane, 655, 354);
stage.setTitle("Stage Test");
stage.setResizable(false);
stage.setScene(scene);
}
public void show() {
AnchorPane ap = new AnchorPane();
anchorpane.getChildren().add(ap);
stage.show();
}
public void hide() {
((AnchorPane) anchorpane.getChildren().get(0)).getChildren()
.clear();
anchorpane.getChildren().clear();
stage.hide();
}
}
}
---------- END SOURCE ----------
FREQUENCY : always
Lenovo ThinkCenter i7/ JavaFX 14 / Windows 10
A DESCRIPTION OF THE PROBLEM :
This bug was reported fixed for 8, but it can be reproduced (using the text-case in the bug report) in version 14.
REGRESSION : Last worked in version 8
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Take the testcase from Bug
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The bug does not reproduce.
ACTUAL -
The bug is reproduced
---------- BEGIN SOURCE ----------
public class StageTest extends Application {
Test test = new Test();
boolean b = true;
int i = 0;
int j = 0;
public void start(Stage stage) {
test.init();
Group root = new Group();
Scene scene = new Scene(root, 100, 100);
Button btn = new Button("Show");
btn.setMinSize(100, 100);
btn.setOnAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent arg0) {
try {
while (true) {
// show and count
i++;
test.show();
Thread.sleep(100);
// hide and count
j++;
test.hide();
Thread.sleep(100);
i++;
// console
System.out.println("Work fine, show count=" + i + ", hide count=" + j);
}
} catch (Exception e) {
// exception, about 15610 times
// java.lang.RuntimeException: could not create platform window
System.out.println("Exception, show count=" + i + ", hide count=" + j);
e.printStackTrace();
}
}
});
root.getChildren().add(btn);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
public class Test {
Stage stage;
Scene scene;
AnchorPane anchorpane;
public void init() {
anchorpane = new AnchorPane();
stage = new Stage();
Scene scene = new Scene(anchorpane, 655, 354);
stage.setTitle("Stage Test");
stage.setResizable(false);
stage.setScene(scene);
}
public void show() {
AnchorPane ap = new AnchorPane();
anchorpane.getChildren().add(ap);
stage.show();
}
public void hide() {
((AnchorPane) anchorpane.getChildren().get(0)).getChildren()
.clear();
anchorpane.getChildren().clear();
stage.hide();
}
}
}
---------- END SOURCE ----------
FREQUENCY : always
- duplicates
-
JDK-8273319 Exception- BaseWnd::RegisterClassEx(GlassWndClass-GlassWindowClass)
-
- Closed
-