Problem with Context Switch Deadlock
-
Hi All, While am working for more that 5min.am getting aproblem as below... The CLR has been unable to transition from COM context 0x192008 to COM context 0x192158 for 60seconds. 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. so plz help me how to solve the problem to run the application for more than 20min. Thanks in advance, Rgds, cnr369.
-
Hi All, While am working for more that 5min.am getting aproblem as below... The CLR has been unable to transition from COM context 0x192008 to COM context 0x192158 for 60seconds. 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. so plz help me how to solve the problem to run the application for more than 20min. Thanks in advance, Rgds, cnr369.
The error message means that one of your STA apartments is not pumping i.e it has blocked without processing incoming messages. Look for methods with the [STAThread] attribute and check if they are pumping.
Regards Senthil [MVP - Visual C#] _____________________________ My Blog | My Articles | WinMacro