Hi Jules,

I’m invoking commands from the midi thread and encountered some problems with ApplicationCommandManager::sendListenerInvokeCallback().

As i’m in the midi thread, i asynchonously invoke commands.
But, as some commands can also be triggered by clicking on a button, ApplicationCommandManager::invoke() “synchronously” calls sendListenerInvokeCallback() to flash the concerned button.

This logically induces a checkMessageManagerIsLocked assertion failure…

Wouldn’t it be better to allow asynchronous Invoke Callbacks when ApplicationCommandManager::invoke() is called with the parameter ‘asynchronously’ set to true ?

And for the time, is there a solution to my problem ?

Thanx in advance !


Ah - that stuff really isn’t supposed to be used from another thread. Even without that callback, it uses all sorts of UI calls to figure out which target to send it to, and isn’t thread-safe. You could do it if you lock the messagemanager, but you might be better off sending yourself a simple message or using an asynccallback to do the invocation on the UI thread.