Question about threading and restartComponent()

I’m a host developer and have a case where a plugin is hanging due to a deadlock when it calls restartComponent:

  1. The plugin calls restartComponent() from UI thread.

  2. Host attempts to suspend the plugin’s processing and waits for the audio thread to complete any in-progress processing.

  3. However… the audio thread is currently executing the plugin’s process call but it looks like it’s blocked waiting for a plugin site mutex held by the UI thread

  4. The audio thread never completes the suspending of the plugin

  5. The host’s restartComponent() implementation on the UI thread waits forever.

ie: a typical deadlock caused by a plugin-side mutex across both the audio and UI threads.

This post sounds like a similar issue and hints this is a plugin issue, but some clarification on responsibilities of the host and plugin here would be great.

It’s not allowed to hold a mutex inside the audio realtime path. Thus the plug-in in question is violating this and you cannot work around it. You should inform the plug-in developer that he has to fix this issue.

Thanks @Arne_Scheffler - that’s what I suspected.