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

Entire application freezes for seconds when showing tooltip for the first time

    XMLWordPrintable

Details

    • x86_64
    • windows_7

    Description

      FULL PRODUCT VERSION :
      java version "1.8.0_40"
      Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
      Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)

      java version "1.9.0-ea"
      Java(TM) SE Runtime Environment (build 1.9.0-ea-b70)
      Java HotSpot(TM) 64-Bit Server VM (build 1.9.0-ea-b70, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Virtual Desktop Infrastructure, with VMware ESXi5.1 Update 3, but also tried VMware Tools for ESXi 5.5 to explore possible graphics driver issues.

      Java 2D disabled with "-Dsun.java2d.d3d=false".

      A DESCRIPTION OF THE PROBLEM :
      As reported in JDK-8024858 and JDK-8067348, the application freezes (the ETD thread is in RUNNING NATIVE state) when a tooltip is shown for the first time.

      I am re-submitting as it seems not to actually be a driver problem in this case, or at least not with the NVidia one specified. In this case, it seems to be a problem with the software rendering pipeline that is used when specifying the JVM argument "-Dsun.java2d.d3d=false".

      This can be reproduced by running the "Swing" class in JDK-8067348 and hovering over the checkbox. Interestingly, this always happens on the software rendering pipeline, but does not happen under the normal Java2D pipeline, which we have disabled as the VDI infrastructure running here does not contain GPUs (graphics is CPU rendered), and it was causing graphics glitches/slowness (however, we will review this policy given this issue).

      REGRESSION. Last worked in version 6u43

      ADDITIONAL REGRESSION INFORMATION:
      JDK-7123767 seems to suggest this behaviour was introduced in 6u38, which would match our observation on the problem occurring with our update to Java 8.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile and run "Swing" class from JDK-8067348 with software rendering activated using:

      -Dsun.java2d.d3d=false

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      No application freeze when hovering over the checkbox, shortly followed by
      ACTUAL -
      Hovering over checkbox made application unresponsive. This was for about 5 seconds on my dual-monitor machine, and about half that on a single monitor machine via remote desktop.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      // As per JDK-8067348

      import java.awt.Dimension;
      import java.awt.GridBagLayout;

      import javax.swing.JCheckBox;
      import javax.swing.JFrame;
      import javax.swing.JPanel;
      import javax.swing.ToolTipManager;

      public class Swing {
      private static void createAndShowGUI() {
      ToolTipManager.sharedInstance().setInitialDelay(0);
      ToolTipManager.sharedInstance().setDismissDelay(10000);

      JFrame.setDefaultLookAndFeelDecorated(true);

      JFrame frame = new JFrame("HelloWorldSwing");
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

      JPanel panel = new JPanel(new GridBagLayout());

      JCheckBox checkBox = new JCheckBox("test");
      checkBox.setToolTipText("Tooltip");

      panel.add(checkBox);
      frame.add(panel);

      frame.setPreferredSize(new Dimension(300, 300));

      frame.pack();
      frame.setVisible(true);
      }

      public static void main(String[] args) {
      javax.swing.SwingUtilities.invokeLater(new Runnable() {
      public void run() {
      createAndShowGUI();
      }
      });
      }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      It can be avoided by setting:

      -Dsun.java2d.d3d=true

      Or not specifying this at all. We will investigate this, but would need validate our applications compatibility as this was problematic in the past.

      Attachments

        Issue Links

          Activity

            People

              arapte Ambarish Rapte
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: