# The GUI of Plugins interact in DAW host?

**URL:** <https://forum.juce.com/t/the-gui-of-plugins-interact-in-daw-host/40560>\
**Category:** Audio Plugins\
**Created:** [July 6, 2020, 12:20pm UTC](https://forum.juce.com/t/the-gui-of-plugins-interact-in-daw-host/40560 "2020-07-06T12:20:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![cjohs](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/cjohs/32/8988_2.png) [@cjohs](https://forum.juce.com/u/cjohs)\
**Post date:** [July 6, 2020, 12:20pm UTC](https://forum.juce.com/t/the-gui-of-plugins-interact-in-daw-host/40560/1 "2020-07-06T12:20:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![daniel](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/daniel/32/790_2.png) [@daniel](https://forum.juce.com/u/daniel)\
**Post date:** [July 6, 2020, 2:35pm UTC](https://forum.juce.com/t/the-gui-of-plugins-interact-in-daw-host/40560/2 "2020-07-06T14:35:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cjohs](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/cjohs/32/8988_2.png) [@cjohs](https://forum.juce.com/u/cjohs)\
**Post date:** [July 6, 2020, 2:42pm UTC](https://forum.juce.com/t/the-gui-of-plugins-interact-in-daw-host/40560/3 "2020-07-06T14:42:31Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![cjohs](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/cjohs/32/8988_2.png) [@cjohs](https://forum.juce.com/u/cjohs)\
**Post date:** [July 6, 2020, 3:09pm UTC](https://forum.juce.com/t/the-gui-of-plugins-interact-in-daw-host/40560/4 "2020-07-06T15:09:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kunitoki](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/kunitoki/32/15_2.png) [@kunitoki](https://forum.juce.com/u/kunitoki)\
**Post date:** [July 7, 2020, 8:41pm UTC](https://forum.juce.com/t/the-gui-of-plugins-interact-in-daw-host/40560/5 "2020-07-07T20:41:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![yfede](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yfede/32/506_2.png) [@yfede](https://forum.juce.com/u/yfede)\
**Post date:** [July 8, 2020, 8:30am UTC](https://forum.juce.com/t/the-gui-of-plugins-interact-in-daw-host/40560/6 "2020-07-08T08:30:27Z")

</div>

Totally agree, same mistake done in this other recent topic: [Button not shown when use in ListBoxModel](https://forum.juce.com/t/button-not-shown-when-use-in-listboxmodel/40500)

---

<div class="post-metadata">

**Author:** ![kunitoki](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/kunitoki/32/15_2.png) [@kunitoki](https://forum.juce.com/u/kunitoki)\
**Post date:** [July 8, 2020, 10:34am UTC](https://forum.juce.com/t/the-gui-of-plugins-interact-in-daw-host/40560/7 "2020-07-08T10:34:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kunitoki](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/kunitoki/32/15_2.png) [@kunitoki](https://forum.juce.com/u/kunitoki)\
**Post date:** [July 8, 2020, 10:36am UTC](https://forum.juce.com/t/the-gui-of-plugins-interact-in-daw-host/40560/8 "2020-07-08T10:36:47Z")

</div>

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?
