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

[SWT, Windows] NPE on Scene$ClickCounter when maximize the window by double click title bar.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8u40
    • fx2.1.1
    • javafx
    • None
    • OS: Window XP SP3 32bit
      Java: JDK 1.7.0_05
      JavaFX: 2.1.1
      Eclipse: 3.7.2 (Build id: M20120208-0800)

      To reproduce on attached app:
       - just double click the window title bar after starting (do not click anything except title bar);
       - NPE occurs;


      Exception in runnable
      java.lang.NullPointerException
      at javafx.scene.Scene$ClickCounter.access$5000(Scene.java:2489)
      at javafx.scene.Scene$ClickGenerator.postProcess(Scene.java:2649)
      at javafx.scene.Scene$ClickGenerator.access$6200(Scene.java:2585)
      at javafx.scene.Scene$MouseHandler.process(Scene.java:2906)
      at javafx.scene.Scene$MouseHandler.process(Scene.java:2691)
      at javafx.scene.Scene$MouseHandler.access$1300(Scene.java:2657)
      at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1281)
      at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:1915)
      at com.sun.javafx.tk.quantum.EmbeddedScene$2.run(EmbeddedScene.java:175)
      at com.sun.javafx.application.PlatformImpl$3.run(PlatformImpl.java:141)
      at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
      at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
      at JavaFXonSWT.main(JavaFXonSWT.java:29)


      import javafx.embed.swt.FXCanvas;
      import javafx.scene.Scene;
      import javafx.scene.web.WebView;

      import org.eclipse.swt.SWT;
      import org.eclipse.swt.layout.FillLayout;
      import org.eclipse.swt.widgets.Display;
      import org.eclipse.swt.widgets.Shell;

      public class JavaFXonSWT
      {
      public static void main(String[] args)
      {
      Display display = new Display();
      Shell shell = new Shell(display);
      shell.setText("JavaFX on SWT");
      shell.setLayout(new FillLayout());

      FXCanvas fxcanvas = new FXCanvas(shell, SWT.NONE);
      WebView view = new WebView();
      Scene scene = new Scene(view);

      fxcanvas.setScene(scene);
      fxcanvas.setVisible(true);

      shell.open();
      while (!shell.isDisposed())
      {
      if(!display.readAndDispatch())
      {
      display.sleep();
      }
      }
      display.dispose();
      }
      }

            snorthov Steve Northover (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: