Help with over processing

0

I'm writing an application in C #. My application works fine by processing up to a certain amount of data. However, if this amount of data increases significantly, it enters a state called by "STOP STATE" and the following message appears:

  

Managed Debug Wizard 'ContextSwitchDeadlock': 'The CLR was unable to transition from the COM context 0x9e58a0 to the COM context 0x9e57e8 in 60 seconds.'

     

The thread that has the target context / apartment is probably waiting unpowered or processing a very long run operation without pumping Windows messages. Generally, this situation has a negative impact on performance and may even lead to the application's lack of response or the continuous accumulation of memory usage over time. '

     To avoid this problem, all threads with a single apartment on thread (STA) should use pumping wait primitives (such as CoWaitForMultipleHandles ) and routinely pumping messages during long run operations. ''

In my case, the thread is performing a very long "no pumping of Windows messages" operation.

Until then, I never had to deal with it.

How can I resolve this? It may be a snippet of code (it does not have to be in C #, any pseudo code helps).

    
asked by anonymous 12.04.2017 / 17:25

1 answer

2

Usually this occurs when you are processing a lot of time, and debugger thinks it is DeadLock but it is not necessarily! , to disable this warning simply go to the Debug menu > windows > Exception Settings search for ContextSwitchDeadlock and disable     

12.04.2017 / 18:31