Thursday, December 11, 2008

Managed Debugging Assistants - Microst .NET Framework

Symptom:
The CLR has been unable to transition from COM context 0x1a1a90 to COM context 0x1a1c00 for 60 seconds.
The thread that owns the destination context/apartment is most likely either doing a none pumping. 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.


Possible Reasions:

1. Deadlock
2. A very long operation, which worth more than 60 seconds.



Resolution:
If execution does not trap in a deadlock
It is possible to execute an very long operation by Disabling Visual Studio’s MDA (Managed Debug Assistant)
Visual Studio 2005: To disable MDA please add or edit following registry key:

1. Run > regedit
2. Navigate to > HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework
3. Set [MDA=”0”]
4. Or create MDADisable.reg file and paste following text and run it

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework]
"MDA"="0"

Please note: Always it is useful to leave MDA enable for efficient debugging. To enable MDA please set MDA=”1”


References:
Diagnosing Errors with Managed Debugging Assistants (MSDN)

No comments:

iPhone Launch Screen Sizes

iPhone Portrait iOS 8 Retina HT 5.5 = 1242 X 2208 Retna HD 4.7 = 750 X 1134 iPhone Landscape iOS 8 Retina HD 5.5  2208 X 1242 iPho...