iOS 13 SiriTTS crash

Following yesterdsay's iOS 13 release we are seeing a large amount of crash in SiriTTS:


Crashed: com.twitter.crashlytics.ios.exception
0  {app name}                    0x102c2d890 CLSProcessRecordAllThreads + 454980
1  {app name}                      0x102c2dc78 CLSProcessRecordAllThreads + 455980
2   {app name}                        0x102c1d4f0 CLSHandler + 388516
3   {app name}                        0x102c2be94 __CLSExceptionRecord_block_invoke + 448328
4  libdispatch.dylib              0x188009088  + 20
5  libdispatch.dylib              0x188015880  + 60
6   {app name}                        0x102c2b900 CLSExceptionRecord + 446900
7   {app name}                        0x102c2b3e4 CLSTerminateHandler() + 445592
8    {app name}                       0x1055faec8 CPPExceptionTerminate() + 179 (KSCrashMonitor_CPPException.cpp:179)
9  libc++abi.dylib                0x188121634  + 20
10 libc++abi.dylib                0x188120f58  + 34
11 libc++abi.dylib                0x188120f10 __cxa_throw + 126
12 SiriTTS                        0x18b0bbe7c  + 964
13 SiriTTS                        0x18b0bc390  + 152
14 SiriTTS                        0x18b1265c8  + 44
15 SiriTTS                        0x18b08d8ec  + 304
16 SiriTTS                        0x18b1064d0  + 68
17 SiriTTS                        0x18b1063e0  + 48
18 SiriTTS                        0x18b106380  + 56
19 SiriTTS                        0x18b106310  + 52
20 SiriTTS                        0x18b103b3c  + 164
21 SiriTTS                        0x18b103a68  + 64
22 SiriTTS                        0x18b0aa4c0  + 488
23 SiriTTS                        0x18b0ab608  + 1148
24 SiriTTS                        0x18b0a5540  + 532
25 SiriTTS                        0x18b0a56b4  + 192
26 TTSSpeechBundle                0x11f48c234 (Missing)
27 TTSSpeechBundle                0x11f49d720 (Missing)
28 TTSSpeechBundle                0x11f49d7cc (Missing)
29 TTSSpeechBundle                0x11f49ac24 (Missing)
30 TTSSpeechBundle                0x11f49c238 (Missing)
31 TTSSpeechBundle                0x11f49abd8 (Missing)
32 libsystem_pthread.dylib        0x18806cd60 _pthread_start + 128
33 libsystem_pthread.dylib        0x188074c88 thread_start + 8


Has anyone seen something similar?


We cannot reproduce, but we are seeing a large number of crash reports in Fabric.

Replies

I see exactly the same crashes, but no clue why.

changed "zh-CN" to "zh-Hans", maybe resolve it.
maybe Apple delete "zh-CN" in iOS13
Frome AVSpeechSynthesisVoice(language: "zh-CN") To AVSpeechSynthesisVoice(language: "zh-Hans")

It happens for me with different languages, so it seems there is some change in iOS 13. Maybe the TextToSpeech ressources are not loaded in time. Anybody any idea?


---------------------------------------------------------------------------------------------------

Code:


...

let voices = AVSpeechSynthesisVoice.speechVoices()


for voice in voices {

if voice.name == storedName {

synthVoice = voice

break

}

}


...


let utterance = AVSpeechUtterance(string: text)

utterance.voice = self.synthVoice

self.synthesizer.speak(utterance)


---------------------------------------------------------------------------------------------------

Error:

