AudioToolback Crash Introduced with iOS 14.2

We are experiencing a very consistent crash in our app that was introduced with iOS 14.2. We are using Crashlytics to track crashes and can confirm 100% of these new crashes are on 14.2 and above. We have also been able to recreate on 14.2 and the current second beta release of 14.3

We cannot recreate it on 14.1. Also, these features have been live for quite a while and no changes have been made to the features themselves in the last several iOS major/minor versions.

The specific error is:
error: memory read failed for 0x0:

com.apple.audio.toolbox.AUScheduledParameterRefresher (20): EXC_BAD_ACCESS (code=1, address=0x0)

The gist of the crash:

• We have a playback/recording mechanism in our application. This can either be playing back a single audio track or playing back multiple tracks at once.

• This only happens when we have audio effects enabled on the tracks (i.e. reverb, compression, etc.). We are using the AVAudioUnitEffect library to implement the audio effects on the tracks being played back.

• This happens when we manipulate settings on the effects and then try to do another action afterwards.

__

I cannot find any documentation on AUScheduledParameterRefresher. I have also extended the scope of my search in XCode to include the entire 14.2 SDK but there's no reference to it in there as well.

I'm having trouble getting any deeper into this issue. Any help would be greatly appreciated. Thank you!

__

For reference, here is a stack trace from Crashlytics on the thread where the crash occurs:
Code Block
Crashed: com.apple.audio.toolbox.AUScheduledParameterRefresher
EXC_BAD_ACCESS KERN_PROTECTION_FAILURE 0x00000001dd778040
0 ??? 0x1dd778040 (Missing)
1 AudioToolboxCore 0x196846638 AudioUnitGetParameter + 52
2 AudioToolboxCore 0x1967d8200 43-[AUAudioUnitV2Bridge _createParameterTree]_block_invoke.125 + 112
3 AudioToolboxCore 0x196788284 -[AUParameter _internalValue] + 252
4 AudioToolboxCore 0x19678ba28 20-[AUParameter value]_block_invoke + 32
5 libdispatch.dylib 0x186bce280 _dispatch_client_callout + 16
6 libdispatch.dylib 0x186bb10ec _dispatch_lane_barrier_sync_invoke_and_complete + 56
7 AudioToolboxCore 0x196788408 -[AUParameter value] + 244
8 AudioToolboxCore 0x1967daea0 parameterNodesEqual(AUParameterNode*, AUParameterNode*, std::1::vector<unsigned long long, std::1::allocator<unsigned long long> >&) + 1180
9 AudioToolboxCore 0x1967dac94 parameterNodesEqual(AUParameterNode*, AUParameterNode*, std::1::vector<unsigned long long, std::1::allocator<unsigned long long> >&) + 656
10 AudioToolboxCore 0x1967dac94 parameterNodesEqual(AUParameterNode*, AUParameterNode*, std::1::vector<unsigned long long, std::1::allocator<unsigned long long> >&) + 656
11 AudioToolboxCore 0x1967da9dc invocation function for block in void applesauce::dispatch::v1::sync_impl<-[AUAudioUnitV2Bridge _buildNewParameterTree]::$_0>(NSObject<OS_dispatch_queue>*, -[AUAudioUnitV2Bridge _buildNewParameterTree]::$_0&&, std::1::integral_constant<bool, true>) + 104
12 libdispatch.dylib 0x186bce280 _dispatch_client_callout + 16
13 libdispatch.dylib 0x186bb10ec _dispatch_lane_barrier_sync_invoke_and_complete + 56
14 AudioToolboxCore 0x1967d4034 -[AUAudioUnitV2Bridge _buildNewParameterTree] + 140
15 AudioToolboxCore 0x1967d4238 -[AUAudioUnitV2Bridge _invalidateParameterTree:] + 124
16 AudioToolboxCore 0x1967da820 caulk::concurrent::details::message_call<ParameterListPropertyListener(void*, OpaqueAudioComponentInstance*, unsigned int, unsigned int, unsigned int)::$_5>::perform() + 52
17 AudioToolboxCore 0x1967da7bc caulk::concurrent::details::rt_message_call<ParameterListPropertyListener(void*, OpaqueAudioComponentInstance*, unsigned int, unsigned int, unsigned int)::$_5>::perform() + 24
18 caulk 0x1c89c2280 caulk::concurrent::details::messenger_servicer::check_dequeue() + 104
19 caulk 0x1c89c1f34 caulk::concurrent::details::worker_thread::run() + 56
20 caulk 0x1c89c20bc void* caulk::thread_proxy<std::1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*> > >(void*) + 56
21 libsystem_pthread.dylib 0x1cd5a0b3c _pthread_start + 288
22 libsystem_pthread.dylib 0x1cd5a5880 thread_start + 8`
Update: I have tried enabling Zombie Objects and the Address Sanitizer in XCode to get more information. Even with Zombie Objects enabled, I still received the same EXCBADACCESS error.
Based on the EXCBADACCESS error, my guess is that some piece of the process gets deallocated from memory and when the code goes to alter the settings on the audio effect it no longer exists. I turned on Zombies to try to capture any deallocated objects in Instruments but it did not turn anything up.

I also downloaded the iOS 14.1 SDK and ran a comparison on the audio frameworks to iOS 14.2 (AudioToolbox, AVFoundation, etc.) to see if anything significant had changed but it doesn't appear so so it could be a bit lower level than even these libraries.
We have created a minimal app that shows this error in a bit simpler detail. This is stripped down to the base AVAudioUnitEffect classes:

https://github.com/audiobridge/iOSCrashDemo
After using the sample app we created (see last comment) we have identified that this is due to an issue with AVAudioUnitEQ specifically. If you remove that effect from the chain in the sample app, the crash never occurs. It would seem that even after we destroy the instance of the AVAudioUnitEQ effect (when it is no longer needed) there is still a process that tries to reference it after the fact.

There may be an asynchronous process referencing these audio effects after the fact but when it does try to find it, the effect has already been destroyed.

This does not happen for the other effects and seems to be isolated specifically to the AVAudioUnitEQ.
AudioToolback Crash Introduced with iOS 14.2
 
 
Q