I'm experiencing an intermittent failure to load my audio unit in Garageband. Though the error message is obvious, I can't find any documentation on the timeout specification. Has anyone else come across this?
AU failed to load in time
Found some documentation at least giving an upper bound:
"App extensions should feel nimble and lightweight to users. Design your app extension to launch quickly, aiming for well under one second. An extension that launches too slowly is terminated by the system."
This is becoming slightly difficult to debug! The console logs for a successful launch are nearly identical to those of an unsuccessful launch. I have observed "AU failed to load in time" for both cases. Ultimately when my AU fails to load, I see an exclamation mark over the plugin item in the list and it's inactive in the audio chain.
The intermittent nature of the problem suggests a timing issue, and App Launch shows total time for launching my standalone app is 1.5s, which exceeds the upper bound in the docs. But there's not much help from the logs. I would have expected some difference when things work thus pointing me in the right direction.
Has anyone else ran into this problem?
yes! I am having this exact same issue, but my app extension loads in _way_ under 1.5s. I've been trying to debug mine for over a month, and after reproducing it with even the XCode template, I gave up on it figuring something is fundamentally broken in Garage Band regarding external Audio Unit v3 plugins. It does not seem to be an issue with v2 plugins.
If anyone has any ideas how to debug this, I too would love to know what I am doing wrong, or just confirm it's a Garage Band issue with v3 (although has been for the past two major releases) and move on.
TESTING OPEN TIMES:
COLD:
2020-05-13 23:00:19.832 auvaltool[31241:1581773] *** Assertion failure in +[NSServiceViewController currentAppIsViewService], /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/ViewBridge/ViewBridge-464.1/NSViewService.m:140
2020-05-13 23:00:19.832 auvaltool[31241:1581773] *** Assertion failure in +[NSServiceViewController currentAppIsViewService], /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/ViewBridge/ViewBridge-464.1/NSViewService.m:140
Time to open AudioUnit: 417.959 ms
WARM:
Time to open AudioUnit: 102.353 ms
This AudioUnit is a version 3 implementation.
FIRST TIME:
Time for initialization: 2.181 ms