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

JavaFX / Swing app not starting from WebStart when Swing initialized first

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 7u25
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:

      Description

      FULL PRODUCT VERSION :
      java version " 1.7.0_25 "
      Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
      Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

      java version " 1.7.0_40-ea "
      Java(TM) SE Runtime Environment (build 1.7.0_40-ea-b38)
      Java HotSpot(TM) 64-Bit Server VM (build 24.0-b55, mixed mode)



      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      When JavaFX app contain Swing jDialog and jDialog is created first, then application is not starting from Web Start.

      The same app will start as jar.


      ERROR MESSAGES/STACK TRACES THAT OCCUR :

      java.lang.NullPointerException
      at sun.awt.windows.WWindowPeer.initActiveWindowsTracking(Unknown Source)
      at sun.awt.windows.WWindowPeer.initialize(Unknown Source)
      at sun.awt.windows.WFramePeer.initialize(Unknown Source)
      at sun.awt.windows.WComponentPeer.<init>(Unknown Source)
      at sun.awt.windows.WCanvasPeer.<init>(Unknown Source)
      at sun.awt.windows.WPanelPeer.<init>(Unknown Source)
      at sun.awt.windows.WWindowPeer.<init>(Unknown Source)
      at sun.awt.windows.WFramePeer.<init>(Unknown Source)
      at sun.awt.windows.WToolkit.createFrame(Unknown Source)
      at java.awt.Frame.addNotify(Unknown Source)
      at javax.swing.SwingUtilities$SharedOwnerFrame.addNotify(Unknown Source)
      at java.awt.Dialog.addNotify(Unknown Source)
      at java.awt.Dialog.conditionalShow(Unknown Source)
      at java.awt.Dialog.show(Unknown Source)
      at java.awt.Component.show(Unknown Source)
      at java.awt.Component.setVisible(Unknown Source)
      at java.awt.Window.setVisible(Unknown Source)
      at java.awt.Dialog.setVisible(Unknown Source)
      at error.Error.start(Error.java:23)
      at com.sun.javafx.applet.FXApplet2$1.run(Unknown Source)
      at com.sun.javafx.application.PlatformImpl$4$1.run(Unknown Source)
      at com.sun.javafx.application.PlatformImpl$4$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.javafx.application.PlatformImpl$4.run(Unknown Source)
      at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
      at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
      at com.sun.glass.ui.win.WinApplication$3$1.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Exception in runnable
      java.lang.RuntimeException: java.lang.NullPointerException
      at com.sun.javafx.applet.FXApplet2$1.run(Unknown Source)
      at com.sun.javafx.application.PlatformImpl$4$1.run(Unknown Source)
      at com.sun.javafx.application.PlatformImpl$4$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.javafx.application.PlatformImpl$4.run(Unknown Source)
      at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
      at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
      at com.sun.glass.ui.win.WinApplication$3$1.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.NullPointerException
      at sun.awt.windows.WWindowPeer.initActiveWindowsTracking(Unknown Source)
      at sun.awt.windows.WWindowPeer.initialize(Unknown Source)
      at sun.awt.windows.WFramePeer.initialize(Unknown Source)
      at sun.awt.windows.WComponentPeer.<init>(Unknown Source)
      at sun.awt.windows.WCanvasPeer.<init>(Unknown Source)
      at sun.awt.windows.WPanelPeer.<init>(Unknown Source)
      at sun.awt.windows.WWindowPeer.<init>(Unknown Source)
      at sun.awt.windows.WFramePeer.<init>(Unknown Source)
      at sun.awt.windows.WToolkit.createFrame(Unknown Source)
      at java.awt.Frame.addNotify(Unknown Source)
      at javax.swing.SwingUtilities$SharedOwnerFrame.addNotify(Unknown Source)
      at java.awt.Dialog.addNotify(Unknown Source)
      at java.awt.Dialog.conditionalShow(Unknown Source)
      at java.awt.Dialog.show(Unknown Source)
      at java.awt.Component.show(Unknown Source)
      at java.awt.Component.setVisible(Unknown Source)
      at java.awt.Window.setVisible(Unknown Source)
      at java.awt.Dialog.setVisible(Unknown Source)
      at error.Error.start(Error.java:23)
      ... 10 more


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      public class Error extends Application {

          public JDialog jDialog = new JDialog();

          @Override
          public void start(Stage primaryStage) {
              StackPane root = new StackPane();

              Scene scene = new Scene(root, 800, 650);
              //jDialog = new JDialog();
              jDialog.setVisible(true);
              jDialog.setSize(800, 650);
              
              primaryStage.setTitle( " Hello World! " );
              primaryStage.setScene(scene);
              primaryStage.show();
          
          }

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

      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      if jDialog is created in " start " method, then works fine

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                leonidr Leonid Romanov (Inactive)
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: