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

Exception- BaseWnd::RegisterClassEx(GlassWndClass-GlassWindowClass)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: openjfx11, openjfx16, openjfx17
    • Fix Version/s: None
    • Component/s: javafx

      Description

      ADDITIONAL SYSTEM INFORMATION :
      Using Windows 10 build 10.0.17763 Build 17763


      A DESCRIPTION OF THE PROBLEM :
      When showing and hiding the same Popup, at some point it throws a RuntimeException.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the following code:

      package test;

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.layout.StackPane;
      import javafx.stage.Popup;
      import javafx.stage.Stage;

      public class TestFX extends Application {

      @Override
      public void start(Stage primaryStage) {
      System.out.println("javafx.runtime.version: " + System.getProperties().get("javafx.runtime.version"));
      Stage stage = new Stage();
      Scene scene = new Scene(new StackPane());
      stage.setScene(scene);
      stage.show();
      Popup popOver = new Popup();
      for (int i = 0; i < 99999; i++) {
      popOver.show(scene.getRoot(), 1, 1);
      popOver.hide();
      System.out.println(i);
      }
      }

      public static void main(String[] args) {
      launch(args);
      }
      }



      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      the program would just exit after 99998 iterations
      ACTUAL -
      it crashes and following exception occurs:
      Exception in Application start method
      Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
      at javafx.base/com.sun.javafx.binding.ExpressionHelper.removeListener(ExpressionHelper.java:73)
      at javafx.base/javafx.beans.property.ReadOnlyBooleanPropertyBase.removeListener(ReadOnlyBooleanPropertyBase.java:67)
      at javafx.graphics/javafx.stage.PopupWindow.unbindOwnerFocusedProperty(PopupWindow.java:895)
      at javafx.graphics/javafx.stage.PopupWindow.doVisibleChanged(PopupWindow.java:542)
      at javafx.graphics/javafx.stage.PopupWindow$1.doVisibleChanged(PopupWindow.java:111)
      at javafx.graphics/com.sun.javafx.stage.PopupWindowHelper.visibleChangedImpl(PopupWindowHelper.java:63)
      at javafx.graphics/com.sun.javafx.stage.WindowHelper.visibleChanged(WindowHelper.java:77)
      at javafx.graphics/javafx.stage.Window$12.invalidated(Window.java:1160)
      at javafx.base/javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110)
      at javafx.base/javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:145)
      at javafx.graphics/javafx.stage.Window.setShowing(Window.java:1187)
      at javafx.graphics/javafx.stage.Window.hide(Window.java:1212)
      at javafx.graphics/javafx.stage.PopupWindow.hide(PopupWindow.java:486)
      at javafx.graphics/javafx.stage.PopupWindow.lambda$new$0(PopupWindow.java:147)
      at javafx.base/javafx.beans.value.WeakChangeListener.changed(WeakChangeListener.java:86)
      at javafx.base/com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:181)
      at javafx.base/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
      at javafx.graphics/javafx.scene.Node$TreeShowingPropertyReadOnly.invalidate(Node.java:8479)
      at javafx.graphics/javafx.scene.Node.setTreeShowing(Node.java:8436)
      at javafx.graphics/javafx.scene.Node.updateTreeShowing(Node.java:8427)
      at javafx.graphics/javafx.scene.Node.lambda$new$2(Node.java:1010)
      at javafx.base/com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:360)
      at javafx.base/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
      at javafx.base/javafx.beans.property.ReadOnlyBooleanPropertyBase.fireValueChangedEvent(ReadOnlyBooleanPropertyBase.java:78)
      at javafx.base/javafx.beans.property.ReadOnlyBooleanWrapper.fireValueChangedEvent(ReadOnlyBooleanWrapper.java:103)
      at javafx.base/javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:111)
      at javafx.base/javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:145)
      at javafx.graphics/javafx.stage.Window.setShowing(Window.java:1187)
      at javafx.graphics/javafx.stage.Window.hide(Window.java:1212)
      at javafx.graphics/com.sun.javafx.stage.WindowPeerListener.closed(WindowPeerListener.java:105)
      at javafx.graphics/com.sun.javafx.tk.quantum.GlassWindowEventHandler.run(GlassWindowEventHandler.java:144)
      at javafx.graphics/com.sun.javafx.tk.quantum.GlassWindowEventHandler.run(GlassWindowEventHandler.java:40)
      at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
      at javafx.graphics/com.sun.javafx.tk.quantum.GlassWindowEventHandler.lambda$handleWindowEvent$4(GlassWindowEventHandler.java:176)
      at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:412)
      at javafx.graphics/com.sun.javafx.tk.quantum.GlassWindowEventHandler.handleWindowEvent(GlassWindowEventHandler.java:174)
      at javafx.graphics/com.sun.glass.ui.Window.handleWindowEvent(Window.java:1336)
      at javafx.graphics/com.sun.glass.ui.Window.notifyDestroy(Window.java:1250)
      at javafx.graphics/com.sun.glass.ui.win.WinWindow._close(Native Method)
      at javafx.graphics/com.sun.glass.ui.Window.close(Window.java:352)
      at javafx.graphics/com.sun.glass.ui.win.WinWindow.close(WinWindow.java:316)
      at javafx.graphics/com.sun.glass.ui.Application.terminate(Application.java:394)
      at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$exit$13(QuantumToolkit.java:831)
      at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithRenderLock(QuantumToolkit.java:430)
      at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.exit(QuantumToolkit.java:827)
      at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$tkExit$16(PlatformImpl.java:614)
      at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:474)
      at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:447)
      at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
      at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:446)
      at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
      at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
      at java.base/java.lang.Thread.run(Thread.java:831)
      java.lang.reflect.InvocationTargetException
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:567)
      at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:464)
      at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:567)
      at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1071)
      Caused by: java.lang.RuntimeException: Exception in Application start method
      at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:900)
      at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
      at java.base/java.lang.Thread.run(Thread.java:831)
      Caused by: java.lang.RuntimeException: could not create platform window
      at javafx.graphics/com.sun.glass.ui.Window.<init>(Window.java:294)
      at javafx.graphics/com.sun.glass.ui.win.WinWindow.<init>(WinWindow.java:54)
      at javafx.graphics/com.sun.glass.ui.win.WinApplication.createWindow(WinApplication.java:219)
      at javafx.graphics/com.sun.javafx.tk.quantum.WindowStage.initPlatformWindow(WindowStage.java:201)
      at javafx.graphics/com.sun.javafx.tk.quantum.WindowStage.init(WindowStage.java:143)
      at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.createTKPopupStage(QuantumToolkit.java:678)
      at javafx.graphics/javafx.stage.PopupWindow.doVisibleChanging(PopupWindow.java:514)
      at javafx.graphics/javafx.stage.PopupWindow$1.doVisibleChanging(PopupWindow.java:107)
      at javafx.graphics/com.sun.javafx.stage.PopupWindowHelper.visibleChangingImpl(PopupWindowHelper.java:57)
      at javafx.graphics/com.sun.javafx.stage.WindowHelper.visibleChanging(WindowHelper.java:73)
      at javafx.graphics/javafx.stage.Window$12.invalidated(Window.java:1065)
      at javafx.base/javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110)
      at javafx.base/javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:145)
      at javafx.graphics/javafx.stage.Window.setShowing(Window.java:1187)
      at javafx.graphics/javafx.stage.Window.show(Window.java:1202)
      at javafx.graphics/javafx.stage.PopupWindow.showImpl(PopupWindow.java:472)
      at javafx.graphics/javafx.stage.PopupWindow.show(PopupWindow.java:417)
      at test.TestFX.start(TestFX.java:20)
      at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
      at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:474)
      at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:447)
      at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
      at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:446)
      at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
      at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
      ... 1 more
      Exception running application test.TestFX


      ---------- BEGIN SOURCE ----------
      package test;

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.layout.StackPane;
      import javafx.stage.Popup;
      import javafx.stage.Stage;

      public class TestFX extends Application {

      @Override
      public void start(Stage primaryStage) {
      System.out.println("javafx.runtime.version: " + System.getProperties().get("javafx.runtime.version"));
      Stage stage = new Stage();
      Scene scene = new Scene(new StackPane());
      stage.setScene(scene);
      stage.show();
      Popup popOver = new Popup();
      for (int i = 0; i < 99999; i++) {
      popOver.show(scene.getRoot(), 1, 1);
      popOver.hide();
      System.out.println(i);
      }
      }

      public static void main(String[] args) {
      launch(args);
      }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Can't find anyone

      FREQUENCY : always


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kcr Kevin Rushforth
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: