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

Gtk: Error when closing JavaFX stage by escape

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: javafx
    • Labels:
      None
    • Environment:

      Description

      [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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported: