0

The full error I get is as follows:

The CLR has been unable to transition from COM context 0x1a8188 to COM context 0x1a8018 for 60 seconds. 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.

Any idea what this means? And how is should be solved? I tried searching on Google, but couldn't find anything of consequence, i.e. relating to my specific scenario.

Edit: The Specific scenario: 1. Integrating WPF into WinForms 2. The WPF screens are written for a plugin dll, which is dynamically loaded into the main application.

Thanks

Hasanain

Hasanain
  • 925
  • 8
  • 16
  • It would help if you described your "specific scenario". Are you debugging an app in Visual Studio? – Dour High Arch May 10 '11 at 16:26
  • This occurs during debug sessions using Visual Studio and outside of those sessions as well i.e. when I simply start the executable. The specific scenario refers to the integration of WPF into the WinForms application. – Hasanain May 10 '11 at 18:50

1 Answers1

1

This means that you created an object on thread A, then tried to use it on thread B, but thread A was really busy and the COM object requires that it be running on thread A. Try to see why thread A is busy.

Ana Betts
  • 73,868
  • 16
  • 141
  • 209
  • The application runs on a subscription model, when data arrives, an event fires, notifying the UI, which subsequently updates with the new values. I use the MVVM pattern, so updating values involves simply updating the model. So which thread in this case would you say is busy? As I don't specifically deal with threads... – Hasanain May 10 '11 at 19:04
  • Thread A could be the Winforms thread and thread B could be the WPF thread - it's hard to say without seeing your app. Are you trying to run both WPF and WinForms off the same thread? We don't know... – Ana Betts May 11 '11 at 01:01