While debugging, my Visual Studio 2005 RTM showed an exception all of a sudden. And this was the message I got from the exception helper dialog:
The CLR has been unable to transition from COM context 0x1d0000 to COM context 0x1d0170 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.
As I was performing UnitTests on a library project and this message (and a rather large one it is :-)) talks about multithreading and messagepumps, I’m guessing it is not my code that made this happen. Most likely NUnit or Visual Sutdio itself are breaking down here..
But again, as you can see.. COM is still lurking somewhere deep down .. and pops up its head once in a while…
3 comments
I have seen this as well. I experienced it when running unit tests on a custom IXmlSerializable class – so in my case, it seems to be tied to the Xml stream objects – and of course the Xml parser still does use Xml under the hood.
Howard Dierking
Where you ever able to figure out what was causing the error? If Howard found it under the xml parser that might explain why I recieved it under the resource manager. If you have any thoughts I would love to hear them.
James McKee
I don’t remember exactly the unittests anymore, but I certainly was using the dll.config feature of NUnit. So maybe it was related to Xml too.
I haven’t had this message anymore since that day of this posting though…
Raimond Brookman