Visual Basic 2005 - ContextSwitchDeadLock was detected when debugging

  • Thread starter Thread starter Connie
  • Start date Start date
C

Connie

Dear All,

If i step over my visual basic 2005 code, i got this error:

The CLR has been unable to transition from COM context 0x1a2008 to COM
context 0x1a2178 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.


Can anyone help with this? please


Thanks in advance.

Connie
 
Does this happen when stepping through the code or running hitting F5
and just letting it run on it's own?

If you are stepping through the code it's fairly common to get these
errors if you stop on certain lines (ones that use objects that are COM
objects or use COM interop) for extended amounts of time. Generally, if
you only get them when stepping through the code you should be ok, just
press "Continue" and go about your business. If you get them when the
code is running on it own (ie you're not stepping through) you've
probably got a big problem...

Thanks,

Seth Rowe
 
Back
Top