COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 09-08-2017, 02:33 AM   #1
JonOsterman
Human being with feelings
 
Join Date: Aug 2017
Posts: 23
Default FL Studio Debug/release

Hi,

I'm experiencing something strange, I might have missed something.

In debug mode with FL Studio (on Windows) my plugin works well (even with Ctrl+F5), but if I launch first FL Studio and launch my plugin as if it was a release version it is telling me :
"Something went wrong loading the VST3 plugin. Please make sure it's installed and registered properly."

I've tried some solutions foundable on Google/StackOverflow but nothing works
JonOsterman is offline   Reply With Quote
Old 09-08-2017, 05:48 AM   #2
JonOsterman
Human being with feelings
 
Join Date: Aug 2017
Posts: 23
Default

Well I might not be in the right place for my problem, do you know where I could find help ?
JonOsterman is offline   Reply With Quote
Old 09-08-2017, 06:08 AM   #3
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 6,603
Default

Check your code very carefully for :

-Uninitialized variables (and class members)
-Logic errors that might lead to things like functions not returning anything when they should

In some cases the optimizations the compiler does for release builds can blow up the running code when the code has problems like the above.

If additional threads are involved, the timings will be different for debug and release builds. Release builds may more easily reveal problems related to multiple threads manipulating shared variables in an unsafe manner.

Are your CPU and the CPU instruction set release build settings compatible?

Sometimes just doing a full clean and rebuild of the project can solve mysterious problems.
__________________
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 and λ) :
http://xenakios.wordpress.com/

Last edited by Xenakios; 09-08-2017 at 06:16 AM.
Xenakios is online now   Reply With Quote
Old 09-08-2017, 06:24 AM   #4
JonOsterman
Human being with feelings
 
Join Date: Aug 2017
Posts: 23
Default

Quote:
Originally Posted by Xenakios View Post
Check your code very carefully for :

-Uninitialized variables (and class members)
-Logic errors that might lead to things like functions not returning anything when they should
I got 0 errors or warning, unless "float to int conversion"

Quote:
Originally Posted by Xenakios View Post
If additional threads are involved, the timings will be different for debug and release builds. Release builds may more easily reveal problems related to multiple threads manipulating shared variables in an unsafe manner.
I did not express myself well, what happened is that if I want to load in FL Studio (just launching the FL.exe without Visual Studio) the same vst file that I build in Debug Mode, it is showing me the sentence above.

Is there dependencies that Visual load in debug mode that I need to give to FL studio with my vst ?

Quote:
Originally Posted by Xenakios View Post
Sometimes just doing a full clean and rebuild of the project can solve mysterious problems.
I've cleaned, rebuild all and reinstalled FL Studio
JonOsterman is offline   Reply With Quote
Old 09-08-2017, 06:33 AM   #5
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 6,603
Default

Quote:
Originally Posted by JonOsterman View Post
Is there dependencies that Visual load in debug mode that I need to give to FL studio with my vst ?
Are you testing on the same system where you have Visual Studio installed? If yes, the Visual Studio dependencies for both debug and release builds should already be installed and available. But just in case that has been messed up somehow, you could check if changing the runtime library into statically linked helps. (You might want to statically link the runtime library anyway, to save your users the headache of the probably missing runtime dlls.)

edit : Sorry, I missed in your original post the part about "as if it was a release build".
__________________
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 and λ) :
http://xenakios.wordpress.com/
Xenakios is online now   Reply With Quote
Old 09-08-2017, 06:45 AM   #6
JonOsterman
Human being with feelings
 
Join Date: Aug 2017
Posts: 23
Default

Yes, basically I just copy/paste the vst file into the FL Studio's VstPlugins folder, as my Visual Studio post-build command does

I've already linked all my lib as static libs

that's a real conundrum here
JonOsterman is offline   Reply With Quote
Old 09-08-2017, 06:50 AM   #7
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 6,603
Default

Quote:
Originally Posted by JonOsterman View Post
Yes, basically I just copy/paste the vst file into the FL Studio's VstPlugins folder, as my Visual Studio post-build command does

I've already linked all my lib as static libs

that's a real conundrum here
VST3 plugins should be placed in C:\Program Files\Common Files\VST3, though...(For 64 bit builds.)
__________________
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 and λ) :
http://xenakios.wordpress.com/
Xenakios is online now   Reply With Quote
Old 09-08-2017, 07:03 AM   #8
JonOsterman
Human being with feelings
 
Join Date: Aug 2017
Posts: 23
Default

Quote:
Originally Posted by Xenakios View Post
VST3 plugins should be placed in C:\Program Files\Common Files\VST3, though...(For 64 bit builds.)
Yeah that's what I meant, sorry
However until now I was building in 32 bits, I will try building it in 64bits and see if it could change something

Last edited by JonOsterman; 09-08-2017 at 08:02 AM.
JonOsterman is offline   Reply With Quote
Old 09-08-2017, 08:02 AM   #9
JonOsterman
Human being with feelings
 
Join Date: Aug 2017
Posts: 23
Default

Well, it still doesn't work
JonOsterman is offline   Reply With Quote
Old 09-08-2017, 09:03 AM   #10
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 6,603
Default

Does your plugin depend on some external file that can't be found if you run the plugin outside of Visual Studio? To prevent that kind of stuff happening, you should use absolute paths to external files. (Relative file paths almost always end up causing problems.)
__________________
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 and λ) :
http://xenakios.wordpress.com/
Xenakios is online now   Reply With Quote
Old 09-08-2017, 10:18 AM   #11
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 481
Default

You are probably launching wrong plugin. Delete all plugin instances and scan with plugin manager to verify if every plugin is deleted then build your plugin and scan with plugin manager again and use that plugin.
__________________
Website: https://youlean.co, Facebook: https://www.facebook.com/itsYoulean/
Youlean is online now   Reply With Quote
Old 09-12-2017, 01:58 AM   #12
JonOsterman
Human being with feelings
 
Join Date: Aug 2017
Posts: 23
Default

Quote:
Originally Posted by Xenakios View Post
Does your plugin depend on some external file that can't be found if you run the plugin outside of Visual Studio? To prevent that kind of stuff happening, you should use absolute paths to external files. (Relative file paths almost always end up causing problems.)
Nop, I always use absolute path, or at least macros

Quote:
Originally Posted by Youlean View Post
You are probably launching wrong plugin. Delete all plugin instances and scan with plugin manager to verify if every plugin is deleted then build your plugin and scan with plugin manager again and use that plugin.
I've tried that before, didn't work
JonOsterman is offline   Reply With Quote
Old 09-14-2017, 02:51 AM   #13
JonOsterman
Human being with feelings
 
Join Date: Aug 2017
Posts: 23
Default

Well, I tried to comment all my work, piece by piece, method by method, until reaching the IPlugEffect template and it doesn't worked.. Then I Cut/Paste my commented work in a text files to clean my cpp/h files without losing my work and then it worked

I tried then to reimplement my work piece by piece and when I got the same bug I commented what I added but it still wasn't working.

I do a
"cd $(VST3_32_PATH)
del *.vst3"
before each build (in "Pre-build event") so maybe it is FL Studio which store some presets somewhere ? I don't want to look ahead to a Visual Studio bug ..

EDIT : I deleted FL Studio VST3 presets, that did not fixed the problem

EDIT2 : I became crazy and started to remove the files from an SDK I need one by one, it was one of them.

For now I don't know why but I will find out and post here if it makes sense.

Last edited by JonOsterman; 09-14-2017 at 04:28 AM.
JonOsterman 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 11:21 AM.


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