Hey guys -
I am getting a strange deadlock in ProTools. Other hosts are fine, just AAX related it seems.
If I try to lock the MM thread at any point in setStateInformation() it will just hang. What other thread has the lock is unclear.
Since I need to add some change listeners during load, I really should lock the MM (or I hit an assertion in ChangeBroadcaster).
If I use openGL for my UI (which I usually do) then I notice the openGL thread is also waiting to lock the MM thread.
I don’t see what thread has the lock … perhaps one of the other processes that ProTools is running locks the MM until after the plugin is fully loaded? Including the setStateInfo part?
For now I’m just adding the change listeners and disregarding the assertion, though I know that there is a slight risk there.
I suspect you could reproduce this by just adding
MessageManagerLock mml (Thread::getCurrentThread())
To any AAX plugin in the setStateInfo routine.