JDK-6940843 : FileSystemView.isFileSystemRoot causing various exceptions under 6u19
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u10,6u19
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2010-04-05
  • Updated: 2011-02-16
  • Resolved: 2010-05-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u21 b05Fixed 7Resolved
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.6.0_19"
Java(TM) SE Runtime Environment (build 1.6.0_19-b04)
Java HotSpot(TM) Client VM (build 16.2-b04, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
Were seeing various exceptions from our users rooted at FileSystemView.isFileSystemRoot() under jdk 1.6.0_19 on XP, Vista, and Windows 7. We didn't get any of these under 1.6.0_18. We have automatic bug reporting for uncaught exceptions, so it seems extremely likely that these are newly introduced bugs. These are bug reports from our users and we have not seen them on our own systems, so at this point I am unable to provide a test case. Hopefully the stack dumps will reveal the problem(s).


ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.NullPointerException
	at sun.awt.shell.Win32ShellFolder2.pidlsEqual(Unknown Source)
	at sun.awt.shell.Win32ShellFolder2.equals(Unknown Source)
	at sun.awt.shell.Win32ShellFolderManager2.isFileSystemRoot(Unknown Source)
	at sun.awt.shell.ShellFolder.isFileSystemRoot(Unknown Source)
	at javax.swing.filechooser.FileSystemView.isFileSystemRoot(Unknown Source)
	at javax.swing.filechooser.WindowsFileSystemView.isTraversable(Unknown Source)
	at javax.swing.JFileChooser.isTraversable(Unknown Source)
	at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread.run0(Unknown Source)
	at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread.run(Unknown Source)

--------------------------------------------------------------------------------------------------

	at java.util.Arrays$ArrayList.<init>(Arrays.java:3357)
	at java.util.Arrays.asList(Arrays.java:3343)
	at sun.awt.shell.Win32ShellFolderManager2.isFileSystemRoot(Win32ShellFolderManager2.java:358)
	at sun.awt.shell.ShellFolder.isFileSystemRoot(ShellFolder.java:242)
	at javax.swing.filechooser.FileSystemView.isFileSystemRoot(FileSystemView.java:323)
	at javax.swing.filechooser.FileSystemView.getShellFolder(FileSystemView.java:531)
	at javax.swing.filechooser.FileSystemView.getFiles(FileSystemView.java:443)
	at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread.run0(BasicDirectoryModel.java:218)
	at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread.run(BasicDirectoryModel.java:211)


REPRODUCIBILITY :
This bug can be reproduced rarely.

Release Regression From : 6u18
The above release value was the last known release where this 
bug was not reproducible. Since then there has been a regression.

Comments
EVALUATION The Win32ShellFolder2#pidlsEqual method should check on null the result of the ShellFolder#invoke method
22-04-2010