JDK-5009942 : FileDialog crashes when a name is selected for editing and cancel is pressed
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.2
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-03-09
  • Updated: 2004-03-11
  • Resolved: 2004-03-11
Related Reports
Duplicate :  
Description

Name: gm110360			Date: 03/08/2004


FULL PRODUCT VERSION :
java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Windows XP Home 2002, Service Pack 1

A DESCRIPTION OF THE PROBLEM :
Run the accompanying program, or any other program that brings up a load or save dialog using FileDialog:

  final FileDialog chooser = new FileDialog(this, "Save To...", FileDialog.SAVE);
  chooser.show();

Click once on the name of an _existing_ file in the file list. Click another time to start editing the name of the file. Click Cancel to exit the dialog. This crashes the JVM.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
See above.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Don't crash.
ACTUAL -
Crash.

ERROR MESSAGES/STACK TRACES THAT OCCUR :

Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80781A3
Function=[Unknown.]
Library=C:\Program Files\Java\j2re1.4.2_03\bin\client\jvm.dll

NOTE: We are unable to locate the function name symbol for the error
      just occurred. Please refer to release documentation for possible
      reason and solutions.


Current Java thread:
	at sun.awt.windows.WToolkit.eventLoop(Native Method)
	at sun.awt.windows.WToolkit.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

Dynamic libraries:
0x00400000 - 0x00407000 	C:\Program Files\Java\j2re1.4.2_03\bin\javaw.exe
0x77F50000 - 0x77FF7000 	C:\WINDOWS\System32\ntdll.dll
0x77E60000 - 0x77F46000 	C:\WINDOWS\system32\kernel32.dll
0x77DD0000 - 0x77E5D000 	C:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x78086000 	C:\WINDOWS\system32\RPCRT4.dll
0x77D40000 - 0x77DCC000 	C:\WINDOWS\system32\USER32.dll
0x77C70000 - 0x77CB0000 	C:\WINDOWS\system32\GDI32.dll
0x77C10000 - 0x77C63000 	C:\WINDOWS\system32\MSVCRT.dll
0x08000000 - 0x08138000 	C:\Program Files\Java\j2re1.4.2_03\bin\client\jvm.dll
0x76B40000 - 0x76B6C000 	C:\WINDOWS\System32\WINMM.dll
0x5CD70000 - 0x5CD77000 	C:\WINDOWS\System32\serwvdrv.dll
0x5B0A0000 - 0x5B0A7000 	C:\WINDOWS\System32\umdmxfrm.dll
0x10000000 - 0x10007000 	C:\Program Files\Java\j2re1.4.2_03\bin\hpi.dll
0x00820000 - 0x0082E000 	C:\Program Files\Java\j2re1.4.2_03\bin\verify.dll
0x00830000 - 0x00849000 	C:\Program Files\Java\j2re1.4.2_03\bin\java.dll
0x00850000 - 0x0085D000 	C:\Program Files\Java\j2re1.4.2_03\bin\zip.dll
0x02C40000 - 0x02D4F000 	C:\Program Files\Java\j2re1.4.2_03\bin\awt.dll
0x73000000 - 0x73023000 	C:\WINDOWS\System32\WINSPOOL.DRV
0x76390000 - 0x763AC000 	C:\WINDOWS\System32\IMM32.dll
0x771B0000 - 0x772D1000 	C:\WINDOWS\system32\ole32.dll
0x5AD70000 - 0x5ADA4000 	C:\WINDOWS\System32\uxtheme.dll
0x02DC0000 - 0x02E10000 	C:\Program Files\Java\j2re1.4.2_03\bin\fontmanager.dll
0x51000000 - 0x51047000 	C:\WINDOWS\System32\ddraw.dll
0x73BC0000 - 0x73BC6000 	C:\WINDOWS\System32\DCIMAN32.dll
0x5C000000 - 0x5C0C8000 	C:\WINDOWS\System32\D3DIM700.DLL
0x74720000 - 0x74764000 	C:\WINDOWS\System32\MSCTF.dll
0x605D0000 - 0x605D8000 	C:\WINDOWS\System32\mslbui.dll
0x773D0000 - 0x77BC2000 	C:\WINDOWS\system32\SHELL32.DLL
0x70A70000 - 0x70AD5000 	C:\WINDOWS\system32\SHLWAPI.dll
0x71950000 - 0x71A34000 	C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.10.0_x-ww_f7fb5805\comctl32.dll
0x77340000 - 0x773CB000 	C:\WINDOWS\system32\comctl32.dll
0x763B0000 - 0x763F5000 	C:\WINDOWS\system32\COMDLG32.DLL
0x75F40000 - 0x75F5F000 	C:\WINDOWS\system32\appHelp.dll
0x76FD0000 - 0x77048000 	C:\WINDOWS\System32\CLBCATQ.DLL
0x77120000 - 0x771AB000 	C:\WINDOWS\system32\OLEAUT32.dll
0x77050000 - 0x77115000 	C:\WINDOWS\System32\COMRes.dll
0x77C00000 - 0x77C07000 	C:\WINDOWS\system32\VERSION.dll
0x76620000 - 0x7666E000 	C:\WINDOWS\System32\cscui.dll
0x76600000 - 0x7661B000 	C:\WINDOWS\System32\CSCDLL.dll
0x75F80000 - 0x7607C000 	C:\WINDOWS\System32\browseui.dll
0x76670000 - 0x76757000 	C:\WINDOWS\System32\SETUPAPI.dll
0x75A70000 - 0x75B15000 	C:\WINDOWS\system32\USERENV.dll
0x71C20000 - 0x71C6E000 	C:\WINDOWS\System32\netapi32.dll
0x76990000 - 0x769B4000 	C:\WINDOWS\System32\ntshrui.dll
0x76B20000 - 0x76B35000 	C:\WINDOWS\System32\ATL.DLL
0x71700000 - 0x71849000 	C:\WINDOWS\System32\shdocvw.dll
0x76C90000 - 0x76CB2000 	C:\WINDOWS\system32\imagehlp.dll
0x6D510000 - 0x6D58D000 	C:\WINDOWS\system32\DBGHELP.dll
0x76BF0000 - 0x76BFB000 	C:\WINDOWS\System32\PSAPI.DLL

