Hello,
I'm trying to track down some "UI hangs" when using MC with my plug-in. Specificaly, I have a System.Windows.Forms.Timer(); that is scheduled to go off every 3 seconds, but sometimes the UI freezes, and the timer is not triggered for many seconds.
Currently I only have suspicions about what is causing the MC UI to become unresponsive. My primary suspicion is that MC assumes certain APIs from the plug-in SDK are called from the "correct" thread. Calling some MC APIs in the "wrong" thread results in wierd stuff happening. Specifically, the UI is more likely to "hang".
As a result, much of my plug-in is wrapped in Winform InvokeRequired/Invokes to push processing into the main UI thread. The only API that is not wrapped religiously is GetActiveZone().
Some questions, (bare in mind I'm not a windows expert):
* Does MC assume plugins are run in a multi-threaded appartment, or single threaded appartment?
* What threads does MC have, and are there restrictions on when/where MC plugin APIs are called?
* It is possible that the behaviour I'm seeing is not being caused by my plug-in at all - my media lives on a network drive, and the "UI freezes" happen more often during scanning, and building thumbnails. Is it possible that MC's UI sometimes wedges waiting for completion of extensive network activity? Does anyone else experience this sort of behaviour?
I've done alot of experimentation trying to isolate the problem - I'd appreciate any insight or pointers from others...
Many thanks
m