-
Bug
-
Resolution: Fixed
-
P4
-
fx2.1
-
OSX JDK 7 update 4. Using JavaFX 2.1 that shipped with it.
If you run the following code (with the environment specified below) and do "cmd-w" which should close the stage, I get the error "Invalid memory access of location 0x0 rip=0x7fff8b05be90" and the application crashes. I've seen the JVM seg fault as well. If you close the new frame just by clicking on the red close button, it works fine. Or if you do "cmd-q" it closes fine.
import javafx.application.Application;
import javafx.event.EventHandler;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.input.KeyEvent;
import javafx.stage.Stage;
public class StageTest extends Application {
@Override
public void start(Stage stage) throws Exception {
createScene();
}
public void createScene() {
final Stage stage = new Stage();
Group g = new Group();
Scene s = new Scene(g, 500, 500);
s.setOnKeyTyped(new EventHandler<KeyEvent>() {
public void handle(KeyEvent e) {
if ("w".equals(e.getCharacter()) && e.isShortcutDown()) {
stage.hide();
}
}
});
stage.setScene(s);
stage.show();
}
public static void main(String[] args) {launch(args);}
}
import javafx.application.Application;
import javafx.event.EventHandler;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.input.KeyEvent;
import javafx.stage.Stage;
public class StageTest extends Application {
@Override
public void start(Stage stage) throws Exception {
createScene();
}
public void createScene() {
final Stage stage = new Stage();
Group g = new Group();
Scene s = new Scene(g, 500, 500);
s.setOnKeyTyped(new EventHandler<KeyEvent>() {
public void handle(KeyEvent e) {
if ("w".equals(e.getCharacter()) && e.isShortcutDown()) {
stage.hide();
}
}
});
stage.setScene(s);
stage.show();
}
public static void main(String[] args) {launch(args);}
}
- relates to
-
JDK-8124449 Mac: Java quit unexpectedly" issue found when security level is "Very High"
-
- Closed
-