Hi to everybody,
In one of my programs,
while debugging, I get randomly the following message:
"ContextSwitchDeadlock was detected
Message: The CLR has been unable to transition from COM context 0x1a4a50 to COM context 0x1a48e0 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."
that I assume is .Net issue. It rises only when I do operations, like block filtering with large amount of blockreferences, or similar operations in big drawings. Actually I think I am in a single threaded apartment, same function returning a collection of blockreferences.
While developing, if I just wait, the program works, but I found out the my users think the program is stuck and simply close AutoCAD from the task manager.
Any suggestions.