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

NPE is thrown by JColorChooser and toolkit.createImage() in Headless mode

    Details

    • Subcomponent:
      2d
    • Resolved In Build:
      tiger
    • CPU:
      sparc
    • OS:
      solaris_8, solaris_9

      Description

      NPE is thrown by JColorChooser and toolkit.createImage() in headless mode.
      These exceptions are thrown in Tiger build 6 but not in Tiger build 2 on Linux32 and Solsparc


      The exceptions are :

      JColorChooser:
      --------------
      java.lang.NullPointerException
              at sun.awt.motif.MToolkit.createImage(MToolkit.java:395)
              at sun.awt.HeadlessToolkit.createImage(HeadlessToolkit.java:345)
              at javax.swing.colorchooser.DefaultHSBChooserPanel.initializePalettesIfNecessary(DefaultHSBChooserPanel.java:457)
              at javax.swing.colorchooser.DefaultHSBChooserPanel.buildSliderPalettePanel(DefaultHSBChooserPanel.java:431)
              at javax.swing.colorchooser.DefaultHSBChooserPanel.buildChooser(DefaultHSBChooserPanel.java:257)
              at javax.swing.colorchooser.AbstractColorChooserPanel.installChooserPanel(AbstractColorChooserPanel.java:141)
              at javax.swing.colorchooser.DefaultHSBChooserPanel.installChooserPanel(DefaultHSBChooserPanel.java:226)
              at javax.swing.plaf.basic.BasicColorChooserUI$PropertyHandler.propertyChange(BasicColorChooserUI.java:254)
              at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:264)
              at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:232)
              at javax.swing.JComponent.firePropertyChange(JComponent.java:3835)
              at javax.swing.JColorChooser.setChooserPanels(JColorChooser.java:454)
              at javax.swing.plaf.basic.BasicColorChooserUI.installUI(BasicColorChooserUI.java:79)
              at javax.swing.JComponent.setUI(JComponent.java:449)
              at javax.swing.JColorChooser.setUI(JColorChooser.java:217)
              at javax.swing.JColorChooser.updateUI(JColorChooser.java:228)
              at javax.swing.JColorChooser.<init>(JColorChooser.java:191)
              at javax.swing.JColorChooser.<init>(JColorChooser.java:179)
              at javax.swing.JColorChooser.<init>(JColorChooser.java:170)
              at TestHeadLess.<init>(TestHeadLess.java:13)
              at TestHeadLess.main(TestHeadLess.java:7)


      Toolkit.createImage
      --------------------

      java.lang.NullPointerException
              at sun.awt.motif.MToolkit.createImage(MToolkit.java:395)
              at sun.awt.SunToolkit.createImage(SunToolkit.java:498)
              at sun.awt.HeadlessToolkit.createImage(HeadlessToolkit.java:333)
              at TestHeadLess.<init>(TestHeadLess.java:25)
              at TestHeadLess.main(TestHeadLess.java:7)

      Steps to reproduce:

      Compile and run the attached code with headless mode enabled ie

      java -Djava.awt.headless=true TestHeadLess

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                campbell Christopher Campbell (Inactive)
                Reporter:
                mjoshisunw Mayank Joshi (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: