JDK-6574983 : Null Pointer exception in javax.swing.ImageIcon
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-06-28
  • Updated: 2010-04-04
  • Resolved: 2007-10-25
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)



ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP Professional
Version 5.1.2600 Service Pack 2 Build 2600

EXTRA RELEVANT SYSTEM CONFIGURATION :
netbeans 5.5.1
JDK 1.6.0_01
JREL1.6.0_01

A DESCRIPTION OF THE PROBLEM :
When I try to open a project in netbeans 5.5.1, I get a nullpointerexception.
I've reported this to netbeans and it was closed as being your problem.
I've gone through your bug database and found the same stack trace and the bug was closed as "not a bug".  I'm wondering who is responsible for a correction for this problem or if it some type of environment problem.

 Following is a stack trace:

java.lang.NullPointerException
	at javax.swing.ImageIcon.<init>(ImageIcon.java:161)
	at javax.swing.ImageIcon.<init>(ImageIcon.java:147)
	at sun.swing.WindowsPlacesBar.<init>(WindowsPlacesBar.java:82)
	at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.updateUseShellFolder(WindowsFileChooserUI.java:508)
	at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installComponents(WindowsFileChooserUI.java:190)
	at javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.java:136)
	at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installUI(WindowsFileChooserUI.java:127)
	at javax.swing.JComponent.setUI(JComponent.java:668)
	at javax.swing.JFileChooser.updateUI(JFileChooser.java:1762)
	at javax.swing.JFileChooser.setup(JFileChooser.java:360)
	at javax.swing.JFileChooser.<init>(JFileChooser.java:333)
	at javax.swing.JFileChooser.<init>(JFileChooser.java:286)
	at org.netbeans.modules.project.ui.ProjectChooserAccessory$ProjectFileChooser.<init>(ProjectChooserAccessory.java:506)
	at org.netbeans.modules.project.ui.ProjectChooserAccessory$ProjectFileChooser.<init>(ProjectChooserAccessory.java:506)
	at org.netbeans.modules.project.ui.ProjectChooserAccessory.createProjectChooser(ProjectChooserAccessory.java:455)
	at org.netbeans.modules.project.ui.actions.OpenProject.actionPerformed(OpenProject.java:60)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1216)
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1257)
	at java.awt.Component.processMouseEvent(Component.java:6038)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
	at java.awt.Component.processEvent(Component.java:5803)
	at java.awt.Container.processEvent(Container.java:2058)
	at java.awt.Component.dispatchEventImpl(Component.java:4410)
	at java.awt.Container.dispatchEventImpl(Container.java:2116)
	at java.awt.Component.dispatchEvent(Component.java:4240)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
	at java.awt.Container.dispatchEventImpl(Container.java:2102)
	at java.awt.Window.dispatchEventImpl(Window.java:2429)
	at java.awt.Component.dispatchEvent(Component.java:4240)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
In netbeans, choose from the File menu Open Project.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I expected the next step to happen -- I could choose a project to open.
Note - this does not happen when selecting New Project.
ACTUAL -
java.lang.NullPointerException

ERROR MESSAGES/STACK TRACES THAT OCCUR :
stack trace and information about submitting bug to netbeans support.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
netbeans 5.5.1
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
I have not found a workaround for this.

Comments
EVALUATION We don't usually accept bugs without runnable test cases, Note: big software project as Netbeans are not test cases because bugs are possible on both sides Anyway this bug will be closed as duplicate of 6210674
25-10-2007