'ContextSwitchDeadlock' message from Managed Debugging Assistant

Discussion created by richs04 on Sep 7, 2010
Latest reply on Sep 8, 2010 by Ahmad Fattahi

I am finally debugging my project and after running for about 1.25 minutes I get the following message:


Managed Debugging Assistant 'ContextSwitchDeadlock' has detected a problem in 'C:\Development\pmax\pmax\bin\Debug\pmax.vshost.exe'.
Additional Information: The CLR has been unable to transition from COM context 0x3f01fb8 to COM context 0x3f02128 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.


If I click Continue my program continues and the message doesn't appear again.  Is there something I need to set in the SDK?  The PISDK is the only COM object in my program.