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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 8u20
    • Fix Version/s: 8u40
    • Component/s: javafx
    • Environment:

      Windows 7 64bit, JDK 8u20 Build b23

      Description

      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);
      }
      }

        Attachments

        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

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: