What is the "COM Context" mentioned in the MDS "ContextSwitchDeadlock" message?

While doing unit tests, I get the MDA shown below.

In the error message, what is a hexadecimal value called a "COM context"?

Can I determine this value for a given STA stream? If so, how?

The Managed Debugging Assistant "ContextSwitchDeadlock" detected a problem in 'C: \ Program Files \ Microsoft Visual Studio 9.0 \ Common7 \ IDE \ vstesthost.exe. Additional information: CLR could not switch from COM context 0x14cff0 to COM context 0x14d218for 60 seconds. The thread that owns the destination context / apartment is most likely either without waiting for pumping, or processing takes a very long time without pumping Windows Messages. This situation usually has a negative effect on performance and can even lead to the application becoming immunity or memory usage constantly accumulating over time. To avoid this problem, all single-threaded thread (STA) threads should use swap pending pumping (for example, CoWaitForMultipleHandles) and regularly pump messages for long-term operations.

+3
source share
4 answers

, ( mscorwks), IObjContext*, CoGetContextToken().

, , IContextCallback::ContextCallback() mscorwks!CtxEntry::EnterContextOle32BugAware(), , , mscorwks!CtxEntry::EnterContextCallback(), () . CLREvent . STA, , , MDA ContextSwitchDeadlock.

. , , , , .

+2

, , . , .

, ( GUID, / ) .

0

unit test MTA, , . COM- - , - unit test. , MDA.

0

, STA COM . , STA COM . , COM-, , , .

, 60 . ?

EDIT , COM- .NET.

http://blogs.msdn.com/cbrumme/

, . , COM , . Microsoft.

0

Source: https://habr.com/ru/post/1713139/


All Articles