Heap at VM Abort:
Heap
 def new generation   total 576K, used 357K [0x10010000, 0x100b0000, 0x104f0000)
  eden space 512K,  57% used [0x10010000, 0x10059670, 0x10090000)
  from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000)
  to   space 64K,   0% used [0x10090000, 0x10090000, 0x100a0000)
 tenured generation   total 1408K, used 117K [0x104f0000, 0x10650000, 0x14010000)
   the space 1408K,   8% used [0x104f0000, 0x1050d728, 0x1050d800, 0x10650000)
 compacting perm gen  total 4096K, used 3504K [0x14010000, 0x14410000, 0x18010000)
   the space 4096K,  85% used [0x14010000, 0x1437c180, 0x1437c200, 0x14410000)

Local Time = Sun Mar 07 11:34:11 2004
Elapsed Time = 5
#
# HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION
# Error ID : 4F530E43505002EF
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_03-b02 mixed mode)
#


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
--- Crash.java ---

package crash;
import javax.swing.*;

public class Crash {
	public Crash() {
		try {
			Frame frame = new Frame();
			frame.initComponents();
			frame.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	static public void main(String[] args) {
		new Crash();
	}
	
}

--- Frame.java ---

package crash;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class Frame extends javax.swing.JFrame {

	javax.swing.JButton openButton = new javax.swing.JButton();

	public void initComponents() throws Exception {
		openButton.setLocation(new java.awt.Point(80, 80));
		openButton.setSize(new java.awt.Dimension(130, 30));
		openButton.setText("Open Dialog");
		openButton.setVisible(true);
		getContentPane().setLayout(null);
		setLocation(new java.awt.Point(0, 0));
		setTitle("crash.Frame");

		getContentPane().add(openButton);

		setSize(new java.awt.Dimension(290, 221));

		openButton.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent e) {
				openButtonActionPerformed(e);
			}
		});
		addWindowListener(new java.awt.event.WindowAdapter() {
			public void windowClosing(java.awt.event.WindowEvent e) {
				thisWindowClosing(e);
			}
		});
	}
  
	void thisWindowClosing(java.awt.event.WindowEvent e) {
		setVisible(false);
		dispose();
		System.exit(0);
	}
	
	public void openButtonActionPerformed(java.awt.event.ActionEvent e) {
		final FileDialog chooser = new FileDialog(this, "Save To...", FileDialog.SAVE);
		chooser.show();
	}
		
}

---------- END SOURCE ----------
(Incident Review ID: 242459) 
======================================================================

Comments
EVALUATION Name: osR10079 Date: 03/10/2004 The problem is reprodusible with jdk1.4.1 and 1.4.2, but it's not reproducible with tiger b41. ###@###.### Mar 11, 2004 ====================================================================== Name: osR10079 Date: 03/11/2004 This is a duplicate of 4906972 (FileDialog - JVM Crashes on XP if Open button is clicked while renaming file ) which was fixed in tiger. ###@###.### Mar 11, 2004 ======================================================================
24-08-2004