Wavelab again



In Wavelab all plugins opened in the Audio Montage,
run in the main application thread.
While each plugin loaded in the Master Section, runs in its own thread.

So, we got serious trouble when opening an instance in the Audio Montage and then one in the Master Section.

Sometimes anything works, sometimes the Editor crashes, sometimes it seems the Editor won’t open.

I tried to avoid simultaneous calls with a static CriticalSection in the VSTWrapper dispatcher method, but all attempts resulted in a dead lock.

Any help appreciated!


Blimey, that’s a mess, isn’t it…

Instead of a critical section, a MessageManagerLock is probably the best thing to use, though this must open up endless deadlock possibilities.


…but hang on, are you sure? You mean that the app is actually running one message loop thread per plugin??


ok, i found a way. Maybe it was me fault.
The issue happend after i modified the DemoJuceFilter::createEditor() method.
After the plugin window was created i called sendChangeMessage (this) to update the plugin gui.
After i removed this, the issue doesn’t appear. I have no idea why this was causing the problem, i was not able to debug this because at my side the debugger never stopped, i have no starting point. It’s mysterious!

Thats the information i’ve got from the creator of wavelab (pg).
When you debug wavelab, the debugger will stop always at checkMessageManagerIsLocked.


If there’s multiple message loops, then I really can’t think of a good way to handle it - that’s just a recipe for disaster. But it’s also a bit of a strange approach… You’re totally sure that the checkMessageManagerIsLocked isn’t happening on your audio thread?


I’m not sure how the audio-callbacks are called (multi threading will be of cause not a problem) but there are definitely simultaneous calls of idle() and window-callback methods.

This causes all the crazy-problems we had with wavelab in the past.


You can easily reproduce it with the a demo of wavelab 5 when you open a plugin in the master-insert section and then one as a track insert in an audio-montage