# Stack overflow in vstHookWndProc()

**URL:** <https://forum.juce.com/t/stack-overflow-in-vsthookwndproc/3059>\
**Category:** Audio Plugins\
**Created:** [July 22, 2008, 12:10pm UTC](https://forum.juce.com/t/stack-overflow-in-vsthookwndproc/3059 "2008-07-22T12:10:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zamrate](https://avatars.discourse-cdn.com/v4/letter/z/f4b2a3/32.png) [@zamrate](https://forum.juce.com/u/zamrate)\
**Post date:** [July 22, 2008, 12:10pm UTC](https://forum.juce.com/t/stack-overflow-in-vsthookwndproc/3059/1 "2008-07-22T12:10:50Z")

</div>

From a first VstPluginInstance I create an AudioPluginEditor (using createEditorIfNeeded() or createEditor()) and add it to some Component of my host.

Then, I create a second AudioPluginEditor from another VstPluginInstance and get a stack overflow in vstHookWndProc() as soon as it is added to my Component. This always happens.

What could be the problem here?

Edit: When they are added to a DocumentWindow that is added to the Desktop, there is no crash.

Now, what if I would want, for instance, make a superbig component of let’s say 3000x3000 with all my plugins on it and which one could just drag around, like some big board with all my synths on it that I can just move over the screen. How would one achieve that?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [July 28, 2008, 6:49pm UTC](https://forum.juce.com/t/stack-overflow-in-vsthookwndproc/3059/2 "2008-07-28T18:49:24Z")

</div>

Well two things are trying to hook into the same parent window, and messing up each other’s hooks, but it’s so complicated that I’m really not sure exactly what’s going on… Is this the host that’s doing the hooking? (because plugins hook into their parent window too)

---

<div class="post-metadata">

**Author:** ![zamrate](https://avatars.discourse-cdn.com/v4/letter/z/f4b2a3/32.png) [@zamrate](https://forum.juce.com/u/zamrate)\
**Post date:** [July 28, 2008, 9:51pm UTC](https://forum.juce.com/t/stack-overflow-in-vsthookwndproc/3059/3 "2008-07-28T21:51:27Z")

</div>

Nevermind, I will use a DocumentWindow for now.
