gpt4 book ai didi

crash - AVSpeechSynthesizer导致ios11.4崩溃

转载 作者:行者123 更新时间:2023-12-03 17:04:44 27 4
gpt4 key购买 nike

我遇到了与崩溃有关的AVSpeechSynthesizer。我的代码是

   AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc] initWithString:text];

utterance.rate = rate;
utterance.pitchMultiplier = pitchMultiplier;
utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:languageCode];
_startTime = [[NSDate date] timeIntervalSince1970];
[self.speechSynthesizer speakUtterance:utterance];
只有一种用户案例导致此崩溃。操作系统版本为11.4,设备为iPhone6。
崩溃堆栈信息:
Incident Identifier: 24E003DC-47C0-45B0-A22E-A351B2A8046A
CrashReporter Key: c8844c975fe64b90aad2b813254959a928e4c4ea
Hardware Model: iPhone7,2
Process: qcs.r [779]
Path: /var/containers/Bundle/Application/0242C042-0AE5-4033-AE07-D1BECD6DD910/qcs.r.app/qcs.r
Identifier: com.meituan.qcs.r.ios
Version: 2.1.9 (1682)
Code Type: ARM-64
Parent Process: ? [1]

Date/Time: 2018-06-14 13:41:58.000 +0800
OS Version: iOS 11.4 (15F79)
Report Version: 104

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000 at 0x0000000000000000
Crashed Thread: 53

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[NSString stringWithUTF8String:]: NULL cString
UserInfo:(null)'

Thread 53 Crashed:
0 CoreFoundation __exceptionPreprocess+ 228
1 libobjc.A.dylib objc_exception_throw (in libobjc.A.dylib) + 56
2 CoreFoundation -[NSException initWithCoder:]+ 0
3 Foundation +[NSString stringWithUTF8String:]+ 92
4 TTSSpeechBundle 0x0000000105f87544 0x105f70000 + 95556
5 libsystem_pthread.dylib _pthread_body (in libsystem_pthread.dylib) + 272
6 libsystem_pthread.dylib _pthread_body (in libsystem_pthread.dylib) + 0
7 libsystem_pthread.dylib thread_start (in libsystem_pthread.dylib) + 4

最佳答案

您的文字论点在任何情况下都能为零吗? initWithString:text

关于crash - AVSpeechSynthesizer导致ios11.4崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50874467/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com