-
Bug
-
Resolution: Fixed
-
P4
-
jfx11, jfx17, jfx19
-
b24
-
x86_64
-
linux
ADDITIONAL SYSTEM INFORMATION :
Linux Mint 21.1 Cinnamon with and without virtual machine (VMware® Workstation 16 Player 16.2.4 build-20089737)
Java: Oracle Corporation(19.0.1)
JavaFX version: 19+11
A DESCRIPTION OF THE PROBLEM :
The program crashes when some actions are performed in setOnKeyPressed triggered by pressing the escape key after closing the window.
I don't understand why the call to create an xml document causes the bug.
This bug seems to be well known (JDK-8272617, JDK-8087368, JDK-8095159, JDK-8140505, JDK-8189719, JDK-8143312, JDK-8095472, JDK-8170081, JDK-8193517), but I can reproduce it even in much simpler cases like the one in the source code example and on several computers.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Start the program and press the escape key.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The program should stop without crash.
ACTUAL -
The program generates a fatal error.
---------- BEGIN SOURCE ----------
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextField;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
public class FatalCrash extends Application {
public static void main(String[] args) {
System.out.println("Java: " + System.getProperty("java.vendor") + "(" + System.getProperty("java.version") + ")");
System.out.println("JavaFX version: " + System.getProperty("javafx.runtime.version"));
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
BorderPane bp = new BorderPane(new TextField());
bp.setOnKeyPressed(e -> {
primaryStage.close();
try {
DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
} catch (ParserConfigurationException e2) {
e2.printStackTrace();
}
});
primaryStage.setScene(new Scene(bp));
primaryStage.show();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Not known at this time
FREQUENCY : always
Linux Mint 21.1 Cinnamon with and without virtual machine (VMware® Workstation 16 Player 16.2.4 build-20089737)
Java: Oracle Corporation(19.0.1)
JavaFX version: 19+11
A DESCRIPTION OF THE PROBLEM :
The program crashes when some actions are performed in setOnKeyPressed triggered by pressing the escape key after closing the window.
I don't understand why the call to create an xml document causes the bug.
This bug seems to be well known (
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Start the program and press the escape key.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The program should stop without crash.
ACTUAL -
The program generates a fatal error.
---------- BEGIN SOURCE ----------
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextField;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
public class FatalCrash extends Application {
public static void main(String[] args) {
System.out.println("Java: " + System.getProperty("java.vendor") + "(" + System.getProperty("java.version") + ")");
System.out.println("JavaFX version: " + System.getProperty("javafx.runtime.version"));
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
BorderPane bp = new BorderPane(new TextField());
bp.setOnKeyPressed(e -> {
primaryStage.close();
try {
DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
} catch (ParserConfigurationException e2) {
e2.printStackTrace();
}
});
primaryStage.setScene(new Scene(bp));
primaryStage.show();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Not known at this time
FREQUENCY : always
- relates to
-
JDK-8268877 TextInputControlSkin: incorrect inputMethod event handler after switching skin
- Resolved
-
JDK-8272617 JavaFX fatal error when showAndWait is called in start method
- Closed
-
JDK-8087368 java runtime environment error when trying to execute showAndWait() function
- Resolved