AU Plugin Crash in Release Mode


#1

ok… I give up.

After some hours now of trying to hunt down the problem, I can’t seem to find what’s causing my Plug-In to crash in “Release” build, or rather why it would crash in a Release build and not in Debug.

Configuration(s):
Juce = JUCE v1.54.27 (Latest Non-Module HEAD)
Project = Created with the Introjucer (JUCE v1.54.27)

I have an AudioProcessorGraph in my filter, I use it to connect various processors etc. I’ve disconnected all processors and the plug-in still crashes in AudioProcessorGraph::processBlock. I’ve also disabled the editor so that I can eliminate any ui business. What is the difference between a Debug AU and a Release version(s).

void PluginFilter::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages) { if (! isSuspended()) { // This crashes in release! graph.processBlock (buffer, midiMessages); } }

Trace: XCode

#0 0xffff0a2f in __memcpy #1 0x17120c9a in juce::AudioProcessorGraph::processBlock #2 0x1734f084 in PluginFilter::processBlock #3 0x17070b05 in JuceAU::ProcessBufferLists #4 0x1707191f in JuceAU::Render #5 0x1707b966 in AUBase::DoRenderBus #6 0x1707a787 in AUBase::DoRender #7 0x1707c3d1 in AudioUnitBaseRender #8 0x70008f91 in .objc_class_name_JuceURLConnection_1_54_27_kEuWvV #9 0x70009c1a in .objc_class_name_JuceURLConnection_1_54_27_kEuWvV #10 0x70046a74 in AUMatrixMixerEntry #11 0x70047788 in AUMatrixMixerEntry #12 0x70006d48 in .objc_class_name_JuceURLConnection_1_54_27_kEuWvV #13 0x70005bbb in .objc_class_name_JuceURLConnection_1_54_27_kEuWvV #14 0x700311ed in SystemOutputAUEntry #15 0x70008f91 in .objc_class_name_JuceURLConnection_1_54_27_kEuWvV #16 0x70009c1a in .objc_class_name_JuceURLConnection_1_54_27_kEuWvV #17 0x70046a74 in AUMatrixMixerEntry #18 0x70047788 in AUMatrixMixerEntry #19 0x70006d48 in .objc_class_name_JuceURLConnection_1_54_27_kEuWvV #20 0x70005bbb in .objc_class_name_JuceURLConnection_1_54_27_kEuWvV #21 0x700311ed in SystemOutputAUEntry #22 0x70008f91 in .objc_class_name_JuceURLConnection_1_54_27_kEuWvV #23 0x70009c1a in .objc_class_name_JuceURLConnection_1_54_27_kEuWvV #24 0x70046a74 in AUMatrixMixerEntry #25 0x70047788 in AUMatrixMixerEntry #26 0x70006d48 in .objc_class_name_JuceURLConnection_1_54_27_kEuWvV #27 0x70005bbb in .objc_class_name_JuceURLConnection_1_54_27_kEuWvV #28 0x700311ed in SystemOutputAUEntry #29 0x70008f91 in .objc_class_name_JuceURLConnection_1_54_27_kEuWvV #30 0x70009c1a in .objc_class_name_JuceURLConnection_1_54_27_kEuWvV #31 0x700090fa in .objc_class_name_JuceURLConnection_1_54_27_kEuWvV #32 0x90b80295 in AudioConverterChain::CallInputProc #33 0x90b7fdb5 in AudioConverterChain::FillBufferFromInputProc #34 0x90b7fd42 in BufferedAudioConverter::GetInputBytes #35 0x90b7fbfd in CBRConverter::RenderOutput #36 0x90b7f9a7 in BufferedAudioConverter::FillBuffer #37 0x90b7fb0f in AudioConverterChain::RenderOutput #38 0x90b7f9a7 in BufferedAudioConverter::FillBuffer #39 0x90b7f71c in AudioConverterFillComplexBuffer #40 0x700091e7 in .objc_class_name_JuceURLConnection_1_54_27_kEuWvV #41 0x70008766 in .objc_class_name_JuceURLConnection_1_54_27_kEuWvV #42 0x70006d48 in .objc_class_name_JuceURLConnection_1_54_27_kEuWvV #43 0x70005bbb in .objc_class_name_JuceURLConnection_1_54_27_kEuWvV #44 0x7000c099 in AUGenericOutputEntry #45 0x93ddc028 in HP_IOProc::Call #46 0x93ddbd8e in IOA_Device::CallIOProcs #47 0x93ddbb7e in HP_IOThread::PerformIO #48 0x93dd8f40 in HP_IOThread::WorkLoop #49 0x93dd8571 in HP_IOThread::ThreadEntry #50 0x93dd8488 in CAPThread::Entry #51 0x93730259 in _pthread_start #52 0x937300de in thread_start

Crash Report: AULab

Thread 4 Crashed: 0 libSystem.B.dylib 0xffff0a2f __memcpy + 655 1 com.mycompanyname.myproduct 0x17120c9a juce::AudioProcessorGraph::processBlock(juce::AudioSampleBuffer&, juce::MidiBuffer&) + 304 2 com.mycompanyname.myproduct 0x1734f084 PluginFilter::processBlock(juce::AudioSampleBuffer&, juce::MidiBuffer&) + 110 3 com.mycompanyname.myproduct 0x17070b05 JuceAU::ProcessBufferLists(unsigned long&, AudioBufferList const&, AudioBufferList&, unsigned long) + 843 4 com.mycompanyname.myproduct 0x1707191f JuceAU::Render(unsigned long&, AudioTimeStamp const&, unsigned long) + 137 5 com.mycompanyname.myproduct 0x1707b966 AUBase::DoRenderBus(unsigned long&, AudioTimeStamp const&, unsigned long, AUOutputElement*, unsigned long, AudioBufferList&) + 104 6 com.mycompanyname.myproduct 0x1707a787 AUBase::DoRender(unsigned long&, AudioTimeStamp const&, unsigned long, unsigned long, AudioBufferList&) + 351 7 com.mycompanyname.myproduct 0x1707c3d1 AudioUnitBaseRender(AUBase*, unsigned long*, AudioTimeStamp const*, unsigned long, unsigned long, AudioBufferList*) + 85 8 ...pple.audio.units.Components 0x70008f91 0x70000000 + 36753 9 ...pple.audio.units.Components 0x70009c1a 0x70000000 + 39962 10 ...pple.audio.units.Components 0x70046a74 AUMatrixMixerEntry + 2829 11 ...pple.audio.units.Components 0x70047788 AUMatrixMixerEntry + 6177 12 ...pple.audio.units.Components 0x70006d48 0x70000000 + 27976 13 ...pple.audio.units.Components 0x70005bbb 0x70000000 + 23483 14 ...pple.audio.units.Components 0x700311ed SystemOutputAUEntry + 670 15 ...pple.audio.units.Components 0x70008f91 0x70000000 + 36753 16 ...pple.audio.units.Components 0x70009c1a 0x70000000 + 39962 17 ...pple.audio.units.Components 0x70046a74 AUMatrixMixerEntry + 2829 18 ...pple.audio.units.Components 0x70047788 AUMatrixMixerEntry + 6177 19 ...pple.audio.units.Components 0x70006d48 0x70000000 + 27976 20 ...pple.audio.units.Components 0x70005bbb 0x70000000 + 23483 21 ...pple.audio.units.Components 0x700311ed SystemOutputAUEntry + 670 22 ...pple.audio.units.Components 0x70008f91 0x70000000 + 36753 23 ...pple.audio.units.Components 0x70009c1a 0x70000000 + 39962 24 ...pple.audio.units.Components 0x70046a74 AUMatrixMixerEntry + 2829 25 ...pple.audio.units.Components 0x70047788 AUMatrixMixerEntry + 6177 26 ...pple.audio.units.Components 0x70006d48 0x70000000 + 27976 27 ...pple.audio.units.Components 0x70005bbb 0x70000000 + 23483 28 ...pple.audio.units.Components 0x700311ed SystemOutputAUEntry + 670 29 ...pple.audio.units.Components 0x70008f91 0x70000000 + 36753 30 ...pple.audio.units.Components 0x70009c1a 0x70000000 + 39962 31 ...pple.audio.units.Components 0x700090fa 0x70000000 + 37114 32 ....audio.toolbox.AudioToolbox 0x90b80295 AudioConverterChain::CallInputProc(unsigned long) + 889 33 ....audio.toolbox.AudioToolbox 0x90b7fdb5 AudioConverterChain::FillBufferFromInputProc(unsigned long*, CABufferList*) + 95 34 ....audio.toolbox.AudioToolbox 0x90b7fd42 BufferedAudioConverter::GetInputBytes(unsigned long, unsigned long&, CABufferList const*&) + 200 35 ....audio.toolbox.AudioToolbox 0x90b7fbfd CBRConverter::RenderOutput(CABufferList*, unsigned long, unsigned long&, AudioStreamPacketDescription*) + 129 36 ....audio.toolbox.AudioToolbox 0x90b7f9a7 BufferedAudioConverter::FillBuffer(unsigned long&, AudioBufferList&, AudioStreamPacketDescription*) + 315 37 ....audio.toolbox.AudioToolbox 0x90b7fb0f AudioConverterChain::RenderOutput(CABufferList*, unsigned long, unsigned long&, AudioStreamPacketDescription*) + 157 38 ....audio.toolbox.AudioToolbox 0x90b7f9a7 BufferedAudioConverter::FillBuffer(unsigned long&, AudioBufferList&, AudioStreamPacketDescription*) + 315 39 ....audio.toolbox.AudioToolbox 0x90b7f71c AudioConverterFillComplexBuffer + 268 40 ...pple.audio.units.Components 0x700091e7 0x70000000 + 37351 41 ...pple.audio.units.Components 0x70008766 0x70000000 + 34662 42 ...pple.audio.units.Components 0x70006d48 0x70000000 + 27976 43 ...pple.audio.units.Components 0x70005bbb 0x70000000 + 23483 44 ...pple.audio.units.Components 0x7000c099 AUGenericOutputEntry + 7864 45 com.apple.audio.CoreAudio 0x93ddc028 HP_IOProc::Call(AudioTimeStamp const&, AudioTimeStamp const&, AudioBufferList const*, AudioTimeStamp const&, AudioBufferList*) + 374 46 com.apple.audio.CoreAudio 0x93ddbd8e IOA_Device::CallIOProcs(AudioTimeStamp const&, AudioTimeStamp const&, AudioTimeStamp const&) + 370 47 com.apple.audio.CoreAudio 0x93ddbb7e HP_IOThread::PerformIO(AudioTimeStamp const&, double) + 620 48 com.apple.audio.CoreAudio 0x93dd8f40 HP_IOThread::WorkLoop() + 2506 49 com.apple.audio.CoreAudio 0x93dd8571 HP_IOThread::ThreadEntry(HP_IOThread*) + 17 50 com.apple.audio.CoreAudio 0x93dd8488 CAPThread::Entry(CAPThread*) + 140 51 libSystem.B.dylib 0x93730259 _pthread_start + 345 52 libSystem.B.dylib 0x937300de thread_start + 34


#2

Oh boy!

After some more digging into the actual xcode build settings and differences between the Debug and Release configutations I decided to change the Release Preprocessor Macros from:

to

and the plugin now works.

I’ve had a search for the _DEBUG definition use which results in the definition of JUCE_DEBUG and JUCE_DEBUG only shows up in about 80 places in the juce library and all usage would result in an assertion if something was wrong in Debug mode. I’m completely lost at this point.


#3

Not sure what to suggest… Probably the first thing I’d try would be to run it in the debugger and step through that processBlock call in detail, watching what happens in there, and hopefully you’d spot something suspicious going on.