JDK-6486626 : JFileChooser throws exception when trying to access a CD drive on Vista.
  • Type: Bug
  • Status: Closed
  • Resolution: Fixed
  • Component: client-libs
  • Sub-Component: javax.swing
  • Priority: P2
  • Affected Version: 1.4.2,5.0u9,6
  • OS: windows_vista
  • CPU: x86
  • Submit Date: 2006-10-26
  • Updated Date: 2011-02-16
  • Resolved Date: 2006-11-01
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 Availabitlity Release.

To download the current JDK release, click here.
Other JDK 6
1.4.2_19-revResolved 6 b104Fixed
Description
JFileChooser throws an exception when trying to access a CD drive on Vista.

This bug is NOT reproducible when you access the Vista machine through Remote Desktop. It is occuring when working on the machine locally or through a VNC connection.

Steps to reproduce:
--------------------
Launch the JFileChooserDemo,open the FileChooser, goto "MyComputer" and double click on the CD drive. 
The folowing exception occurs. 

-----------

Exception in thread "Basic L&F File Loading Thread" java.lang.InternalError: Unable to bind E:\ to parent
       at sun.awt.shell.Win32ShellFolder2.getIShellFolder(Win32ShellFolder2.java:366)
       at sun.awt.shell.Win32ShellFolder2.listFiles(Win32ShellFolder2.java:583)
       at javax.swing.filechooser.FileSystemView.getFiles(FileSystemView.java:434)
       at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread.run0(BasicDirectoryModel.java:222)
       at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread.run(BasicDirectoryModel.java:215) 

-----------

This expception is occuring in both the cases -the CD drive is empty or CD contains a CD. 

Reproduced on Vista 5520,Vista 5734. (These are the Vista builds available as of now)
with jdk 1.5.0_09 and 1.5.0_11 PIT build and also reprducible on mustang b103(traced it back on b73,b70 also).
I reproduced this bug using Remote Desktop into the lab machine chinnu.
A set of tests on various machines on Oct 27th showed this bug to be reproducible on some Vista machines and not others.  The observed failures did not correspond to the particular build of Vista installed on those machines.

A tip from Microsoft suggested that the failure might be related to whether or not the drive was also a burner.  When I reviewed the test results from the 27th, the data matched this assertion.  All machines in which the failure was observed turned out to have CD or DVD burners.  None of the machines in which the failure was not observed had burners.  We then found a machine with two optical drives: one a burner and one not a burner.  The bug could not be reproduced when accessing the non-burner but could be reproduced when accessing the burner.

Comments
EVALUATION COM should be initialized befor call to IShellFolder->bindToObject.
2006-10-27