JDK-8075516 : Deleting a file from either the open or save java.awt.FileDialog hangs.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7u80,8u40,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_8
  • CPU: x86
  • Submitted: 2015-03-13
  • Updated: 2018-08-31
  • Resolved: 2016-06-22
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 7 JDK 8 JDK 9
7u211Fixed 8u121Fixed 9 b127Fixed
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b25)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.3.9600]

EXTRA RELEVANT SYSTEM CONFIGURATION :
Tested on 2 Windows 8.1 64-bit VMs and a native install.

A DESCRIPTION OF THE PROBLEM :
When you bring up the awt FileDialog if you try to delete an existing file the program will hang until force closed. If you create a new file from the dialog you can delete files without any problems.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the attached source code and it'll bring up a FileDialog. Select an existing file and hit delete. The program will now hang until you force close it.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Prints the filepath specified.
ACTUAL -
Program hangs and must be force closed. It will also eat up a lot of CPU usage while hanging.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
No log file as program hangs instead of crashing.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ---------- 
import java.awt.Frame; 
import java.awt.FileDialog; 

public class test { 
public static void main(String[] args) { 
final FileDialog fd = new FileDialog((Frame)null, "Save As"); 
fd.setMode(FileDialog.SAVE); 
fd.setVisible(true); 
if (fd.getFile() == null) { 
return; 
} 
String rv = fd.getDirectory() + fd.getFile(); 
System.out.println(rv); 
} 
} 
---------- END SOURCE ---------- 

Comments
The root cause is the Open/SaveFileDialog started to call COM server since Windows 8.
19-05-2016

reproduced on 8.1
03-04-2015

I just forgot to set "assignee" to unassigned during bug migration to JBS. So I have no plans for this bug.
25-03-2015

Mikhail, do you plan to fix it? plan to back port to 8u60?
24-03-2015