KeyVaultClient在调试时随机引发FatalExecutionEngineError [英] KeyVaultClient throws FatalExecutionEngineError on debug randomly

查看:73
本文介绍了KeyVaultClient在调试时随机引发FatalExecutionEngineError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我调试ASP.NET MVC应用程序时, KeyVaultClient 会随机抛出异常:

When I debug ASP.NET MVC application, KeyVaultClient throws randomly exception:

托管调试助手'FatalExecutionEngineError':'运行时遇到致命错误.错误的地址位于线程0x6098上的0x59eab403.错误代码为0xc0000005.此错误可能是CLR或用户代码中不安全或不可验证的部分中的错误.该错误的常见来源包括COM-interop或PInvoke的用户封送处理错误,这些错误可能会破坏堆栈.'

Managed Debugging Assistant 'FatalExecutionEngineError' : 'The runtime has encountered a fatal error. The address of the error was at 0x59eab403, on thread 0x6098. 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.'

我使用:

  • nuget Microsoft.Azure.KeyVault 3.0.3
  • Visual Studio 2019专业版16.1.4
  • Microsoft.AspNet.WebApi 5.2.3
  • 没有托管的兼容模式
  • nuget Microsoft.Azure.KeyVault 3.0.3
  • Visual Studio 2019 Professional 16.1.4
  • Microsoft.AspNet.WebApi 5.2.3
  • don't have Managed Compatibility Mode

我熟悉这个问题,并且没有任何帮助.

I got familiar with this question and nothing helpful happens.

启用托管兼容模式后,我会得到略有不同的错误:

After enabling Managed Compatibility Mode I get slightly different error:

托管调试助手"FatalExecutionEngineError"在"C:\ Program Files(x86)\ IIS Express \ iisexpress.exe"中检测到问题.附加信息:运行时遇到致命错误.错误的地址位于线程0x54a8上的0x6c0db403.错误代码为0xc0000005.此错误可能是CLR或用户代码中不安全或不可验证的部分中的错误.此错误的常见来源包括COM-interop或PInvoke的用户封送处理错误,这些错误可能会破坏堆栈.发生

Managed Debugging Assistant 'FatalExecutionEngineError' has detected a problem in 'C:\Program Files (x86)\IIS Express\iisexpress.exe'. Additional Information: The runtime has encountered a fatal error. The address of the error was at 0x6c0db403, on thread 0x54a8. 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. occurred

推荐答案

新的托管调试引擎与以前的实现相比,使我们能够更快地添加新功能.仅一年后,Visual Studio 2013中引入的功能数量就可以看出这一点,包括托管返回值,.NET 64位编辑和 Continue,异步调用栈 增强功能,以及改进的任务"窗口等.不幸的是,新的调试引擎尚不支持某些方案,因此在这些情况下,您将不得不切换回旧版引擎.

New managed debug engine that provides us the ability to more rapidly add new features compared to the older implementation. This can be seen by the number of features introduced in Visual Studio 2013 after only a single year including Managed Return Values, .NET 64-bit Edit and Continue, Async Callstacks Enhancements, and Improved Tasks Window to name a few. Unfortunately, there are still a couple scenarios that are not supported yet with the new debug engine, so in these cases you will have to switch back to the legacy engine.

您收到的错误是由于新的调试引擎不支持的问题.

Error which you are getting is because of the issue which is not supported by new debug engine.

请尝试以下设置,直到出现相同的错误为止.

Please try below setting and see if yous till get the same error.

  • 要全局切换回旧版调试引擎,请选择工具/选项"

  • To switch back to the legacy debug engine globally, select Tools/ Options

然后在调试"/常规"选项卡上选中使用托管的兼容模式".

then check Use Managed Compatibility Mode on the Debugging / General tab.

global选项将强制将旧版引擎用于任何启动或附加.

The global option will force the legacy engine to be used for any launch or attach.

希望有帮助.

这篇关于KeyVaultClient在调试时随机引发FatalExecutionEngineError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