United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6486626 JFileChooser throws exception when trying to access a CD drive on Vista.
JDK-6486626 : JFileChooser throws exception when trying to access a CD drive on Vista.

Details
Type:
Bug
Submit Date:
2006-10-26
Status:
Closed
Updated Date:
2011-02-16
Project Name:
JDK
Resolved Date:
2006-11-01
Component:
client-libs
OS:
windows_vista
Sub-Component:
javax.swing
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
1.4.2,5.0u9,6
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

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



Hardware and Software, Engineered to Work Together