I'm testing my plugin in Logic 9 at the moment and I'm having issues with getStateInformation() & setStateInformation() within my pluginProcessor. If I comment their content out, the plugin works fine, but of course it won't reload saved states.
From what I gathered from the demo notes, getStateInformation() is used to store the current state of the plugin into binary, & setStateInformation() is used to retrieve that info & make use of it sometime during the plugins construction. Intuitivly this would make me think that setStateInformation() is called after the plugins construction, & getStateInformation() is called somewhere right before destruction.
Thus I'm consufes that when I uncomment my (bugged) code in getStateInformation() the plugin crashes upon construction.
What I'm ultimately asking is: during a plugins lifetime, when are these functions called?
I found the two methods in juce_AudioUnitPluginFormat.mm. I still havent' found any tips to when these methods are called, though (I could just be overlooking it). I was guessing that the host calls them at certain times, in which the juce code wouldn't give any explicit insight into when they are called (right?)
From my observations using DBG() & the console (on mac) it seems like Logic Pro 9 calls setStateInformation() whenever I repoen a session with an instance of my plugin. The getStateInformation seems like a crapshoot: it's called at seemingly random times (those are just rough observations though). This makes a fair amount of sense: It only loads the previous settings once, & then periodically "saves" the current state (probably for mulitple reasons, I'm guessing).