Click here to Skip to main content
15,891,375 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.


I am developing an vb.net application in which i encounter this problem.
how can i get rid of it
Posted
Updated 26-Dec-11 23:54pm
v2

1 solution

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
 
Share this answer
 
v2
Comments
ashok_89 27-Dec-11 6:36am    
sir it worked and i have an doubt if turn off context switch deadlock and if i run the exe from the bin file will it cause any effect due to the ContextSwitchDeadLock
Fredrik Bornander 27-Dec-11 7:24am    
No it shouldn't have an affect as it's only used for debugging.
If my answer solved your problem you should mark the question as Answered so that we can close it.
ashok_89 27-Dec-11 8:34am    
thanks a lot sir

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900