gpt4 book ai didi

c# - CLR 无法从 COM 上下文 0x3b2d70 转换到 COM 上下文

转载 作者:可可西里 更新时间:2023-11-01 07:55:56 28 4
gpt4 key购买 nike

在调试应用程序时出现以下错误。

The CLR has been unable to transition from COM context 0x3b2d70 to COM context 0x3b2ee0 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.

为什么系统会抛出这个错误。

最佳答案

我找到了解决方案

需要在 Debug->Exceptions->Managed Debugging Assistants 下取消勾选 ContextSwitchDeadlock。

取消选中 ContextSwitchDeadlock 后不会抛出错误。

关于c# - CLR 无法从 COM 上下文 0x3b2d70 转换到 COM 上下文,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4871013/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com