Dealing with crashes in DAW and can not determine the source of the problem…
At times when changing a value in the GUI on a slider there will be a crash…
The pattern between processor and editor is the following:
In the processor:
public:
void prepareToPlay() noexcept
{
mixPtr = valueTreeState.getRawParameterValue(mixAttachment);
}
void update()
{
mixSmooth.setTargetValue(mixPtr->load());
}
private:
std::atomic<float>* mixPtr = nullptr;
In the editor:
public:
//MIX//
addAndMakeVisible(&slider01);
sliderAttachment01.reset(new SliderAttachment(valueTreeState, mixAttachment, slider01));
All tests pass in PlugIn Val…
Now, a final potential issue, some processors are passed by reference to other processors to reference the values…For example, there’s an amplifier processor, with an ADSR, and so some other processor may want to use the current envelope value.
So the pattern may look like this…
EffectProcessor(
juce::String effectUnitAttachment_,
juce::String effectUnitName_,
juce::AudioProcessorValueTreeState& vts,
AmplifierProcessor& amplifierControlsProcessor_
)
Could this cause an unnoticed crash from a race condition reading/writing to a primitive, such as a float?
Any insight is appreciated.

