There is an AudioUnitV3Example sample code by Apple for iOS. As well as Audio Unit Extension OS X target template in Xcode (7.2).
I created (for debug purpose) simple AUv3 PlugIns Host which used AVFoundation API to build playback engine graph. It is working well with standard AudioUnits shipped with OS X. It can instantiate AudioUnit, load preset, open effect window.
But I can't troubleshoot problem with custom AUv3 PlugIn created from Audio Unit Extension template.
It was already working some days ago and I was able to hit following breakpoint (as well as reach other code from AudioUnit lifecycle):
// AUAudioUnitFactory method.
func createAudioUnitWithComponentDescription(
desc: AudioComponentDescription) throws -> AUAudioUnit
But at some point a faced strange issue. The completionHandler
for custom PlugIn, from the following method, never gets called:
// AVAudioUnit method.
class func instantiateWithComponentDescription(
audioComponentDescription: AudioComponentDescription,
options: AudioComponentInstantiationOptions,
completionHandler: (AVAudioUnit?, NSError?) -> Void)
Also there is following log messages in system.log
:
com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.4.120
[23653]: debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.4.120
for x86_64.
com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.4.120
[23653]: Got a connection, waiting for process information for launching or attaching.
kernel[0]: warning: debugserver(23653) performed out-of-band resume on pid 23652
com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.4.120
[23653]: Attach succeeded, ready to debug.
pkd[562]: INSTALLED:ua.com.wavelabs.Attenuator.AttenuatorAU ua.com.wavelabs.Attenuator.AttenuatorAU(1.0.1) <__NSConcreteUUID 0x7f8dcb847fb0> 4FD70868-0F5B-4979-A6DC-4018B4143934 /private/tmp/Attenuator.dst/Applications/Attenuator.app/Contents/PlugIns/AttenuatorAU.appex
pkd[562]: client 23594 plug-in ua.com.wavelabs.Attenuator.AttenuatorAU election := 257
com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.MediaLibraryService.23655): Path not allowed in target domain: type = pid, path = /Library/Frameworks/iTunesLibrary.framework/Versions/A/XPCServices/com.apple.iTunesLibraryService.xpc error = 147: The specified service did not ship in the requestor's bundle, origin = /System/Library/Frameworks/MediaLibrary.framework/Versions/A/XPCServices/com.apple.MediaLibraryService.xpc
--- last message repeated 1 time ---
com.apple.SecurityServer[88]: Session 101187 created
com.apple.SecurityServer[88]: Session 101188 created
com.apple.SecurityServer[88]: Killing auth hosts
com.apple.SecurityServer[88]: Session 101182 destroyed
com.apple.SecurityServer[88]: Session 101189 created
pkd[562]: enabling pid=23652 for plug-in ua.com.wavelabs.Attenuator.AttenuatorAU(1.0.1) 4FD70868-0F5B-4979-A6DC-4018B4143934 /private/tmp/Attenuator.dst/Applications/Attenuator.app/Contents/PlugIns/AttenuatorAU.appex
taskgated-helper[23666]: Starting taskgated-helper
taskgated-helper[23666]: validated embedded provisioning profile: file:///private/tmp/Attenuator.dst/Applications/Attenuator.app/Contents/PlugIns/AttenuatorAU.appex/Contents/embedded.provisionprofile
taskgated-helper[23666]: Found 1 provisioning profiles
taskgated-helper[23666]: allowing entitlement(s) for pid=23665 due to provisioning profile
com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.4.120
[23668]: debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.4.120
for x86_64.
com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.4.120
[23668]: Got a connection, waiting for process information for launching or attaching.
kernel[0]: warning: debugserver(23668) performed out-of-band resume on pid 23665
com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.4.120
[23668]: Attach succeeded, ready to debug.
com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.AUHost.23652): Ignoring lax activation attempt for unsupported domain: ua.com.wavelabs.Attenuator.AttenuatorAU.apple-extension-service
com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.AUHost.23652): Ignoring lax activation attempt for unsupported domain: ua.com.wavelabs.Attenuator.AttenuatorAU.viewbridge
com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.AUHost.23652): Ignoring lax activation attempt for unsupported domain: ua.com.wavelabs.Attenuator.AttenuatorAU
From this log we can see that:
INSTALLED:ua.com.wavelabs.Attenuator.AttenuatorAU
).allowing entitlement(s) for pid=23665 due to provisioning profile
).Host
and Attenuator App Extension
.Unfortunately something went wrong after log messages Ignoring lax activation attempt for unsupported domain ...
. PlugIn load stuck on waiting for return from callback, which will never be triggered.(
After stopping Xcode debug there is another part of system.log
:
com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.4.120
[23653]: Got a 'k' packet, killing the inferior process.
com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.4.120
[23653]: Sending ptrace PT_KILL to terminate inferior process.
com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.4.120
[23653]: 1 +0.000000 sec [5c65/0307]: error: ::ptrace (request = PT_THUPDATE, pid = 0x5c64, tid = 0x1903, signal = 0) err = Resource busy (0x00000010)
com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.4.120
[23653]: 2 +0.000143 sec [5c65/0307]: error: ::task_info ( target_task = 0x1403, flavor = TASK_BASIC_INFO, task_info_out => 0x7fff56ac9f30, task_info_outCnt => 10 ) err = (os/kern) invalid argument (0x00000004)
com.apple.security.pboxd[23660]: __45-[NSRemoteServiceConnection _setupConnection]_block_invoke_2: connection failed unexpectedly; terminating process; delegate was (
0 RemoteViewServices 0x00007fff87e25a28 -[NSRemoteServiceConnection setDelegate:] + 255
1 com.apple.security.pboxd 0x00000001068e4771 com.apple.security.pboxd + 22385
2 com.apple.security.pboxd 0x00000001068e4c33 com.apple.security.pboxd + 23603
3 com.apple.security.pboxd 0x00000001068e3b8d com.apple.security.pboxd + 19341
4 libxpc.dylib 0x00007fff932b9396 _xpc_connection_call_event_handler + 35
5 libxpc.dylib 0x00007fff932b900f _xpc_connection_mach_event + 2198
6 libdispatch.dylib 0x00007fff914204ca _dispatch_client_callout4 + 9
7 libdispatch.dylib 0x00007fff9142093c _dispatch_mach_msg_invoke + 555
8 libdispatch.dylib 0x00007fff9141d134 _dispatch_queue_drain + 1207
9 libdispatch.dylib 0x00007fff9141f293 _dispatch_mach_invoke + 735
10 libdispatch.dylib 0x00007fff9141833f _dispatch_client_callout + 8
11 libdispatch.dylib 0x00007fff9141c1cf _dispatch_root_queue_drain + 1890
12 libdispatch.dylib 0x00007fff9141ba34 _dispatch_worker_thread3 + 91
13 libsystem_pthread.dylib 0x00007fff8ff3d68f _pthread_wqthread + 1129
14 libsystem_pthread.dylib 0x00007fff8ff3b365 start_wqthread + 13
)
AttenuatorAU[23665]: host connection <NSXPCConnection: 0x618000300990> connection from pid 23652 invalidated
com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.4.120
[23653]: Waited 10 ms for process to be reaped (state = Exited)
com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.4.120
[23653]: 3 +0.011781 sec [5c65/1303]: error: ::read ( 3, 0x700000080a40, 1024 ) => -1 err = Bad file descriptor (0x00000009)
com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.4.120
[23653]: Exiting.
com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.4.120
[23668]: 1 +0.000000 sec [5c74/0307]: error: ::task_info ( target_task = 0x1403, flavor = TASK_BASIC_INFO, task_info_out => 0x7fff5c5c2a30, task_info_outCnt => 10 ) err = (os/kern) invalid argument (0x00000004)
com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.4.120
[23668]: 2 +0.004318 sec [5c74/1303]: error: ::read ( 3, 0x700000080a40, 1024 ) => -1 err = Bad file descriptor (0x00000009)
com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.4.120
[23668]: Exiting.
Xcode[23287]: DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-10119.9/DVTFoundation/Devices/DVTLocalComputer.m:375
Details: Error un-registering Plugin: '/tmp/Attenuator.dst/Applications/Attenuator.app/Contents/PlugIns/AttenuatorAU.appex' Error: Error Domain=PlugInKit Code=9 "no plugin at /private/tmp/Attenuator.dst/Applications/Attenuator.app/Contents/PlugIns/AttenuatorAU.appex" UserInfo={NSLocalizedDescription=no plugin at /private/tmp/Attenuator.dst/Applications/Attenuator.app/Contents/PlugIns/AttenuatorAU.appex}
Object: <DVTLocalComputer: 0x7fd9b9efa050>
Method: -stopDebuggingXPCServices:forPairedDevice:
Thread: <NSThread: 0x7fd9c211cb60>{number = 47, name = (null)}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
pkd[562]: UNINSTALLED:ua.com.wavelabs.Attenuator.AttenuatorAU ua.com.wavelabs.Attenuator.AttenuatorAU(1.0.1) 4FD70868-0F5B-4979-A6DC-4018B4143934 /private/tmp/Attenuator.dst/Applications/Attenuator.app/Contents/PlugIns/AttenuatorAU.appex
From this part of log we can see the following:
NSRemoteServiceConnection
class.Can anybody explain what are the messages Ignoring lax activation attempt for ...
about?
Thank you!
Note: AUv3 Host
is not a Containing app. Containing app exists as well, but is does nothing except of participating App Extension
registration.
In order to reproduce issue you can download source code, open project AUSamplePlugIn/Attenuator.xcodeproj
and launch schema AttenuatorAU
.
User contributions licensed under CC BY-SA 3.0