arm64 Logic Leaking Plugins (Not Calling AP_Close)

I'm running into an issue where in some cases, when the AUHostingServiceXPC_arrow process is shut down by Logic, the process is terminated abruptly without calling AP_Close on all of the plugins hosted in the process. In our case, we have filesystem resources we need to clean up, and having stale files around from the last run can cause issues in new sessions, so this leak is having some pretty gnarly effects.

I can reproduce the issue using only Apple sample plugins, and it seems to be triggered by a timeout. If I have two different AU plugins in the session, and I add a 1 second sleep to the destructor of one of the sample plugins, Logic will force terminate the process and the remaining destructors are not called (even for the plugins without the 1 second sleep).

Is there a way to avoid this behavior? Or to safely clean up our plugin even if other plugins in the session take a second to tear down?

Hello @jcampbell-ua, thank you for your post. Our engineering teams need to investigate this issue, as resolution may involve changes to Apple's software. I'd greatly appreciate it if you could open a bug report, include a sysdiagnose, and post the FB number here once you do. Bug Reporting: How and Why? has tips on creating your bug report.

arm64 Logic Leaking Plugins (Not Calling AP_Close)
 
 
Q