【发布时间】:2018-03-30 14:52:56
【问题描述】:
我的新闻应用中有文字转语音功能,我的用户可以用它来朗读新闻文章。为此,我使用了 AVSpeechSynthesizer。我在我的实时应用程序中看到了很多崩溃,显示在 Crashlytics 上。在通过 XCode 运行应用程序的测试设置中,或者在我的 iPhone 上使用实时应用程序时,我都能够重现此崩溃。我在此处附加 Crashlytics 堆栈跟踪:
#16
Crashed: AXSpeech
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x000041a1b76ca3c1
Crashed: AXSpeech
0 libsystem_pthread.dylib 0x1860ff764 pthread_mutex_lock$VARIANT$mp + 354
1 CoreFoundation 0x18639793c CFRunLoopSourceSignal + 68
2 Foundation 0x186de00c4 performQueueDequeue + 464
3 Foundation 0x186ecf218 __NSThreadPerformPerform + 136
4 CoreFoundation 0x18647b77c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
5 CoreFoundation 0x18647b6fc __CFRunLoopDoSource0 + 88
6 CoreFoundation 0x18647afd8 __CFRunLoopDoSources0 + 288
7 CoreFoundation 0x186478b5c __CFRunLoopRun + 1048
8 CoreFoundation 0x186398c58 CFRunLoopRunSpecific + 436
9 Foundation 0x186dcd594 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
10 libAXSpeechManager.dylib 0x195ccf854 -[AXSpeechThread main] + 284
11 Foundation 0x186ecf0f4 __NSThread__start__ + 996
12 libsystem_pthread.dylib 0x1860fc2b4 _pthread_body + 308
13 libsystem_pthread.dylib 0x1860fc180 _pthread_body + 310
14 libsystem_pthread.dylib 0x1860fab74 thread_start + 4
很明显,AXSpeech 线程已经崩溃。有人可以帮我解决这个问题,因为我一直在拉扯我的头发无济于事,而且无崩溃用户的下降百分比一直困扰着我。
【问题讨论】: