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

NullPointerException at java.awt.EventQueue$2.isDispatchThreadImpl

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 8u45
    • Fix Version/s: None
    • Component/s: deploy
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_7

      Description

      FULL PRODUCT VERSION :
      JRE version 1.8.0_45-b15 Java HotSpot(TM) Client VM

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      I am using Internet Explorer 11.

      A DESCRIPTION OF THE PROBLEM :
      Our system is very large and I have created an external applet page that demonstrates the issue. The GUI presented is not fully functional, but demonstrates the error being reported.

      In a nutshell, if the page at http://www.printdesktop.com/java/isDispatchThreadImpl/isDispatchThreadImpl.html is loaded, and then the browser refresh button is clicked, the page will reload, but if you then click the chevron to snap the split-pane at the bottom left of the applet, a NullPointerException at isDispatchThreadImpl is thrown and the GUI becomes unresponsive.

      This test does not fail using JRE version 1.8.0_25-b18.

      Here is a screen-cast showing how to reproduce the error:
      http://screencast.com/t/TTeKvCcL


      REGRESSION. Last worked in version 8u25

      ADDITIONAL REGRESSION INFORMATION:
      JRE version 1.8.0_25-b18 Java HotSpot(TM) Client VM

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1) Install JRE version 1.8.0_45-b14.
      2) View screen-cast at http://screencast.com/t/TTeKvCcL for details.
      3) Visit page http://www.printdesktop.com/java/isDispatchThreadImpl/isDispatchThreadImpl.html. Be patient -- it takes about a minute to fully load this page. The bottom portion is slow.
      4) Snap the split-pane divider located on the lower-left of applet to the top.
      5) Note the UI remains functional.
      6) Click the browser refresh button to force the page to reload. It will load faster now that the jar files are cached.
      7) Attempt to snap the split-pane divider located on the lower-left of applet to the top. This is the same chevron that was successfully clicked in step 4.
      8) Note the NullPointerException at isDispatchThreadImpl stack trace in the java console.
      9) Note that the UI is now unresponsive.
      10) That's it.

      It seems that something in the JVM becomes corrupt after the page reload. I looked at the EventQueue.isDispatchThreadImpl code a little, but I do not have enough expertise to diagnose this any further. I think this is the code having the error:

      final boolean isDispatchThreadImpl() {
              EventQueue eq = this;
              pushPopLock.lock();
              try {
                  EventQueue next = eq.nextQueue;
                  while (next != null) {
                      eq = next;
                      next = eq.nextQueue;
                  }
                  if (eq.fwDispatcher != null) {
                      return eq.fwDispatcher.isDispatchThread();
                  }
                  return (Thread.currentThread() == eq.dispatchThread);
              } finally {
                  pushPopLock.unlock();
              }
      }


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      No NullPointerException at isDispatchThreadImpl and the GUI should remain functional and responsive.
      ACTUAL -
      NullPointerException at isDispatchThreadImpl as follows:
      Exception in thread "AWT-EventQueue-7" java.lang.NullPointerException
      at java.awt.EventQueue$2.isDispatchThreadImpl(Unknown Source)
      at sun.awt.SunToolkit.isDispatchThreadForAppContext(Unknown Source)
      at javax.swing.JComponent.revalidate(Unknown Source)
      at javax.swing.JLabel.setText(Unknown Source)
      at com.sdsusa.vip.ui.table.VipCellRenderer.getTableCellRendererComponent(VipCellRenderer.java:267)
      at com.sdsusa.vip.ui.table.VipCellRendererBasic.getTableCellRendererComponent(VipCellRendererBasic.java:68)
      at com.jidesoft.grid.JideTable.prepareRenderer(Unknown Source)
      at com.jidesoft.grid.CellStyleTable.prepareRenderer(Unknown Source)
      at com.jidesoft.plaf.basic.BasicJideTableUIDelegate.paintCell(Unknown Source)
      at com.jidesoft.plaf.basic.BasicJideTableUIDelegate.a(Unknown Source)
      at com.jidesoft.plaf.basic.BasicJideTableUIDelegate.paint(Unknown Source)
      at com.jidesoft.plaf.basic.BasicCellSpanTableUIDelegate.paint(Unknown Source)
      at com.jidesoft.plaf.basic.BasicTreeTableUIDelegate.paint(Unknown Source)
      at com.jidesoft.plaf.basic.BasicCellSpanTableUI.paint(Unknown Source)
      at javax.swing.plaf.ComponentUI.update(Unknown Source)
      at javax.swing.JComponent.paintComponent(Unknown Source)
      at com.jidesoft.grid.CellStyleTable.paintComponent(Unknown Source)
      at javax.swing.JComponent.paint(Unknown Source)
      at javax.swing.JComponent.paintChildren(Unknown Source)
      at javax.swing.JComponent.paint(Unknown Source)
      at javax.swing.JViewport.paint(Unknown Source)
      at javax.swing.JComponent.paintChildren(Unknown Source)
      at javax.swing.JComponent.paint(Unknown Source)
      at javax.swing.JComponent.paintChildren(Unknown Source)
      at javax.swing.JComponent.paint(Unknown Source)
      at javax.swing.JComponent.paintChildren(Unknown Source)
      at javax.swing.JComponent.paint(Unknown Source)
      at javax.swing.JComponent.paintChildren(Unknown Source)
      at javax.swing.JComponent.paint(Unknown Source)
      at javax.swing.JComponent.paintChildren(Unknown Source)
      at javax.swing.JComponent.paint(Unknown Source)
      at javax.swing.JComponent.paintChildren(Unknown Source)
      at javax.swing.JSplitPane.paintChildren(Unknown Source)
      at javax.swing.JComponent.paint(Unknown Source)
      at javax.swing.JComponent.paintToOffscreen(Unknown Source)
      at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
      at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
      at javax.swing.RepaintManager.paint(Unknown Source)
      at javax.swing.JComponent._paintImmediately(Unknown Source)
      at javax.swing.JComponent.paintImmediately(Unknown Source)
      at javax.swing.RepaintManager$4.run(Unknown Source)
      at javax.swing.RepaintManager$4.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
      at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
      at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
      at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
      at javax.swing.RepaintManager.access$1300(Unknown Source)
      at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
      at java.awt.event.InvocationEvent.dispatch(Unknown Source)
      at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
      at java.awt.EventQueue.access$500(Unknown Source)
      at java.awt.EventQueue$3.run(Unknown Source)
      at java.awt.EventQueue$3.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.run(Unknown Source)

      Also, after getting the exception, the GUI becomes unresponsive. The only way to clear this situation is to closer the brwser completely and then try again.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Exception in thread "AWT-EventQueue-7" java.lang.NullPointerException
      at java.awt.EventQueue$2.isDispatchThreadImpl(Unknown Source)
      at sun.awt.SunToolkit.isDispatchThreadForAppContext(Unknown Source)
      at javax.swing.JComponent.revalidate(Unknown Source)
      at javax.swing.JLabel.setText(Unknown Source)
      at com.sdsusa.vip.ui.table.VipCellRenderer.getTableCellRendererComponent(VipCellRenderer.java:267)
      at com.sdsusa.vip.ui.table.VipCellRendererBasic.getTableCellRendererComponent(VipCellRendererBasic.java:68)
      at com.jidesoft.grid.JideTable.prepareRenderer(Unknown Source)
      at com.jidesoft.grid.CellStyleTable.prepareRenderer(Unknown Source)
      at com.jidesoft.plaf.basic.BasicJideTableUIDelegate.paintCell(Unknown Source)
      at com.jidesoft.plaf.basic.BasicJideTableUIDelegate.a(Unknown Source)
      at com.jidesoft.plaf.basic.BasicJideTableUIDelegate.paint(Unknown Source)
      at com.jidesoft.plaf.basic.BasicCellSpanTableUIDelegate.paint(Unknown Source)
      at com.jidesoft.plaf.basic.BasicTreeTableUIDelegate.paint(Unknown Source)
      at com.jidesoft.plaf.basic.BasicCellSpanTableUI.paint(Unknown Source)
      at javax.swing.plaf.ComponentUI.update(Unknown Source)
      at javax.swing.JComponent.paintComponent(Unknown Source)
      at com.jidesoft.grid.CellStyleTable.paintComponent(Unknown Source)
      at javax.swing.JComponent.paint(Unknown Source)
      at javax.swing.JComponent.paintChildren(Unknown Source)
      at javax.swing.JComponent.paint(Unknown Source)
      at javax.swing.JViewport.paint(Unknown Source)
      at javax.swing.JComponent.paintChildren(Unknown Source)
      at javax.swing.JComponent.paint(Unknown Source)
      at javax.swing.JComponent.paintChildren(Unknown Source)
      at javax.swing.JComponent.paint(Unknown Source)
      at javax.swing.JComponent.paintChildren(Unknown Source)
      at javax.swing.JComponent.paint(Unknown Source)
      at javax.swing.JComponent.paintChildren(Unknown Source)
      at javax.swing.JComponent.paint(Unknown Source)
      at javax.swing.JComponent.paintChildren(Unknown Source)
      at javax.swing.JComponent.paint(Unknown Source)
      at javax.swing.JComponent.paintChildren(Unknown Source)
      at javax.swing.JSplitPane.paintChildren(Unknown Source)
      at javax.swing.JComponent.paint(Unknown Source)
      at javax.swing.JComponent.paintToOffscreen(Unknown Source)
      at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
      at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
      at javax.swing.RepaintManager.paint(Unknown Source)
      at javax.swing.JComponent._paintImmediately(Unknown Source)
      at javax.swing.JComponent.paintImmediately(Unknown Source)
      at javax.swing.RepaintManager$4.run(Unknown Source)
      at javax.swing.RepaintManager$4.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
      at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
      at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
      at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
      at javax.swing.RepaintManager.access$1300(Unknown Source)
      at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
      at java.awt.event.InvocationEvent.dispatch(Unknown Source)
      at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
      at java.awt.EventQueue.access$500(Unknown Source)
      at java.awt.EventQueue$3.run(Unknown Source)
      at java.awt.EventQueue$3.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.run(Unknown Source)


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Available upon request. Huge system. Difficult to provide complete source.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Do not reload the page. But once reloaded, then the JVM seems to be permanently damaged.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mcherkas Mikhail Cherkasov (Inactive)
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: