首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在ios11.4上导致崩溃的AVSpeechSynthesizer

在ios11.4上导致崩溃的AVSpeechSynthesizer
EN

Stack Overflow用户
提问于 2018-06-15 19:15:16
回答 1查看 272关注 0票数 0

我得到了一个与车祸有关的AVSpeechSynthersizer。我的代码是,

代码语言:javascript
复制
   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。

崩溃堆栈信息:

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

发布于 2018-06-28 03:05:58

你的文本参数会不会碰巧是空的?initWithString:文本

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50874467

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档