我为什么会遇到这个问题 [英] why am i getting this problem

查看:127
本文介绍了我为什么会遇到这个问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

The CLR has been unable to transition from COM context 0x20cc70 to COM context 0x20cde0 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.



我正在开发一个vb.net应用程序,遇到了这个问题.
我如何摆脱它



I am developing an vb.net application in which i encounter this problem.
how can i get rid of it

推荐答案

没有看到您的代码,很难确切地说出它为什么会发生,但是您可以尝试添加< c> MTAThreadAttribute属性分配给 Main 方法.

您还可以在托管调试助手中关闭ContextSwitchDeadLock,但是选择Debug-> Exceptions-> Managed Debugging Assistants,然后取消选择ContextSwitchDeadlock.

希望这会有所帮助,
弗雷德里克(Fredrik)
Without seeing your code it''s hard to tell exactly why it''s happening but you can try adding the <c>MTAThreadAttribute attribute to the Main method.

You can also turn off ContextSwitchDeadLock in the Managed Debugging Assistant but selecting Debug->Exceptions->Managed Debugging Assistants and then deselect ContextSwitchDeadlock.

Hope this helps,
Fredrik


这篇关于我为什么会遇到这个问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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