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

Gtk: Error when closing JavaFX stage by escape

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 8
    • javafx
    • None

      [This bug is copied from JBS]

      A DESCRIPTION OF THE PROBLEM :
         public static void makeEscapeClosable(Node sceneRoot)
         {
            sceneRoot.setOnKeyPressed(new EventHandler<KeyEvent>()
            {
               public void handle(KeyEvent ke)
               {
                  if (ke.getCode() == KeyCode.ESCAPE)
                  {
                     ((Stage) sceneRoot.getScene().getWindow()).close();
                  }
               }
            });
         }

      VM crashes when I try to close the stage using the escape key.


      THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try

      THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Did not try

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
         public static void makeEscapeClosable(Node sceneRoot)
         {
            sceneRoot.setOnKeyPressed(new EventHandler<KeyEvent>()
            {
               public void handle(KeyEvent ke)
               {
                  if (ke.getCode() == KeyCode.ESCAPE)
                  {
                     ((Stage) sceneRoot.getScene().getWindow()).close();
                  }
               }
            });
         }

      VM crashes when I try to close the stage using the escape key.


      ERROR MESSAGES/STACK TRACES THAT OCCUR :

      [see attached error-log.txt file]


      REPRODUCIBILITY :
      This bug can be reproduced always.

            azvegint Alexander Zvegintsev
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: