Reputation: 284
I have an issue with application in C#. When I try to call ShowDialog on SaveFileDialog object application crashes. The code which causes crash is in try catch block, but since it crahses application I'm unable to get stack trace.
try
{
SaveFileDialog sfd = new SaveFileDialog();
sfd.AddExtension = true;
sfd.RestoreDirectory = true;
string ext = Path.GetExtension(this.title);
sfd.Filter = "File type (" + ext + ")|*" + ext;
sfd.FileName = Program.NormalizeTitle(this.title);
DialogResult ds = sfd.ShowDialog(this);
}
catch (Exception ex)
{
MessageBox.Show("Exception: " + ex.StackTrace);
}
This is the error description:
Faulting application name: test.exe, version: 1.0.0.1, time stamp: 0x56585459
Faulting module name: wkscli.dll, version: 6.1.7601.17514, time stamp: 0x4ce795a7
Exception code: 0xc0000005
Fault offset: 0x00001e8f
Faulting process id: 0x%9
Faulting application start time: 0x%10
Faulting application path: %11
Faulting module path: %12
Sometimes faulting module name is Ntshrui.dll.
This code works fine for years on any other machine. It happend on Windows 2008 R2 with .Net 2.0 and 4.0. What could be the problem?
Upvotes: 0
Views: 1764
Reputation: 176159
The exception code 0xc0000005
means access violation. As it happens when the save as dialog is displayed the exception could be caused by an Explorer shell extension.
Using Autoruns from Sysinternals, or Nirsoft's ShellExView you can see which shell extensions are installed on your system, and you can disable them one-by-one.
Upvotes: 2