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

[Quantum] Control ActionEvent is fired on Stage closing and the App hangs if modal window is then shown

XMLWordPrintable

      If a value has been selected in the DatePicker and the FileChooser has been shown, then the App hangs if you close the window (FileChooser is visible again).


      import java.time.LocalDate;
      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.DatePicker;
      import javafx.scene.layout.VBox;
      import javafx.stage.FileChooser;
      import javafx.stage.Stage;

      public class Test extends Application {

      @Override
      public void start(Stage stage) throws Exception {
      DatePicker datePicker = new DatePicker(LocalDate.now());
      stage.setScene(new Scene(new VBox(datePicker), 300, 200));
      stage.show();
      datePicker.setOnAction(e -> {
      // Is fired on Stage closing if it was fired by DatePicker once
      // -> VM crash
      new FileChooser().showOpenDialog(stage);
      });
      }

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

        1. instrument-a11y.patch
          3 kB
        2. RT-38289.02.patch
          18 kB
        3. RT-38289.03.patch
          22 kB
        4. RT-38289.patch
          2 kB
        5. RT-38289-tests.02.patch
          9 kB
        6. RT-38289-tests.03.patch
          9 kB
        7. ShowAndWaitHang.java
          4 kB
        8. ShowAndWaitHang2.java
          3 kB

            kcr Kevin Rushforth
            aliebelt Andreas Liebelt
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: