What are DAWs reading when scanning the plugins folders?

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

Fender19 wrote: Tue Aug 04, 2020 6:27 pm The question I have is how, and from where, is Logic getting that plugin I/O information since it does not appear to launch the plugin's constructor until the plugin is actually loaded onto a track?
It's getting it via auval in a separate process. It does it once and then caches the result. If you write a log file from your plugins constructor, you'll see it's being called when you delete /Users/[user]/Library/Caches/AudioUnitCache then launch Logic. Or you can select the plugin in Logic's Plug-In Manager and hit "Reset and Rescan Selection"

As far as the cause of the issue, it sounds like it may be due to a threading related race conditon. Hence why auval is ok and and Logic not. You can usually catch these using the Diagnostics > Thread Sanitizer in "Edit Scheme" in XCode, using a light weight host like the one in JUCE or AudioKit.

Post

gnjp wrote: Thu Aug 06, 2020 7:07 pm
Fender19 wrote: Tue Aug 04, 2020 6:27 pm The question I have is how, and from where, is Logic getting that plugin I/O information since it does not appear to launch the plugin's constructor until the plugin is actually loaded onto a track?
It's getting it via auval in a separate process. It does it once and then caches the result. If you write a log file from your plugins constructor, you'll see it's being called when you delete /Users/[user]/Library/Caches/AudioUnitCache then launch Logic. Or you can select the plugin in Logic's Plug-In Manager and hit "Reset and Rescan Selection"
I was running Logic in the debugger and "Reset and Rescan" on my plugin but none of my plugin constructor breakpoints were triggered. Is there a trick to getting that to show in XC debugger since it's a separate process in Logic?
gnjp wrote: Thu Aug 06, 2020 7:07 pm As far as the cause of the issue, it sounds like it may be due to a threading related race conditon. Hence why auval is ok and and Logic not. You can usually catch these using the Diagnostics > Thread Sanitizer in "Edit Scheme" in XCode, using a light weight host like the one in JUCE or AudioKit.
Excellent info and suggestion. Thank you!

Post

You can run LLDB from the terminal and wait for auvaltool to be launched by Logic:

Code: Select all

> lldb
> process attach --name "auvaltool" --waitfor
You'll have to disable SIP though otherwise you'll get:

Code: Select all

error: attach failed: Process attach denied, possibly because System Integrity Protection is enabled and process does not allow attaching. 
..it validates in Apple's auvaltool; and it validates in Logic - runs in Reaper - but it doesn't run in Logic.
It's probably not going to tell you much though as you problem seems to be due to a bug related to Logic rather than auval. I've seen similar behaviour with AUs, as Reaper can be more forgiving than Logic. I'd concentrate on debugging Logic directly with breakpoints etc. The Thread Sanitizer can cause a failure in auval hence why I use simple hosts like the one from AudioKit where you have the source code.

Post Reply

Return to “DSP and Plugin Development”