I have a routine which loads a list of Points onto a specific drawing layer.
This function works great for several hundred points.
I have just received a point list from a supervisor with roughly 30,000 points.
The routine does add the pints to the Layer successfully, however the Next Map refresh causes the following exception.
The CLR has been unable to transition from COM context 0x4e61e48 to COM context 0x4e61fb8 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.
I have tried calling the refresh both from the main Loop as well as a background worker.
Both Lock the main interface and throw the exception.
Drawing Points and Map Refresh
Hi Steve,
From the exception, we can guess it should be a thread issue but I also think the 30,000 points is too much enough to draw, especially with map suite 4.5. It should be hard for us to debug it. But we are still hoping you can send us a sample to recreate the issue.
Thanks,
Troy