Hi!
When i load my juce aplication i sometimes get assertion faults in AudioSampleBuffer becouse “emptyBuffer” gets resized in AudioFilterStreamer::audioDeviceStopped() even while processing an audio callback in audioDeviceIOCallback
This happens quite randomly (its very ellusive only1 out of 8 or so tries) but it happens only when setDefaultMidiOutput() is called. (it is also called at the audio device’s initialize() function which is why it happens when i load my program)
trying to debug with malloc gaurd crashes the software there and then.
any idea on why this may be happening? did i forget to do something?
i dont see anything restricting callbacks when setDefaultMidiOutput() is called… setDefaultMidiOutput() is where it calls audioDeviceStopped() (and shrinks the empty buffer) . it is called in two main places:
AudioFilterStreamingDeviceManager::initialise()
AudioDeviceSelectorComponent::comboBoxChanged()
both can crash the software but sometimes it runs through the assertion faults and continues running. thats why i suspect that audioDeviceIOCallback is still passing through its last iteration before stopping.
it gives me the errors after these: (AudioFilterStreamer::audioDeviceIOCallback in file juce_AudioFilterSteamer.cpp line 78 )
while (numActiveOutChans < numOutsWanted)
outChans [numActiveOutChans++] = emptyBuffer.getSampleData (++i, 0);