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: 50
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: 50
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: 8,062
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.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.

Last edited by Xenakios; 09-08-2017 at 06:16 AM.
Xenakios is offline   Reply With Quote
Old 09-08-2017, 06:24 AM   #4
JonOsterman
Human being with feelings
 
Join Date: Aug 2017
Posts: 50
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: 8,062
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".
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 09-08-2017, 06:45 AM   #6
JonOsterman
Human being with feelings
 
Join Date: Aug 2017
Posts: 50
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-14-2017, 02:51 AM   #7
JonOsterman
Human being with feelings
 
Join Date: Aug 2017
Posts: 50
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:30 AM.


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