JDK-6954618 : Java NPE when starting JFileChooser
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6u10
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2010-05-21
  • Updated: 2012-09-06
  • Resolved: 2010-07-13
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
1.6.20

ADDITIONAL OS VERSION INFORMATION :
Windows XP, all current SP & patches

A DESCRIPTION OF THE PROBLEM :
I get a traceback:

java.lang.NullPointerException
sun.awt.shell.Win32ShellFolder2.pidlsEqual(Win32ShellFolder2.java:498)
sun.awt.shell.Win32ShellFolder2.equals(Win32ShellFolder2.java:491)
sun.awt.shell.Win32ShellFolderManager2.isFileSystemRoot(Win32ShellFolderManager2.java:350)
sun.awt.shell.ShellFolder.isFileSystemRoot(ShellFolder.java:242)
javax.swing.filechooser.FileSystemView.isFileSystemRoot(FileSystemView.java:323)
javax.swing.filechooser.WindowsFileSystemView.isTraversable(FileSystemView.java:657)
javax.swing.JFileChooser.isTraversable(JFileChooser.java:1561)
javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread.run0(BasicDirectoryModel.java:232)
javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread.run(BasicDirectoryModel.java:211)

when preparing to initialise a JFileChooser in the context of a tabbed pane. The stack shows no application code active at this point.

The NPE happens intermittently (but frequently). This problem did not affect us when using 1.6.17 (we did not use intermediate versions)

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Initialise a JFileChooser contained in a Tabbed Pane

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
File Chooser to be rendered
ACTUAL -
NPE on about 3 occasions out of 4. The target test machine has multi-core CPU

ERROR MESSAGES/STACK TRACES THAT OCCUR :
As above

REPRODUCIBILITY :
This bug can be reproduced often.

---------- BEGIN SOURCE ----------
not relevant: the error stack shows only Java native components
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Revert to earlier Java release.

Please note that this problem has been found in the context of a product that we have developed and support. We will need to make our customers aware of the error and this report's existence, and the timeliness of a fix.