"The CLR has been unable to transition from COM context 0x1b78c0 to COM context 0x1b7a30 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 get this error message after 60 seconds of slowly stepping through some automation code in debug mode after the WebBrowser object has navigated somewhere. I ignore it since the code I'm debugging doesn't even relate to it, but half the time it causes the debugger to lose its call stack hooks or freeze up, so I have to stop and restart Visual Studio.
Is there any way to get rid of this error message, such as make it not show up for more than 60 seconds?
The WebBrowser object is instantiated in the .NET wrapper (System.Windows.Forms.WebBrowser).
Thanks,
Jon
Jon Davis - 27 Mar 2007 19:46 GMT
The solution to getting rid of this MDA message is documented here:
http://groups.google.com/group/microsoft.public.vsnet.debugging/browse_thread/th
read/1e4ac1010ae5920d/03ca1c82ea79287b
http://msdn2.microsoft.com/en-us/library/d21c150d.aspx
http://msdn2.microsoft.com/en-us/library/ms172233.aspx
However, I tried adding the registry key of MDA=0, but I still get this annoying MDA message. I tried shutting down and restarting Visual Studio, still this MDA message shows up. What the heck?
So I removed the registry key and ..
Debug->Exceptions ... (have to right-click + add "Exceptions ..." to menubar first) > Expand the MDA node and uncheck the box against contextswitchdeadlock
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=614396&SiteID=1
Problem resolved; still, I'd like to know why the registry key didn't fix this.
Jon
"The CLR has been unable to transition from COM context 0x1b78c0 to COM context 0x1b7a30 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 get this error message after 60 seconds of slowly stepping through some automation code in debug mode after the WebBrowser object has navigated somewhere. I ignore it since the code I'm debugging doesn't even relate to it, but half the time it causes the debugger to lose its call stack hooks or freeze up, so I have to stop and restart Visual Studio.
Is there any way to get rid of this error message, such as make it not show up for more than 60 seconds?
The WebBrowser object is instantiated in the .NET wrapper (System.Windows.Forms.WebBrowser).
Thanks,
Jon