While using RedGate ANTS Performance Profiler, I get to a point in my application where I click on a RadButton. Through the event handlers that subsequently get fired, I eventually get the following error:
System.Windows.Markup.XamlParseException: The type initializer for 'Telerik.Windows.Controls.RichTextBoxUI.RadRichTextBoxRibbonUI' threw an exception. ---> System.Security.VerificationException: Operation could destabilize the runtime.
This only occurs when I'm running the profiler and so far, only in this one place. The view that it's trying to initialize doesn't explicitly use the RadRichTextBoxRibbonUI. It only uses RadWrapPanels and a RadComboBox.
Seeing how this doesn't happen during normal execution, it's hard to identify a cause within my implementation. Also, not knowing the intrinsic behavior of how the performance profiler sets stuff up, I don't know what the difference would be.
Any thoughts?
Stack Trace:
************** Exception Text **************
System.Windows.Markup.XamlParseException: The type initializer for 'Telerik.Windows.Controls.RichTextBoxUI.RadRichTextBoxRibbonUI' threw an exception. ---> System.Security.VerificationException: Operation could destabilize the runtime.
at Telerik.Windows.Controls.RichTextBoxUI.RadRichTextBoxRibbonUI..cctor() in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Documents\RichTextBoxUI\RichTextBoxUI\RadRichTextBoxRibbonUI.cs:line 32
--- End of inner exception stack trace ---
at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at Xm8.UI.EWD2.MacroItemView.InitializeComponent() in c:\sd\Trunk\xm8\Asm\UI\EWD2\MacroItemView.xaml:line 1
at Xm8.UI.EWD2.MacroItemView..ctor() in c:\sd\Trunk\xm8\Asm\UI\EWD2\MacroItemView.xaml.cs:line 34
at Xm8.UI.EWD2.MacroDialog..ctor() in c:\sd\Trunk\xm8\Asm\UI\EWD2\MacroDialog.cs:line 100
at Xm8.UI.EWD2.MacroSLView.ShowMacroDialog(IXm8State xm8State, String oldMacroCode, MacroDoc macroDoc, EDPL edpl, MacroOperation macroOperation) in c:\sd\Trunk\xm8\Asm\UI\EWD2\MacroSLView.xaml.cs:line 50
at Xm8.EWD2.MP.Model.Macro.MacroSLModel.DoShowMacroDialog(MacroDoc macroDoc) in c:\sd\Trunk\xm8\Asm\MP\EWD2.MP\Model\Macro\MacroSLModel.cs:line 382
at Xm8.EWD2.MP.Model.Macro.MacroSLModel.OnAdd() in c:\sd\Trunk\xm8\Asm\MP\EWD2.MP\Model\Macro\MacroSLModel.cs:line 351
at Core.Sys.RelayCommand.Execute(Object parameter) in c:\sd\Trunk\core\Asm\Sys\Sys\RelayCommand.cs:line 67
at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at Telerik.Windows.Controls.RadButton.OnClick() in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Buttons\RadButton.cs:line 388
[truncated]
System.Windows.Markup.XamlParseException: The type initializer for 'Telerik.Windows.Controls.RichTextBoxUI.RadRichTextBoxRibbonUI' threw an exception. ---> System.Security.VerificationException: Operation could destabilize the runtime.
This only occurs when I'm running the profiler and so far, only in this one place. The view that it's trying to initialize doesn't explicitly use the RadRichTextBoxRibbonUI. It only uses RadWrapPanels and a RadComboBox.
Seeing how this doesn't happen during normal execution, it's hard to identify a cause within my implementation. Also, not knowing the intrinsic behavior of how the performance profiler sets stuff up, I don't know what the difference would be.
Any thoughts?
Stack Trace:
************** Exception Text **************
System.Windows.Markup.XamlParseException: The type initializer for 'Telerik.Windows.Controls.RichTextBoxUI.RadRichTextBoxRibbonUI' threw an exception. ---> System.Security.VerificationException: Operation could destabilize the runtime.
at Telerik.Windows.Controls.RichTextBoxUI.RadRichTextBoxRibbonUI..cctor() in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Documents\RichTextBoxUI\RichTextBoxUI\RadRichTextBoxRibbonUI.cs:line 32
--- End of inner exception stack trace ---
at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at Xm8.UI.EWD2.MacroItemView.InitializeComponent() in c:\sd\Trunk\xm8\Asm\UI\EWD2\MacroItemView.xaml:line 1
at Xm8.UI.EWD2.MacroItemView..ctor() in c:\sd\Trunk\xm8\Asm\UI\EWD2\MacroItemView.xaml.cs:line 34
at Xm8.UI.EWD2.MacroDialog..ctor() in c:\sd\Trunk\xm8\Asm\UI\EWD2\MacroDialog.cs:line 100
at Xm8.UI.EWD2.MacroSLView.ShowMacroDialog(IXm8State xm8State, String oldMacroCode, MacroDoc macroDoc, EDPL edpl, MacroOperation macroOperation) in c:\sd\Trunk\xm8\Asm\UI\EWD2\MacroSLView.xaml.cs:line 50
at Xm8.EWD2.MP.Model.Macro.MacroSLModel.DoShowMacroDialog(MacroDoc macroDoc) in c:\sd\Trunk\xm8\Asm\MP\EWD2.MP\Model\Macro\MacroSLModel.cs:line 382
at Xm8.EWD2.MP.Model.Macro.MacroSLModel.OnAdd() in c:\sd\Trunk\xm8\Asm\MP\EWD2.MP\Model\Macro\MacroSLModel.cs:line 351
at Core.Sys.RelayCommand.Execute(Object parameter) in c:\sd\Trunk\core\Asm\Sys\Sys\RelayCommand.cs:line 67
at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at Telerik.Windows.Controls.RadButton.OnClick() in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Buttons\RadButton.cs:line 388
[truncated]