Managed Debugging Assistant 'FatalExecutionEngineError'


I'm getting below error:


Managed Debugging Assistant 'FatalExecutionEngineError' has detected a problem in 'C:\Users\App\App.exe'. Additional Information: The runtime has encountered a fatal error. The address of the error was at 0xf5b029e1, on thread 0x72bc. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.


I get the above error when i execute this statement while debugging.

LoggerHandler.Info("Executed " & iterations.ToString & " iterations on " & max_processors & " cores in " & Format((Now() - time).TotalSeconds, "0.0") & " seconds.")


Changing to use "Managed Compatibility Mode" is what fixed the error for me in Visual Studio 2015:


Tools menu >Options > Debugging > General > "Use Managed Compatibility Mode"


<a href="https://i.stack.imgur.com/VVafW.png" rel="nofollow"><img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/VVafW.png" data-original="https://i.stack.imgur.com/VVafW.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

This <a href="https://blogs.msdn.microsoft.com/visualstudioalm/2013/10/16/switching-to-managed-compatibility-mode-in-visual-studio-2013/" rel="nofollow">Microsoft blog</a> describes what this setting does in a bit more detail.


This resolved my issue:


Tools -> options -> <a href="https://i.stack.imgur.com/vMlA8.png" rel="nofollow">IntelliTrace</a> -> General


and check "Events Only" option


  • detecting image keypoints --javaCV --EXCEPTION_ACCESS_VIOLATION
  • fstream getline() Unhandled exception
  • C string at the end of '\\0'
  • Using cvGet2D function - opencv
  • Can I close the CMD window that opened with subprocess.Popen in Python?
  • What is “verifiable managed assembly”
  • TIdHttpServer freezing when Active set to False after Windows Update
  • Anyone installed rails 3 on solaris 10x86
  • Android-Ndk vs Cross-Compile? Both work ,What was the need of Android NDK then ?
  • Copying text from one EditText box to another in the same Activity on the fly, character-by-characte
  • Is it possible to reduce the size of the simplest Android app?
  • How to programmatically detect if a bitmap has alpha channel?
  • How can I accept “unsafe” HTTP response headers in a Windows Phone/Store app?
  • Content Security Policy Internet explorer error
  • What are the use cases of dlopen vs standard dynamic linking?
  • iPhone - UIWebView multiple locks
  • How to get to older Xcode beta version?
  • Safari PHP form submission -file upload hangs
  • Can a variable be stored within an image or div tag?
  • XNU incudes in Kext
  • PHP + XML - how to rename and delete XML elements using SimpleXML or DOMDocument?
  • Less Conflicting Session Manager for Zope 2
  • “mvn clean generate-source” could not resolve dependencies
  • WPF Template Binding in ToggleButton UserControl
  • Pycharm: Marking a folder as 'sources root' is not recursive for subfolders
  • Cast between interfaces whose interface signatures are same
  • Does Mobilefirst provide a provision to access web services directly?
  • Installed module is empty
  • Installing Hadoop, Java Exception about illegal characters at index 7?
  • Different response to non-authenticated users and AJAX calls
  • RectangularRangeIndicator format like triangular using dojo
  • Statically linking a C++ library to a C# process using CLI or any other way
  • Acquiring multiple attributes from .xml file in c#
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • Authorize attributes not working in MVC 4
  • How can I remove ASP.NET Designer.cs files?
  • Busy indicator not showing up in wpf window [duplicate]
  • Python/Django TangoWithDjango Models and Databases
  • java string with new operator and a literal
  • Net Present Value in Excel for Grouped Recurring CF