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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 8
    • Affects Version/s: 7u6
    • Component/s: javafx
    • None
    • Environment:

      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.

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

              Created:
              Updated:
              Resolved:
              Imported: