I’ve just found out that in JUCE AudioPluginHost my plugin
AudioProcessorEditor constructor is called two times each time I open plugin window.
I have updated Projucer, and I’ve just made fresh compilation of AudioPluginHost too, and there is the same issue.
I still don’t know how it is in other plugin hosts, I will check today evening, but now I would like to ask if any of you experienced the same behaviour?
Of course I am sure I have only one instance of my plugin launched in AudioPluginHost.
There is also strange that even I don’t open plugin window but only right click on my plugin in AudioPluginHost to see context menu for example to remove plugin, then also
AudioProcessorEditor constructor is called (but only once).
I’ve also found that each time plugin is launched the
getStateInformation() is called before
setStateInformation(). But it’s not problem because there is some other
MemoryBlock as input, so when
setStateInformation() is called I get proper data.
Due to order of calling
getStateInformation() I’ve found such thread:
But it looks like some other issue with FL.
And still I am more interested of calling
AudioProcessorEditor constructor double times.
What is also worth to mention that each time my plugin is launched first time it takes quite long time (about 3-4 seconds). But after then even I remove all instances of my plugin and load again, then everything works fine. I am not sure how to debug it to find what operations takes so much time on first launch.