Why Setting ShowHelp to true for OpenFileDialog solves the shell crash issue RRS feed

  • Question

  • OS: Win 7 32bits; .NET 3.5

    I have an Visual Studio isolated shell application, when perform the File->Open operaton, a file open dialog will be opened, then no matter Cancel the dialog or select a project file and OK, then there will be crash when closing the application by clicking the x in the up right corner(or by File->Exit), this is the related code

    public sealed class XXXPackage : Package, IVsShellPropertyEvents, IVsSolutionEvents
       private void FileOpenCallback( object sender, EventArgs e )
                OpenFileDialog openFileDlg = new OpenFileDialog();
                openFileDlg.Filter = ...;
                openFileDlg.InitialDirectory = @"C:\";
                openFileDlg.FilterIndex = 1;
                if (openFileDlg.ShowDialog() == DialogResult.OK)
                { ... }

    this is the crash details:

    Problem signature:
      Problem Event Name:   BEX
      Application Name: XXX.Shell.exe // this is the name of my application 
      Application Version:
      Application Timestamp:    4ec4734b
      Fault Module Name:    AppenvStub.dll_unloaded
      Fault Module Version:
      Fault Module Timestamp:   488f172a
      Exception Offset: 6ba8bd89
      Exception Code:   c0000005
      Exception Data:   00000008
      OS Version:   6.1.7600.
      Locale ID:    1033
      Additional Information 1: 0f31
      Additional Information 2: 0f3137665bbf0bb676c8a16f3fa76e52
      Additional Information 3: 1fbc
      Additional Information 4: 1fbc7be257eee8f94e58949e00de950a
    But if I set the ShowHelp property to true before calling openFileDlg.ShowDialog, everything will be OK, it is really curious, do you know the reason why ShowHelp resolved the issue?

    OpenFileDialog openFileDlg = new OpenFileDialog();
                openFileDlg.ShowHelp = true; 

    Monday, July 9, 2012 8:16 AM

All replies

  • Crash info from the event log is rarely useful, a callstack would be better (mixed mode, symbols resolved, etc..).


    Monday, July 9, 2012 3:26 PM
  • Hi Carlos_zxl,

    I used OpenFileDialog whitout setting ShowHelp=true. It could open file dialog fine and did't crash when I  clicking the x.

    You can create a new project and try it again. Will you reproduce it?

    If the issue remains, you can use Visual Studio Setup Wizard (via Control Panel) to repair Visual Studio. It can restore the Visual Studio Installation into its original state. And you can try it again.

    If this issue remains, you can post it to

    Best regards,

    Ego [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, July 10, 2012 3:01 AM
  • Hi Carlos_zxl,

    I will mark my reply as answer.

    If you feel it is not the answer you want, please unmark it.

    Thank you for your understanding and support.

    Best regards,

    Ego [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, July 18, 2012 6:50 AM