JDK-6533284 : JFileChooser crash when browsing to mounted drive
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-03-12
  • Updated: 2011-02-16
  • Resolved: 2011-02-07
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105
Java HotSpot(TM) Clinet VM (build 1.6.0-b105, mixed mode, sharing)

FULL OS VERSION :
Microsoft Windows XP Version 5.1.2600

EXTRA RELEVANT SYSTEM CONFIGURATION :
System has several drives including a virtual CD drive and large hard disk located at G:

A DESCRIPTION OF THE PROBLEM :
When using the Swing FileChooser and browsing ONLY to G: or G:\ an EXCEPTION_FLT_STACK_CHECK occurs.  Does not occur when accessing any other drive, or directories located on the G drive.

THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: No

THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Did not try

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Since this is only reproducible on ONE of my drives, I don't know if it can be reproduced elsewhere.

Steps:
- On a Windows XP SP 2 machine mount a large drive with many files and directories at G.
- Run the below code, and either select the G Drive from the file chooser's drop-down list, or type "G:" in the path box and press [ENTER], or type "G:\" in the path box and press [ENTER].

EXPECTED VERSUS ACTUAL BEHAVIOR :
Expected:  Contents of my G drive to display in the JFileChooser dialog.
Actual:  Error written to console; log below generated.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Attached Seperatly

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import javax.swing.*;
import java.awt.event.*;

public class CrashTestApplication extends JFrame {
	private static final long serialVersionUID = -7149924575614173234L;
	
	public CrashTestApplication() {
		super("Crash Test Application");
		
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        this.setSize(350, 300);
        
        JButton openFileChooser = new JButton();
        openFileChooser.setText("Press to open file chooser");
        openFileChooser.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				buttonPressed();
			}
        });
        
        this.add(openFileChooser);
		
    }
	
	private void buttonPressed() {
		JFileChooser fc = new JFileChooser();
		fc.showOpenDialog(this);
	}
	
	private static void initLookAndFeel() {
		try {
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		} catch (ClassNotFoundException e) {
			System.err.println("Couldn't find class for specified look and feel");
			System.err.println("Did you include the L&F library in the class path?");
			System.err.println("Using the default look and feel.");
		} catch (UnsupportedLookAndFeelException e) {
			System.err.println("Can't use the specified look and feelon this platform.");
			System.err.println("Using the default look and feel.");
		} catch (Exception e) {
			System.err.println("Couldn't get specified look and feel, for some reason.");
			System.err.println("Using the default look and feel.");
			e.printStackTrace();
		}
	}
	
	private static void createAndShowGUI() {
		initLookAndFeel();
		JFrame.setDefaultLookAndFeelDecorated(true);
		
		(new CrashTestApplication()).setVisible(true);
    }
	
	public static void main(String[] args) {
		// Create and show the GUI on the event-dispatch thread.  (For thread safety.)
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				createAndShowGUI();
			}
		});
	}

}

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
With the -Xint flag the error does not occur.

Comments
PUBLIC COMMENTS Nobody gives information about the bug a long time. I'm closing the bug.
07-02-2011

PUBLIC COMMENTS Unfortunately I can't reproduce the problem. Could you please attach a log to the bug? You also can take a look at CR 6457572, is that your problem?
16-06-2010