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

Gtk: Closing a Stage through KeyEvents causes a NullPointerException on Linux systems

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 7u6
    • javafx
    • None
    • Kubuntu Linux 12/04 with JDK 7 Update 7, 64-bit

      Setup:
      On a simple Stage, I register an EventHandler set to handle KeyEvents.
      The EventHandler closes the Stage when triggered.

      Action:
      I press any key.

      Observed behaviour:
      The Stage closes, but a NullPointerException is thrown.
      No exception is thrown if the key was a "special" key, such as CTRL, ALT, SHIFT or any function key (F1-F12)

      Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
      at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
      at com.sun.glass.ui.gtk.GtkApplication$3$1.run(GtkApplication.java:82)
      at java.lang.Thread.run(Thread.java:722)

      Expected behaviour:
      The Stage closes. No exception is thrown.

      The attached code illustrates the behaviour.

            azvegint Alexander Zvegintsev
            ureupkejfx Urs Reupke (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: