Hi,
I’m seeing this strange crash in the AU version on my synth plugin. I’m on BigSur with an intel Macbook Pro and I’m using JUCE v7.0.7.
It crashes in both AudioPluginHost and Logic Pro X. In the first it gets through the first processBlock
call - which does nothing but clearing the buffer - and then crashes. In Logic it crashes as soon as I record enable the track.
The thread crashing is the com.apple.audio.IOThread.client
- the same that just went through processBlock
. This is the stack trace:
_os_object_retain 0x00007fff206b79be
RenderContextChangeGenerator::checkChange() 0x00007fff21c3d305
AudioUnitRender 0x00007fff21dfbeff
juce::AudioUnitPluginInstance::processAudio(juce::AudioBuffer<float>&, juce::MidiBuffer&, bool) 0x000000010961d7d6
juce::GraphRenderSequence<float>::NodeOp::process(juce::GraphRenderSequence<float>::Context const&) 0x00000001095db386
juce::GraphRenderSequence<float>::perform(juce::AudioBuffer<float>&, juce::MidiBuffer&, juce::AudioPlayHead*) 0x00000001095deeac
juce::AudioProcessorPlayer::audioDeviceIOCallbackWithContext(float const* const*, int, float* const*, int, int, juce::AudioIODeviceCallbackContext const&) 0x000000010959f056
juce::AudioDeviceManager::CallbackHandler::audioDeviceIOCallbackWithContext(float const* const*, int, float* const*, int, int, juce::AudioIODeviceCallbackContext const&) 0x00000001098c7e1f
juce::CoreAudioClasses::CoreAudioInternal::audioIOProc(unsigned int, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*) 0x00000001098c2f27
invocation function for block in HALC_ProxyIOContext::HALC_ProxyIOContext(unsigned int, unsigned int) 0x00007fff221dea8c
HALB_IOThread::Entry(void*) 0x00007fff22379b04
_pthread_start 0x00007fff208628fc
thread_start 0x00007fff2085e443
And this is the instructions leading up to the crash on ud2
_os_object_retain:
movq %rdi, %rax
movl 0xc(%rdi), %ecx
cmpl $0x7fffffff, %ecx ; imm = 0x7FFFFFFF
je 0x7fff201639af ; <+20>
lock
incl 0xc(%rax)
jle 0x7fff201639b0 ; <+21>
retq
leaq 0x347ce(%rip), %rcx ; "API MISUSE: Resurrection of an object"
movq %rcx, 0x604d1dca(%rip) ; gCRAnnotations + 8
--> ud2
So one clue is that “API MISUSE: Resurrection of an object”, but I don’t know what it means and my google search didn’t get me anywhere.
It’s not a small project and there’s plenty of places things could go wrong.
So before I start just commenting out big chunks of code to narrow the scope: has anyone else been here before or have any tips on how to debug this?