locked
An unhandled exception of type 'System.ExecutionEngineException' occurred in mscorlib.dll RRS feed

  • Question

  • Hi,

    I am getting error "An unhandled exception of type 'System.ExecutionEngineException' occurred in mscorlib.dll" since yesterday during unit test. Before that it was working fine. Call stack contains external code and is not very helpful and there is no inner exception. I am using .NET framework 3.5 and VS 2012. Please help. Here is a call stack.

    mscorlib.dll!System.Threading.ThreadHelper.ThreadStart(object obj)
    mscorlib.dll!System.Reflection.MemberInfoSerializationHolder.MemberInfoSerializationHolder(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
    [Appdomain Transition]
    Microsoft.VisualStudio.QualityTools.Tips.UnitTest.Adapter.dll!Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestAdapter.CreateAppDomain(string codeBase)
    Microsoft.VisualStudio.QualityTools.Tips.UnitTest.Adapter.dll!Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestAdapter.GetInfoForAssembly(Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement test, bool isLoadTest)
    Microsoft.VisualStudio.QualityTools.Tips.UnitTest.Adapter.dll!Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestAdapter.Run(Microsoft.VisualStudio.TestTools.Common.ITestElement testElement, Microsoft.VisualStudio.TestTools.Execution.ITestContext testContext, bool isLoadTest)
    Microsoft.VisualStudio.QualityTools.Tips.UnitTest.Adapter.dll!Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestAdapter.Run(Microsoft.VisualStudio.TestTools.Common.ITestElement testElement, Microsoft.VisualStudio.TestTools.Execution.ITestContext testContext)
    Microsoft.VisualStudio.QualityTools.AgentObject.dll!Microsoft.VisualStudio.TestTools.Agent.AgentExecution.CallAdapterRunMethod(object obj)
    mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state)
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)

    Thanks,

    Kanchan Chauhan

    Thursday, May 1, 2014 10:43 AM

Answers

  • Hi,

    As far as I know in some cases, an application that targets the .NET Framework may throw an ExecutionEngineException exception during garbage collection when an application or the system on which it is running is under a heavy load. In this case, a workaround involves disabling concurrent garbage collection by modifying the application's configuration file. For more information, see How to: Disable Concurrent Garbage Collection.

    For more information, please see: ExecutionEngineException Class

    You can try it.

    It seems that AnkhSVN may cause this crash. Please see: http://connect.microsoft.com/VisualStudio/feedback/details/556049/unhandled-system-executionengineexception-in-mscorlib-dll-in-vs2010-rtm If you are using it, please download the fixed version as Gary Horen suggested in the microsoft connect.

    If no help, please debug the unit test to check where the exception occurred. If the code thrown the exception is dealing with a large file like this thread: http://forums.asp.net/t/1895186.aspx?Unhandled+Exception+in+mscorlib+dll then maybe it is a memory issue. Tvb2727’s solution may help you.

    If still no help, please tell us where the exception was thrown and describe your unit test scenario in details.

    In order to check whether all unit tests will get this issue, please create a new and simple one and run it.

    Bets regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Amanda Zhu Tuesday, May 6, 2014 9:07 AM
    • Marked as answer by Amanda Zhu Thursday, May 8, 2014 3:29 AM
    Friday, May 2, 2014 6:23 AM

All replies

  • Hi,

    As far as I know in some cases, an application that targets the .NET Framework may throw an ExecutionEngineException exception during garbage collection when an application or the system on which it is running is under a heavy load. In this case, a workaround involves disabling concurrent garbage collection by modifying the application's configuration file. For more information, see How to: Disable Concurrent Garbage Collection.

    For more information, please see: ExecutionEngineException Class

    You can try it.

    It seems that AnkhSVN may cause this crash. Please see: http://connect.microsoft.com/VisualStudio/feedback/details/556049/unhandled-system-executionengineexception-in-mscorlib-dll-in-vs2010-rtm If you are using it, please download the fixed version as Gary Horen suggested in the microsoft connect.

    If no help, please debug the unit test to check where the exception occurred. If the code thrown the exception is dealing with a large file like this thread: http://forums.asp.net/t/1895186.aspx?Unhandled+Exception+in+mscorlib+dll then maybe it is a memory issue. Tvb2727’s solution may help you.

    If still no help, please tell us where the exception was thrown and describe your unit test scenario in details.

    In order to check whether all unit tests will get this issue, please create a new and simple one and run it.

    Bets regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Amanda Zhu Tuesday, May 6, 2014 9:07 AM
    • Marked as answer by Amanda Zhu Thursday, May 8, 2014 3:29 AM
    Friday, May 2, 2014 6:23 AM
  • Have you resolved your issue? I just started to get one like that, only by using resharper.

    E.P.

    Tuesday, May 5, 2015 6:10 PM