Sometimes support reply: Your machine is hosed

time to read 2 min | 222 words

I just got the following stack trace as part of the profiler error reporting:

System.Windows.Markup.XamlParseException: Failed object initialization (ISupportInitialize.EndInit). Attempted to read or write protected memory. This is often an indication that other memory is corrupt.  Error at object 'HibernatingRhinos.Profiler.Client.MainWindow' in markup file 'EFProf;component/mainwindow.xaml' Line 235 Position 3.
  ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
  at MS.Win32.UnsafeNativeMethods.GetOpenFileName(OPENFILENAME_I ofn)
  at Microsoft.Win32.OpenFileDialog.RunFileDialog(OPENFILENAME_I ofn)
  at Microsoft.Win32.FileDialog.RunDialog(IntPtr hwndOwner)
  at Microsoft.Win32.CommonDialog.ShowDialog()
  at HibernatingRhinos.Profiler.Client.Model.LicensePromptPresenter.AttemptToGetLicenseFile()

At this point, I am sort of scratching my head. I am making a call to a perfectly legit Win32 method. And I am getting AccessViolationException.

Pretty much the only things that I can think of that can cause this issue are:

  • Explorer is broken.
  • There is some sort of explorer extension installed that is reacting badly to OpenFileDialog.

Either way, this is one of the cases where there doesn’t seems to be anything that I can do.