System.ExecutionEngineException when instrumenting code

2 posts, 0 answers
  1. Devin
    Devin avatar
    9 posts
    Member since:
    Jun 2011

    Posted 06 Nov 2012 Link to this post

    During our app initialization, we invoke RadRichTextBox.SatisfyImports().  This works fine during normal runtime, but when I instrument the code via running a memory profiler (SciTech's .Net Memory Profiler), this throws a System.ExecutionEngineException.  It doesn't contain an inner exception nor any call stack data.  

    Not really understanding what is happening with SatisfyImports, nor what a System.ExecutionEngineException really means, I'm kind of at a loss.  It doesn't seem like there is anything I can do with my code to prevent this and I don't want to just suppress the exception when i profile because I need the app to behave as close to normal as possible.  Any suggestions? 
  2. Boby
    Boby avatar
    638 posts

    Posted 07 Nov 2012 Link to this post

    Hello Devin,
    RadRichTextBox uses MEF to load most of the UI (plus some other, like spell checking dictionaries) components, providing extensibility point for replacing them.  On RadRichTextBox.SatisfyImports call, MEF composition is triggered and tries to find suitable components to fill RadRichTextBox properties, for example RadRichTextBox.FindReplaceDialog. I am not sure what SciTech's .Net Memory Profiler, but maybe it somewhat changes the default MEF catalog. What you can do to check if this is the problem is to set the catalog to a list of predefined types, as described in this article.
    You can also try to play with profiler's options, as it seems that garbage collection throws such exceptions when the system is under heavy load.

    Kind regards,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top