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

Go Back   Cockos Incorporated Forums > Cockos and Friends Software Discussion > WDL users forum

Reply
 
Thread Tools Display Modes
Old 01-20-2017, 09:00 AM   #1
Nowhk
Human being with feelings
 
Join Date: Mar 2016
Posts: 190
Default IPlug crash on FL when automating parameters (deadlock?)

Hi all.

I've noticed that when I automate a plugin's parameter from FL Studio and simultaneously move some knobs from plugin's GUI, the plugin totally crash.
It seems a deadlock.

I've tested and also noticed the same with many plugins made with IPlug, such as Scanner Vibrato (Tale, are you?)
Drumatic 4 till now seems to not suffer this problem.

Has anyone noticed (and so fixed) this problem?
I'm using WDL-OL version.

P.S. There are some plugins I've tested where automations from FL Studio doesn't works at all, such as PreAMPed (by random_id). Not sure if its intended. I'm just spot this out

Last edited by Nowhk; 01-20-2017 at 10:40 AM.
Nowhk is offline   Reply With Quote
Old 01-20-2017, 03:03 PM   #2
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: Holland
Posts: 2,773
Default

Hmm, interesting... I'm rather busy ATM, but I guess I will have to look into this at some point.
Tale is offline   Reply With Quote
Old 01-20-2017, 04:12 PM   #3
earlevel
Human being with feelings
 
Join Date: Dec 2015
Posts: 196
Default

My plugin is AAX-only at this time, but no problem fiddling with controls while they are automated.
earlevel is offline   Reply With Quote
Old 01-21-2017, 03:10 AM   #4
stw
Human being with feelings
 
Join Date: Apr 2012
Posts: 203
Default

Seems to work for my REFLEXplus. (at least here with FL 12 on WinXP.)
Maybe you want to try the demo on your machine:
https://www.stw-audio.com/downloads/
stw is offline   Reply With Quote
Old 01-21-2017, 06:19 AM   #5
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 287
Default

I am not sure what I did with PreAMPed, but I will look when I get a chance.

Every now and then, users of my stuff report specific problems with certain hosts...and usually more than not, it is FL Studio (or Cubase).
__________________
Website: LVC-Audio
random_id is online now   Reply With Quote
Old 01-23-2017, 03:18 AM   #6
Nowhk
Human being with feelings
 
Join Date: Mar 2016
Posts: 190
Default

Quote:
Originally Posted by stw View Post
Seems to work for my REFLEXplus. (at least here with FL 12 on WinXP.)
Maybe you want to try the demo on your machine:
https://www.stw-audio.com/downloads/
Nope, it also crashes there.
Try the attached file. Press Play and then tweak for a while another knob... it reaches a deadlock (or at least, a developer by Image-Line tell me this debugging FL Studio with my plugin).
He said: You could try putting the OnParamChange call (in VSTSetParameter) outside the lock. I think that would work., refered to this.

Didn't try yet, but I'm not sure about change those lines

In Drumatic 4 this just doesn't happens. The author (E-Phonic) tell me that maybe it was developed using a old version of WDL, which maybe doesn't contains this problem.

Any other clues?
Attached Files
File Type: zip reflex_test.zip (12.1 KB, 15 views)
Nowhk is offline   Reply With Quote
Old 01-23-2017, 03:48 AM   #7
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: Holland
Posts: 2,773
Default

Quote:
Originally Posted by Nowhk View Post
He said: You could try putting the OnParamChange call (in VSTSetParameter) outside the lock. I think that would work., refered to this.

Didn't try yet, but I'm not sure about change those lines
I guess that means FL Studio is calling VSTSetParameter() from the GUI thread... ?

Anyway, maybe something like thid would work then (and hopefully also still work in other hosts):

Code:
void VSTCALLBACK IPlugVST::VSTSetParameter(AEffect *pEffect, VstInt32 idx, float value)
{
  Trace(TRACELOC, "%d:%f", idx, value);
  IPlugVST* _this = (IPlugVST*) pEffect->object;
  bool change = false;
  {
    IMutexLock lock(_this);
    if (idx >= 0 && idx < _this->NParams())
    {
      if (_this->GetGUI())
      {
        _this->GetGUI()->SetParameterFromPlug(idx, value, true);
      }
      _this->GetParam(idx)->SetNormalized(value);
      change = true;
    }
  }
  if (change) _this->OnParamChange(idx);
}
Tale is offline   Reply With Quote
Old 01-23-2017, 06:05 AM   #8
stw
Human being with feelings
 
Join Date: Apr 2012
Posts: 203
Default

Quote:
Originally Posted by Nowhk View Post
Nope, it also crashes there.
Try the attached file. Press Play and then tweak for a while another knob...
I tried and this one also works fine here. Though i can't hear any sound (i guess because it's done with a newer version of FL) automation is moving and i can't get it to crash.
Projects created with my installed version (FL 12.0.2 32 bit on WinXP) play fine (playing output) and don't crash with automated REFLEXplus as well.
stw is offline   Reply With Quote
Old 03-17-2017, 12:50 PM   #9
Eeli
Human being with feelings
 
Join Date: Mar 2017
Posts: 1
Default

Hi! Any progress on this, anyone? I came across this issue just a few days ago so it was cool to find some discussion on it.

In my plugin (Windows 64-bit VST), I tried taking OnParamChange out of the lock as suggested here, to no effect. However, turning off the "Notify about parameter changes" in FL "resolved" the issue as Nowhk pointed out, so I made this change in IPlug:

Code:
void IPlugBase::SetParameterFromGUI(int idx, double normalizedValue)
{
/* // Original: 
  Trace(TRACELOC, "%d:%f", idx, normalizedValue);
  WDL_MutexLock lock(&mMutex);
  GetParam(idx)->SetNormalized(normalizedValue);
  InformHostOfParamChange(idx, normalizedValue);
  OnParamChange(idx);
  */

	Trace(TRACELOC, "%d:%f", idx, normalizedValue);
	{ WDL_MutexLock lock(&mMutex);
	GetParam(idx)->SetNormalized(normalizedValue);
	OnParamChange(idx);
	}
	InformHostOfParamChange(idx, normalizedValue);
}
That is, I took InformHostOfParamChange outside the lock, and now the plug seems to run smoothly in FL (haven't tried any other host!). Can someone tell me if and why this is a bad idea?
Eeli is offline   Reply With Quote
Old 03-20-2017, 05:27 AM   #10
Nowhk
Human being with feelings
 
Join Date: Mar 2016
Posts: 190
Default

Nice try! Not even sure if this can introduce even more troubles. Any clues? I don't think this will lead any troubles, since there isn't audio sync between plug gui and DAW...
Nowhk 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 04:44 AM.


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