What are DAWs reading when scanning the plugins folders?
-
- KVRian
- Topic Starter
- 626 posts since 30 Aug, 2012
When I attach Logic Pro X to the debugger in Xcode it shows that my AU plugin's constructor is not called until the plugin is actually loaded onto a track. Scanning the plugin in Plugin Manager shows no action, i.e., a hitpoint at the constructor is not triggered.
So if the plugin constructor is not being called during plugin scanning what are DAWs reading that tells them the I/O configuration capabilities of the available plugins? Is there some other function or header file that provides the plugin I/O information?
How, exactly, does this work?
So if the plugin constructor is not being called during plugin scanning what are DAWs reading that tells them the I/O configuration capabilities of the available plugins? Is there some other function or header file that provides the plugin I/O information?
How, exactly, does this work?
Last edited by Fender19 on Sat Aug 01, 2020 3:32 pm, edited 1 time in total.
- KVRAF
- 2239 posts since 25 Sep, 2014 from Specific Northwest
As far as I recall, auval and DAWs do instantiate the plugin and poke it with numerous sticks.
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better?
- KVRist
- 243 posts since 24 Aug, 2014
AudioUnits have all required info in the Info.plist file. There is no need to instantiate plugin to get its information.
For I/O instantiation required and it should be done.
For I/O instantiation required and it should be done.
-
- KVRian
- Topic Starter
- 626 posts since 30 Aug, 2012
-
- KVRian
- Topic Starter
- 626 posts since 30 Aug, 2012
-
Fire Sledge - Ohm Force Fire Sledge - Ohm Force https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=46
- KVRist
- 121 posts since 2 Nov, 2000 from 404 - Not found
Probably because the host uses a separate process to collect the information. If the plug-in crashes hard because of some issue (missing resource, dongle, poor implementation, etc.) this doesn’t crash the host.
-
- KVRian
- Topic Starter
- 626 posts since 30 Aug, 2012
Any tips on how to debug it in that case?Fire Sledge - Ohm Force wrote: ↑Sat Aug 01, 2020 8:23 pmProbably because the host uses a separate process to collect the information. If the plug-in crashes hard because of some issue (missing resource, dongle, poor implementation, etc.) this doesn’t crash the host.
-
Jeff McClintock Jeff McClintock https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=56398
- KVRist
- 413 posts since 30 Jan, 2005 from New Zealand
Scanning a plugin is pretty quick, so you usually don't have the opportunity to attach a debugger. In this situation, I sometimes temporarily add a dialog box to the plugin's constructor. What this does is pause the plugin and give you the time to attach a debugger.Fender19 wrote: ↑Sat Aug 01, 2020 11:04 pmAny tips on how to debug it in that case?Fire Sledge - Ohm Force wrote: ↑Sat Aug 01, 2020 8:23 pmProbably because the host uses a separate process to collect the information. If the plug-in crashes hard because of some issue (missing resource, dongle, poor implementation, etc.) this doesn’t crash the host.
- KVRian
- 1074 posts since 26 Nov, 2007
as far as i know the DAW is just looking for a 'listing' to place in it's browser although in Studio One for instance during the scan it also looks for validation of the plugin like ilok returned response or checking if demo items are current or expired. i don't think it is an actual 'call' for the plugin... just scans attached info
"There is no strength in numbers... have no such misconception... but when you need me be assured I won't be far away."
-
- KVRian
- Topic Starter
- 626 posts since 30 Aug, 2012
What attached info? There is nothing in the plugin Info.plist about plugin I/O capabilities.MadDogE134 wrote: ↑Mon Aug 03, 2020 12:21 am i don't think it is an actual 'call' for the plugin... just scans attached info
How does the DAW "know" if a plugin is mono or stereo, has side chain capability, etc.? Somehow the DAW determines that BEFORE the plugin is loaded into a project - so the DAW displays the plugin in the applicable channel FX lists, etc.
This is baffling! How does it work?
-
- KVRist
- 194 posts since 13 Oct, 2012
Why don't you write some log output to a file and have a look at said file after running the plugin scan.
It is also possible that the DAW and even Plugin Manager doesn't scan the plugin again as long as it hasn't change. For that the plugin file's timestamps, size and even version could be checked.
Regarding debugging a plugin scan: I remember vaguely that this won't work if the scan is done by another process. I think I ran into this when trying to figure out why auval wouldn't validate a plugin in Logic but had to run auvaltool instead of Logic for debugging. Nowadays you have to copy auvaltool to some location where you can actually select it for debugging but luckily, I haven't had to do this for some time so I'm not sure.
It is also possible that the DAW and even Plugin Manager doesn't scan the plugin again as long as it hasn't change. For that the plugin file's timestamps, size and even version could be checked.
Regarding debugging a plugin scan: I remember vaguely that this won't work if the scan is done by another process. I think I ran into this when trying to figure out why auval wouldn't validate a plugin in Logic but had to run auvaltool instead of Logic for debugging. Nowadays you have to copy auvaltool to some location where you can actually select it for debugging but luckily, I haven't had to do this for some time so I'm not sure.
-
- KVRian
- Topic Starter
- 626 posts since 30 Aug, 2012
Yes, I did that with auvaltool and now I can see what's happening in auvaltool. However, some plugins that PASS auval FAIL in Logic. That is what I'm dealing with right now. I can't "see" what's happening in Logic before the plugin is actually loaded onto a track to understand what's preventing it from loading.lkjb wrote: ↑Mon Aug 03, 2020 7:16 pm Regarding debugging a plugin scan: I remember vaguely that this won't work if the scan is done by another process. I think I ran into this when trying to figure out why auval wouldn't validate a plugin in Logic but had to run auvaltool instead of Logic for debugging. Nowadays you have to copy auvaltool to some location where you can actually select it for debugging but luckily, I haven't had to do this for some time so I'm not sure.
- KVRian
- 872 posts since 6 Aug, 2005 from England
It seems silly and somehow old fashioned, but have you tried rebooting the computer?
Logic tends to cache a lot of things.
Logic tends to cache a lot of things.
Dave Hoskins. http://www.quikquak.com
-
- KVRian
- Topic Starter
- 626 posts since 30 Aug, 2012
Yes! Cleared AudioUnitCache as well.
I understand that auval does not check for sidechains. So it is entirely possible to pass auval and fail in Logic if your plugin provides side chain inputs. That is the issue I'm having.
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?
- KVRian
- 799 posts since 25 Apr, 2011
I don't know if it works with Macs, but back in the day on Windows PCs I think you could compile an Int 3 instruction into your code which would trigger a debug breakpoint on execution - it might allow you to catch whatever it is that's calling your constructor?