The GUI of Plugins interact in DAW host?

Im developing my own synth plugin using Juce.
And tried testing it side by side with a profesionally developed one (Zebra2 from UHE software).
But there seems to be interplugin “disturbance”.
For instance Zebra2 waveform gui does not draw correctly when my own plugin is open and goes back to drawing correctly when I remove my plugin.

What is the cause of this and how do I prevent that in my own plugin?
(I am of course assuming that I (and not UHE) am doing something wrong somewhere)

I should mention that I am testing the VST3 version of my plugin in Ableton Live on windows, and that my Zebra2 is a VST (or vst2) plugin.

They should be pretty independent, except that the message thread is a shared resource. If you stall the repainting, that will affect other drawing as well, even the drawing updates of the host might be affected.

1 Like

It is a bit strange (I expected them to be pretty independent - and that I would “only” crash my DAW if anything was awry).
Will look into repainting and the message thread (which is the “Editor”/GUI part : the non-audio thread - as I have introduced no extra threads myself)

Ok I seem to have resolved the issues.
I restructured some of my code moving primarily AddAndMakeVisible() calls from paint to the constructor (I don’t know what they were doing there - but seem to remember placing them there from some tutorial - I’m probably wrong - it also seems strange - at least in hindsight).
This seems to have alleviated the problem.

i think a lot of newcomers do this error of changing the component hierarchy (or even children components state) inside the paint method of the parent, so i suggest to the juce devs that any function that modifies the internal hierarchy should assert when called from within paint, so people could spot this early instead of creating strange malfunctioning.

3 Likes

Totally agree, same mistake done in this other recent topic: Button not shown when use in ListBoxModel

there was even another one which lamented poor drawing performance: the guy was calling slider.setValue in paint method of the parent of the slider

this brings me to another point. should paint be const? having side effects in paint calls seems bad. is there a use case for it not being const?

3 Likes