Rotary Slider EStackOverflow

Hi to all.
When I reacj the minimum value of the slider, only in release build, I’ve an EStackOverflow.

With debug build all works fine.
I’m using JUCE 1.17.

bye and thanx coders!

sure it’s not your code getting into a recursive loop somewhere?

The debug version of the plug works very well.
The release one, only very close to the minimum value, for example -60dB, I get EstackOverflow. Only the release one!

I found very strange this behaviour.

//==============================================================================
DeciBelSlider::DeciBelSlider(const String &componentName) 
	: Slider (componentName),
	infDecibelUpfix (T("-oo"))
{

}

DeciBelSlider::~DeciBelSlider()
{}

void DeciBelSlider::setTextValueSuffix (const String& suffix)
{
    if (dBSuffix != suffix)
    {
        dBSuffix = suffix;
        updateText();
    }
}

const String DeciBelSlider::getTextFromValue (double v)
{
    String	valueTxt;

    if( v <= getMinimum())
		valueTxt = infDecibelUpfix;
	else
		valueTxt = Slider::getTextFromValue(v);
	
	return valueTxt + dBSuffix;
}

double DeciBelSlider::getValueFromText (const String& text)
{
    String t (text.trimStart());

    if (t.endsWith (dBSuffix))
        t = t.substring (0, t.length() - dBSuffix.length());

    while (t.startsWithChar (T('+')))
        t = t.substring (1).trimStart();
	
	if(t == infDecibelUpfix)
		return getMinimum();
	else
		return t.initialSectionContainingOnly (T("0123456789.-"))
			    .getDoubleValue();
}

In editor class the rotary slider is instaciate as folows:

// create our DRY gain knob component addAndMakeVisible (dryGainKnob = new DeciBelSlider (T("dry gain"))); dryGainKnob->setBounds (dryGainX, dryGainY, GainWIDTH, GainHEIGHT); dryGainKnob->addChangeListener (this); dryGainKnob->setRange (sliderMin, sliderMax, 0.1); dryGainKnob->setSliderStyle(Slider::Rotary); dryGainKnob->setTextBoxStyle(Slider::TextBoxBelow,false,50,20); dryGainKnob->setSkewFactor(1.5); dryGainKnob->setTextValueSuffix(T(" dB"));

It was the setSkewFactor method.
I called it with 1.5 parameter for every db gain rotary slider.

Removing these calls, now it works in release mode too.

not related to your problem really, but just thought i’d mention that it’s a nice neatener to put your slider settings in the constructor of your custom slider type. things like setSliderStyle and setSkewFactor (if it’s working!), and basically the things that make it what it is for all your relevant controls to use by default.

nothing more than that tho!