Debug Problems – ContextSwitchDeadlock –

While debugging an application written in C #, I found the following error, Context “ContextSwitchDeadlock”.

The process waits to load a file in txt.

ContextSwitchDeadlock detected

Message: The CLR could not make the COM context transition 0x39be68 to COM context 0x39bfd8 for 60 seconds. It is likely that the thread that contains the destination context or apartment is waiting without providing messages or processing a very long execution operation that does not provide Windows messages. Normally, this situation has a negative impact on performance and may cause the application to not respond or to continually accumulate memory usage. To avoid this problem, all single-threaded apartment threads (STAs) should use wait primitives that provide messages (such as CoWaitForMultipleHandles) and provide messages regularly during long execution operations.

To fix it go to options Debug -> Exceptions -> Managed Debug Assistants

ContextSwitchDeadlock

CC BY-NC-ND 4.0 Debug Problems – ContextSwitchDeadlock – by QualityInfoSolutions is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

Contáctenos