I’m getting a JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED assertion in several components that are registered as parameters listeners. It only seems to happen (so far as I’ve found) in AAX in ProTools, when clicking the Compare button to switch between the current plugin state and the cached plugin state.
The problem seems to stem from the fact that the parameters are restored from the setStateInformation() function, which causes parameter change listeners to have their parameterChanged() function called, which then proceeds to execute certain drawing updates that in the end fire this assertion.
I thought maybe I could just acquire a message manager lock on the current thread, but that just hangs everything, and I have to kill ProTools.
How can I safely update my components in this situation? My only thought so far would be to not use listeners for those parameters, and instead use my timer callbacks to query the parameters in question, and updated my GUI if those values have changed.
There does not seem to be a similar problem with the listeners used by my buttons, sliders, etc., however. They update fine without asserting, so I’m a little confused why the Compare function in ProTools is causing this, and how best to get around it. Thoughts?