AXSpeech crash with CoreFoundation _CFGetNonObjCTypeID

Hi, I am facing a strange issue in my app there is an intermittent crash, I am using AVSpeechSynthesizer for speech discovery not sure if that is causing the problem crash log has below information: Firebase Crash log

Crashed: AXSpeech
0  CoreFoundation                 0x197325d00 _CFAssertMismatchedTypeID + 112
1  CoreFoundation                 0x197229188 CFRunLoopSourceIsSignalled + 314
2  Foundation                     0x198686ca0 performQueueDequeue + 440
3  Foundation                     0x19868641c __NSThreadPerformPerform + 112
4  CoreFoundation                 0x19722c990 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
5  CoreFoundation                 0x19722c88c __CFRunLoopDoSource0 + 208
6  CoreFoundation                 0x19722bbfc __CFRunLoopDoSources0 + 376
7  CoreFoundation                 0x197225b70 __CFRunLoopRun + 820
8  CoreFoundation                 0x197225308 CFRunLoopRunSpecific + 600
9  Foundation                     0x198514d8c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232
10 libAXSpeechManager.dylib       0x1c3ad0bbc -[AXSpeechThread main]
11 Foundation                     0x19868630c __NSThread__start__ + 864
12 libsystem_pthread.dylib        0x1e2f20bfc _pthread_start + 320
13 libsystem_pthread.dylib        0x1e2f29758 thread_start + 8

Apple Crash log

i have same problem, how did you found the solution?

i have same problem, in iOS 15.4.x crash.

see the full log. crash in iOS 15.4.x

Looks like crash is due to dangling pointer, use a shared speech session.

  static let shared = mySpeechSynthesizerSession()
  var speechSynthesizer: AVSpeechSynthesizer?
  private init() {
    speechSynthesizer = AVSpeechSynthesizer()
  }
}
AXSpeech crash with CoreFoundation _CFGetNonObjCTypeID
 
 
Q