Crash in logic 10.4.4 when closing

I observed this crash also with plugins from other manufactures. It happens only when you close logic while a project is still open. It seems there is a bug in the CoreAudioUtilityClasses from Apple (which are used inside juce), but maybe its just a bug in Logic 10.4.4. I am not sure…

This is a typical stack trace from the crash-reporter. The screenshot was from the rare case, I detected this problem while running a debugger with symbols.

|0   libsystem_platform.dylib      |0x00007fff5b375dec _platform_memmove$VARIANT$Haswell + 268|
|---|---|
|1   com.Manufacturer.Plugin|0x000000011cfb990e 0x11cfa5000 + 84238|
|2   com.Manufacturer.Plugin |0x000000011cfb5528 0x11cfa5000 + 66856|
|3   com.Manufacturer.Plugin |0x000000011cfa780e 0x11cfa5000 + 10254|
|4   com.apple.music.apps.MAAudioEngine|0x0000000110514177 CMDAudioUnit::Process(MDPlugInputBusList const*, MDPlugOutputBusList const*, long, long, long, float const*, eProcessLevel) + 7447|
|5   com.apple.music.apps.MAAudioEngine|0x0000000110474090 MDPlug::_Process(MDPlugInputBusList const*, MDPlugOutputBusList const*, long, long, long, float const*, eProcessLevel) + 1424|
|6   com.apple.music.apps.MAAudioEngine|0x000000011044938f MD::PluginProcess(MDProcInfo*, MDPlug*, long, long, long, eProcessLevel) + 5247|
|7   com.apple.music.apps.MAAudioEngine|0x000000011044635c MD::StreamProcessing(eProcessLevel, long, long, long, int) + 10380|
|8   com.apple.music.apps.MAAudioEngine|0x000000011043f19b MD::Process(eProcessLevel) + 3403|
|9   com.apple.music.apps.MAAudioEngine|0x0000000110454486 MD::CallProcessThread(long) + 342|

Would it matter if some if

in AUBuffer.h line 134

if (destbuf->mData != srcbuf->mData)

will be replaced with

if (destbuf->mData!=nullptr && destbuf->mData != srcbuf->mData)

if mData is a nullptr, it will crash anyway, and this prevents a crash in the logic 10.4.4 shut down process, what’s your opinion?

@ed95 @t0m

Well, AUBuffer.h is Apple code, not JUCE, right? So changing it would require filing a bug report with Apple. (Good luck with that!)

But if I were debugging that code, I’d first ask why destbuf->mData is NULL, and what should really happen if it is. Should that code block be skipped, or should it be allocated and then the data copied, or…? Just checking for NULL is avoiding the bigger picture of how it got that way, what that means, and what is the proper action to take (here or elsewhere).

Just my 2 cents.

you are right! Its apple code, but as I understand these classes are “example” code to wrap the Core Audio calls and not a SDK. Its seems apple didn’t update this code recently, or did they? Does anybody now from where you can get it, couldn’t find it in the developer section. The problem it’s resides in the plugin binary, it won’t get updated. So from customers perspective the plugin is crashing. From what I understand from the AU architecture, the plugin are directly chained on each other, and the seems logic releases the plugin too early, whatever. I am pretty sure its a bug introduced with logic 10.4.4, and only appears when you close logic und some circumstances, but not when you close the project and load another.