Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8095359

[Mac] JavaFX core dumps on Stage#close

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 8u60
    • 8u5
    • javafx
    • osx

      Run this app on OS-X with latest 8u40 build and it core dumps.

      This is not a regression I've tested 8u05, 8u20 and they core dump in the same way. Still I think this is a major problem because the application dies

      package application;

      import javafx.application.Application;
      import javafx.beans.Observable;
      import javafx.event.ActionEvent;
      import javafx.stage.Stage;
      import javafx.stage.StageStyle;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.scene.layout.BorderPane;


      public class Main extends Application {
      @Override
      public void start(Stage primaryStage) {
      try {
      BorderPane root = new BorderPane();
      Button b = new Button("Open");
      b.setOnAction((e) -> open(primaryStage));
      root.setCenter(b);
      Scene scene = new Scene(root,400,400);
      primaryStage.setScene(scene);
      primaryStage.show();
      } catch(Exception e) {
      e.printStackTrace();
      }
      }

      private void open(Stage primaryStage) {
      Stage utility = new Stage(StageStyle.UNDECORATED);
      BorderPane p = new BorderPane(new Button("Hello Util"));
      utility.setScene(new Scene(p,300,200));
      utility.show();
      utility.requestFocus();
      utility.focusedProperty().addListener(o -> {
      if( ! utility.isFocused() ) {
      utility.close();
      }
      });
      }

      public static void main(String[] args) {
      launch(args);
      }
      }

            morris Morris Meyer (Inactive)
            tschindl Tom Schindl
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: