COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :

Go Back   Cockos Incorporated Forums > Other Software Discussion > WDL users forum

Reply
 
Thread Tools Display Modes
Old 01-26-2018, 04:50 PM   #1
Guod3
Human being with feelings
 
Guod3's Avatar
 
Join Date: Jan 2008
Posts: 506
Default Why is Plugin constructor not called before first call of SerializeState?

In Reaper (at least) SerializeSate() gets called before the plugins constructor.
This seems odd. It ends up working ok because there are more calls generated after the plugin constructor, but it does limit the variables used to hold values to be saved in SerializeSate() to static class member variables (otherwise exceptions get thrown on the early call).
I'm interested in any explanation of this?
Guod3 is offline   Reply With Quote
Old 01-28-2018, 08:47 AM   #2
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 7,193
Default

Quote:
Originally Posted by Guod3 View Post
I'm interested in any explanation of this?
That has to be a bug in Reaper, IPlug or your plugin. I doubt it is a bug in Reaper though, because I've never seen that kind of behavior with my JUCE based plugins.
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass, Paul(X)Stretch and λ) :
http://xenakios.wordpress.com/
Xenakios is online now   Reply With Quote
Old 01-29-2018, 12:39 AM   #3
Guod3
Human being with feelings
 
Guod3's Avatar
 
Join Date: Jan 2008
Posts: 506
Default

I just tested again in Reaper.
I put debug breakpoints in the plugin constructor, SerializeState, and in the constructor of a plugin class member.

Sure enough the Plugin constructor was first followed by SerializeState then class member constructor.

The problem was originally that I had the class member data being referenced by SerializeState before the constructor where data was initialised i.e undefined pointers, etc.
Guod3 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:18 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.