Fatal Exception: std::logic_error: Unable to find resource `lang'[kLanguage].


...

8 libc++abi.dylib 0x19c929304 std::__terminate(void (*)()) + 16

9 libc++abi.dylib 0x19c928c58 __cxa_get_exception_ptr + 30

10 libc++abi.dylib 0x19c928c18 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 122

11 SiriTTS 0x19f877894 VoiceConfig::report_error(unsigned int, VoiceConfig::IfMissing, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 960

12 SiriTTS 0x19f877d88 VoiceConfigImpl::get_json(unsigned int, VoiceConfig::IfMissing) const + 144

13 SiriTTS 0x19f8e1210 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > VoiceConfig::get_param<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(unsigned int, VoiceConfig::IfMissing) const + 36

14 SiriTTS 0x19f848490 NashvilleAdapterStream::NashvilleAdapterStream(nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::shared_ptr<SharedObjectPool>) + 308

15 SiriTTS 0x19f8c0158 std::__1::__compressed_pair_elem<NashvilleAdapterStream, 1, false>::__compressed_pair_elem<nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::shared_ptr<SharedObjectPool>&, 0ul, 1ul>(std::__1::piecewise_construct_t, std::__1::tuple<nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::shared_ptr<SharedObjectPool>&>, std::__1::__tuple_indices<0ul, 1ul>) + 72

16 SiriTTS 0x19f8c00d0 std::__1::__shared_ptr_emplace<NashvilleAdapterStream, std::__1::allocator<NashvilleAdapterStream> >::__shared_ptr_emplace<nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::shared_ptr<SharedObjectPool>&>(std::__1::allocator<NashvilleAdapterStream>, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&&&, std::__1::shared_ptr<SharedObjectPool>&&&) + 40

17 SiriTTS 0x19f8c0078 std::__1::shared_ptr<NashvilleAdapterStream> std::__1::shared_ptr<NashvilleAdapterStream>::make_shared<nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::shared_ptr<SharedObjectPool>&>(nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&&&, std::__1::shared_ptr<SharedObjectPool>&&&) + 52

18 SiriTTS 0x19f8bffd8 std::__1::shared_ptr<Module> std::__1::__invoke_void_return_wrapper<std::__1::shared_ptr<Module> >::__call<void ModuleFactory::ModuleFactoryImpl::register_module<NashvilleAdapterStream>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'(nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::shared_ptr<SharedObjectPool>)&, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::shared_ptr<SharedObjectPool> >(void ModuleFactory::ModuleFactoryImpl::register_module<NashvilleAdapterStream>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'(nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::shared_ptr<SharedObjectPool>)&&&, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&&&, std::__1::shared_ptr<SharedObjectPool>&&) + 48

19 SiriTTS 0x19f8bdeb4 ModuleFactory::ModuleFactoryImpl::create(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::shared_ptr<SharedObjectPool>) + 164

20 SiriTTS 0x19f8bdda4 ModuleFactory::create(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::shared_ptr<SharedObjectPool>) + 60

21 SiriTTS 0x19f8652e4 GryphonPipelineFactory::pipeline_from_config(std::__1::shared_ptr<SharedObjectPool>, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&) + 472

22 SiriTTS 0x19f866a84 GryphonPipelineFactory::nashvilleFE_backend_pipeline(std::__1::shared_ptr<SharedObjectPool>) + 1140

23 SiriTTS 0x19f85ffb0 FeatureExtractorTarget::init_with_object_pool(std::__1::shared_ptr<SharedObjectPool>, bool) + 924

24 SiriTTS 0x19f86027c FeatureExtractorTarget::init_with_install_path(char const*) + 272

25 TTSSpeechBundle 0x110480b50 (Missing)

26 TTSSpeechBundle 0x1104919c4 (Missing)

27 TTSSpeechBundle 0x110491a6c (Missing)

28 TTSSpeechBundle 0x11048ef44 (Missing)

29 TTSSpeechBundle 0x110490514 (Missing)

30 TTSSpeechBundle 0x11048eefc (Missing)

31 libsystem_pthread.dylib 0x19c8781f0 _pthread_start + 124

32 libsystem_pthread.dylib 0x19c87baf0 thread_start + 8

We have exactly the same crash with iOS 13 only, including the crash stack. Noticed there are also things like this:
Fatal Exception: std::logic_error: Unable to find resource `lang'[kLanguage]