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

ViewEvent.MOVE handler in GlassViewEventHandler throws NPE if window is closed on full-screen exit

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 7u6
    • javafx

      Run the following code:

              stage.fullScreenProperty().addListener(new InvalidationListener()
              {
                  @Override
                  public void invalidated(Observable observable)
                  {
                      if (!stage.isFullScreen()) {
                          stage.close();
                      }
                  }
              });

      It causes NPE thrown from GlassViewEventHandler:

      java.lang.IllegalStateException: The view has already been closed
      at com.sun.glass.ui.View.checkNotClosed(View.java:393)
      at com.sun.glass.ui.View.getX(View.java:421)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleViewEvent(GlassViewEventHandler.java:548)
      at com.sun.glass.ui.View.handleViewEvent(View.java:495)
      at com.sun.glass.ui.View.handleViewEvent(View.java:824)
      at com.sun.glass.ui.win.WinView._exitFullscreen(Native Method)
      at com.sun.glass.ui.View.exitFullscreen(View.java:763)
      at com.sun.javafx.tk.quantum.WindowStage.applyFullScreen(WindowStage.java:510)
      at com.sun.javafx.tk.quantum.WindowStage.setFullScreen(WindowStage.java:539)
      at com.sun.javafx.tk.quantum.WindowStage.exitFullScreen(WindowStage.java:463)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:111)
      at com.sun.glass.ui.View.handleKeyEvent(View.java:502)
      at com.sun.glass.ui.View.notifyKey(View.java:936)
      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:62)
      at java.lang.Thread.run(Thread.java:722)

            Unassigned Unassigned
            art Artem Ananiev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Imported: