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

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 7u6
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:

      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

            • Assignee:
              Unassigned
              Reporter:
              art Artem Ananiev
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Imported: