FolderBrowserDialog crashes on Windows 2000?

H

hhh12347

FolderBrowserDialog crashes on my Windows 2000 computer.

Here is a C# test program:

using System;
using System.Windows.Forms;

public class InstanceForm : Form {
private FolderBrowserDialog folderBrowserDialog;
private String folderName;

private MainMenu mainMenu;
private MenuItem menuItem_Brow;
private MenuItem menuItem_File;

public InstanceForm () {
mainMenu = new MainMenu();

menuItem_File = new MenuItem();
menuItem_File.Text = "&File";

menuItem_Brow = new MenuItem();
menuItem_Brow.Text = "&Select Directory...";
menuItem_Brow.Shortcut = Shortcut.CtrlS;
menuItem_Brow.Click += new EventHandler (MenuItem_OnClick);

mainMenu.MenuItems.Add (menuItem_File);
menuItem_File.MenuItems.Add (menuItem_Brow);

folderBrowserDialog = new FolderBrowserDialog();
folderBrowserDialog.Description = "Select directory:";

Menu = mainMenu;
Text = "Test Folder Browser Dialog";
}

private void MenuItem_OnClick (object sender, EventArgs e)
{
DialogResult result;

result = folderBrowserDialog.ShowDialog ();
if (result == DialogResult.OK) {
folderName = folderBrowserDialog.SelectedPath;
}
}

[STAThread]
static void Main() {
Application.Run (new InstanceForm ());
}
}

Under Windows 2000, 4 of 10 times, it crashed first time I
tried to display the FolderBrowserDialog. I ran the tests
right after rebooting. To run the test, start the program,
and press Ctrl-S. The times it did not immediately crash,
if I kept bringing up the FolderBrowserDialog, it crashed
pretty soon. Has not crashed on Windows XP computer.

When it crashes, it's immediately after it displays the
FolderBrowserDialog. The dialog appears normal.

An error message window appears - 'The instruction at
"address" referenced memory at "address". The memory
could not be "read". The two addresses are always the same.
After closing error message window, a second error message
window appears - 'program has generated errors and will be
closed by Windows. You will need to restart the program.
An error log is being created.' The log file is a huge
binary file. No exception gets written to the console.

It would surprise me if FolderBrowserDialog crashed Windows
2000, and nobody reported it before. But I have no way of
knowing at this point. Maybe there is something flakey with
my computer. Sometimes Windows Explorer does crash on
the computer, but it's been more than a month.

To help figure this out:

*** Has FolderBrowserDialog crashing been reported before,
either on Microsoft site or elsewhere? I could not find.

*** Can you run the program under Windows 2000, bring up
dialog multiple times, and post whether it crashes or not?

*** Has anyone used FolderBrowserDialog in a desktop .NET
application, and tested it to be stable with Windows 2000?

*** If this is a known problem, is there an alternative
suggested way for selecting a directory under Windows 2000?

*** If this turns out to be a problem with my computer,
any hints what the problem might be?

Thanks,
Daniel Goldman
 
G

Guest

I too am getting this error. However, only when I drill down to certain
directories
and only on a customer's machine. I can even duplicate the customer's
directory
structure on my machine and it works fine. Both machines are running Win 2000.

I've seen that other people have had this issue but no real resolutions.
Some suggest not setting the EnableVisualStyles but I don't even do that
anyway.

So i'm non the wiser...


FolderBrowserDialog crashes on my Windows 2000 computer.

Here is a C# test program:

using System;
using System.Windows.Forms;

public class InstanceForm : Form {
private FolderBrowserDialog folderBrowserDialog;
private String folderName;

private MainMenu mainMenu;
private MenuItem menuItem_Brow;
private MenuItem menuItem_File;

public InstanceForm () {
mainMenu = new MainMenu();

menuItem_File = new MenuItem();
menuItem_File.Text = "&File";

menuItem_Brow = new MenuItem();
menuItem_Brow.Text = "&Select Directory...";
menuItem_Brow.Shortcut = Shortcut.CtrlS;
menuItem_Brow.Click += new EventHandler (MenuItem_OnClick);

mainMenu.MenuItems.Add (menuItem_File);
menuItem_File.MenuItems.Add (menuItem_Brow);

folderBrowserDialog = new FolderBrowserDialog();
folderBrowserDialog.Description = "Select directory:";

Menu = mainMenu;
Text = "Test Folder Browser Dialog";
}

private void MenuItem_OnClick (object sender, EventArgs e)
{
DialogResult result;

result = folderBrowserDialog.ShowDialog ();
if (result == DialogResult.OK) {
folderName = folderBrowserDialog.SelectedPath;
}
}

[STAThread]
static void Main() {
Application.Run (new InstanceForm ());
}
}

Under Windows 2000, 4 of 10 times, it crashed first time I
tried to display the FolderBrowserDialog. I ran the tests
right after rebooting. To run the test, start the program,
and press Ctrl-S. The times it did not immediately crash,
if I kept bringing up the FolderBrowserDialog, it crashed
pretty soon. Has not crashed on Windows XP computer.

When it crashes, it's immediately after it displays the
FolderBrowserDialog. The dialog appears normal.

An error message window appears - 'The instruction at
"address" referenced memory at "address". The memory
could not be "read". The two addresses are always the same.
After closing error message window, a second error message
window appears - 'program has generated errors and will be
closed by Windows. You will need to restart the program.
An error log is being created.' The log file is a huge
binary file. No exception gets written to the console.

It would surprise me if FolderBrowserDialog crashed Windows
2000, and nobody reported it before. But I have no way of
knowing at this point. Maybe there is something flakey with
my computer. Sometimes Windows Explorer does crash on
the computer, but it's been more than a month.

To help figure this out:

*** Has FolderBrowserDialog crashing been reported before,
either on Microsoft site or elsewhere? I could not find.

*** Can you run the program under Windows 2000, bring up
dialog multiple times, and post whether it crashes or not?

*** Has anyone used FolderBrowserDialog in a desktop .NET
application, and tested it to be stable with Windows 2000?

*** If this is a known problem, is there an alternative
suggested way for selecting a directory under Windows 2000?

*** If this turns out to be a problem with my computer,
any hints what the problem might be?

Thanks,
Daniel Goldman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top