Ribbon/RibbonWindow cause Word Crash in Ribbon V1

Aug 18, 2010 at 2:34 PM

I developed a simple Word 2007 addin using VS 2010 VSTO, in the addin I simply want to display WPF RibbonWindow like this:

            if (WpfApp == null)
                //I get same result when deleteing the following two lines
                WpfApp = new System.Windows.Application();
                WpfApp.ShutdownMode = System.Windows.ShutdownMode.OnExplicitShutdown;
            //MainWindow is derived from RibbonWindow
            WpfRibbonApplication1.MainWindow window = new WpfRibbonApplication1.MainWindow();

Everything works fine until I close Word. When closing Word, Word crashed with the following error:

Problem signature:
  Problem Event Name: CLR20r3
  Problem Signature 01: winword.exe
  Problem Signature 02: 12.0.4518.1014
  Problem Signature 03: 45428028
  OS Version: 6.1.7600.
  Locale ID: 1033

Additional information about the problem:
  LCID: 1033
  Brand: Office12Crash
  skulcid: 1033

Read our privacy statement online:

If the online privacy statement is not available, please read our privacy statement offline:

 However if I replace MainWindow with Window1 which derives from Window and contains no Ribbon, the crash won't happen. So I think Ribbon/RibbonWindow causes Word's crash. BTW, I didn't see any problem when I use WPF Ribbon preview version.

Any suggestion? Thanks in advance.