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

Win: Closing a Stage through MouseEvents causes a NullPointerException on Windows systems

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 7u6
    • javafx
    • None
    • Windows XP, Java 7 Update 7 / 32-bit

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

      Action:
      I move the mouse over the Stage

      Observed behaviour:
      The Stage closes, but a NullPointerException is thrown.

      Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
      at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
      at com.sun.glass.ui.win.WinApplication$2$1.run(WinApplication.java:67)
      at java.lang.Thread.run(Thread.java:722)

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

      The attached code illustrates the behaviour.

            anthony Anthony Petrov (Inactive)
            ureupkejfx Urs Reupke (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: