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

Call of JProgressBar.getPreferredSize() causes NPE on Windows L&F and custom desktop theme

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b70
    • CPU:
      x86
    • OS:
      windows_xp, windows_7

      Backports

        Description

        Call of JProgressBar.getPreferredSize() or ProgressBarUI.getPreferredSize() causes NPE on Windows L&F and custom desktop theme. Unfortunately I am not able to reproduce it with any custom desktop theme. But we have several user reports. It causes silent exit of our NetBeans IDE installer. See for example issue http://www.netbeans.org/issues/show_bug.cgi?id=64380 and attachment given there. Here is one exception call stack example:
        Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

        at java.awt.Dimension.<init>(Dimension.java:91)
        at javax.swing.plaf.basic.BasicProgressBarUI.getPreferredSize(BasicProgressBarUI.java:757)
        at javax.swing.JComponent.getPreferredSize(JComponent.java:1615)
        at com.installshield.wizard.awt.ColumnLayout.layoutContainer(Unknown Source)
        at java.awt.Container.layout(Container.java:1401)
        at java.awt.Container.doLayout(Container.java:1390)
        at java.awt.Container.validateTree(Container.java:1473)
        at java.awt.Container.validateTree(Container.java:1480)
        at java.awt.Container.validateTree(Container.java:1480)
        at java.awt.Container.validateTree(Container.java:1480)
        at java.awt.Container.validateTree(Container.java:1480)
        at java.awt.Container.validateTree(Container.java:1480)
        at java.awt.Container.validateTree(Container.java:1480)
        at java.awt.Container.validate(Container.java:1448)
        at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:379)
        at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:113)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

        As I checked sources it seems that WindowsProgressBarUI.getPreferredInnerHorizontal() can return null.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                jmarinacsunw Joshua Marinacci (Inactive)
                Reporter:
                mslamasunw Marek Slama (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: