Compatability with Logic and older versions of MacOS

Hi,

I’m in the process of beta testing and making sure that my plugins work for all my users.
If you would like to see them you can visit my website at
www.PotenzaDSP.com
One of my users has experienced a crash in their Logic environment (I do not have logic so I’m unable personally to test with it).
The stack trace looks like this:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff2042792e __pthread_kill + 10
1   libsystem_pthread.dylib       	0x00007fff204565bd pthread_kill + 263
2   libsystem_c.dylib             	0x00007fff203ab406 abort + 125
3   libc++abi.dylib               	0x00007fff20419ef2 abort_message + 241
4   libc++abi.dylib               	0x00007fff2040b5fd demangling_terminate_handler() + 266
5   libobjc.A.dylib               	0x00007fff2030458d _objc_terminate() + 96
6   libc++abi.dylib               	0x00007fff20419307 std::__terminate(void (*)()) + 8
7   libc++abi.dylib               	0x00007fff204192a9 std::terminate() + 41
8   com.PotenzaDSP.PullUpMachine  	0x0000000131ad3ee6 JuceAU::JuceUICreationClass::JuceUICreationClass()::'lambda'(objc_object*, objc_selector*, ComponentInstanceRecord*, CGSize)::__invoke(objc_object*, objc_selector*, ComponentInstanceRecord*, CGSize) + 166
9   com.apple.music.apps.MAAudioUnitSupport	0x000000010e8cfb29 0x10e8be000 + 72489
10  com.apple.music.apps.MAAudioEngine	0x00000001108165d6 CMDAudioUnit::MakeEditorView(long, TGroupID) + 294
11  com.apple.logic10             	0x000000010ca59144 0x10b27f000 + 25010500
12  com.apple.logic10             	0x000000010c5aebba 0x10b27f000 + 20118458
13  com.apple.logic10             	0x000000010c5ae53b 0x10b27f000 + 20116795
14  com.apple.logic10             	0x000000010c5b2a4a 0x10b27f000 + 20134474

from what it looks like it stems from line 8, in which some “JUCEAU” invokes some sort of UI creation. However the plugin wasn’t even loaded in the project. Logic simply crashed with the AU in the components directory. Is there some special handling to ensure compatability with Logic?

Furthermore one of my users is using a slightly older version of macos, i believe 10.14 or 10.15. No matter what I have tried, not a single one of my plugins run on his machine. I am building using cmake in a Github Action runner (runner is macos-11, -DCMAKE_OSX_ARCHITECTURES=“arm64;x86_64”, and I have called set(CMAKE_OSX_DEPLOYMENT_TARGET “10.13”)).
The AU is visible under “PotenzaDSP” in ableton but it says “can’t open” when he tries to open, and PotenzaDSP is absent from the VST3 plugin list.

Can anyone suggest some considerations that one could take in order to ensure compatability across DAWs and versions of macos? I know this is a mammoth question :smile: but i am at a loss now for what to do.

It looks like the crash is happening in the uiViewForAudioUnit:withSize: method implementation of the JuceUICreationClass. You should be able to find this by searching in juce_audio_plugin_client_AU_1.mm. It’s not clear exactly which line is causing the crash. Given that you don’t have Logic, debugging might be a bit difficult. Perhaps you could create a build with some extra logging output in that function and send this build to your tester, so that you can at least find out which line crashes.

I don’t think we’ve had this particular crash reported before, so my guess is that the crash is specific to your plugin - perhaps something’s going wrong while creating the editor component, though I’m not sure why Logic would be attempting to create the editor if the plugin hasn’t been instantiated.

Logic does have a few quirks, but this particular issue isn’t one that I’ve seen before.

According to the docs, CMAKE_OSX_DEPLOYMENT_TARGET should be set before the first call to project(), so it’s normally safest to specify it on the commandline, in the same way that you did for CMAKE_OSX_ARCHITECTURES. Maybe that’s the issue.

Yes after a lot of searaching, this seemed to be the problem. The delpoyment target was set after the call to project().

As for the Logic crash, I’m unsure what you mean by

does this file show in the cmake files when I configure/build?
What type of logging would you recommend for debugging this sort of issue? DBG()?

You can find the file in the JUCE repo:

I’d recommend logging the output to a file, so that your tester can send you a copy of that file after a crash.