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

Details

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

    Description

      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)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Imported: