如何在 SKAudioNode 中诊断崩溃报告

how to diagnose a crash report in SKAudioNode

提问人:Fault 提问时间:7/25/2023 更新时间:7/25/2023 访问量:21

问:

谁能帮忙解释下面的崩溃报告?这种情况很少发生,而且它来自远程用户,因此我无法访问控制台输出。我无法重现该错误。

它似乎发生在 .有没有办法知道触发了哪种异常?有人知道这是怎么回事吗?SKAction.play()AVAEInternal.h:77

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread:  0

Last Exception Backtrace:
0   CoreFoundation                  0x1ae36edb4 __exceptionPreprocess + 160 (NSException.m:202)
1   libobjc.A.dylib                 0x1ac7f99a0 objc_exception_throw + 56 (objc-exception.mm:356)
2   CoreFoundation                  0x1ae4c753c +[NSException raise:format:arguments:] + 92 (NSException.m:0)
3   AVFAudio                        0x1c8385114 AVAE_RaiseException(NSString*, ...) + 48 (AVAEInternal.h:69)
4   AVFAudio                        0x1c84635f4 AVAudioPlayerNodeImpl::StartImpl(AVAudioTime*) + 576 (AVAEInternal.h:77)
5   AVFAudio                        0x1c8460f98 -[AVAudioPlayerNode play] + 76 (AVAudioNodeImpl.h:162)
6   SpriteKit                       0x1f8461194 __33+[SKAction(PlaybackControl) play]_block_invoke + 172 (SKAudioNode.mm:268)
7   SpriteKit                       0x1f84d5154 SKCCustomAction::cpp_updateWithTargetForTime(SKCNode*, double) + 68 (SKCustomAction.mm:34)
8   SpriteKit                       0x1f8469d20 SKCGroup::cpp_updateWithTargetForTime(SKCNode*, double) + 96 (SKGroup.mm:53)
9   SpriteKit                       0x1f8481134 SKCSequence::cpp_updateWithTargetForTime(SKCNode*, double) + 84 (SKSequence.mm:0)
10  SpriteKit                       0x1f8477ba4 SKCNode::update(double, float) + 156 (SKCNode.mm:479)
11  SpriteKit                       0x1f85006d0 SKCAudioNode::update(double, float) + 28 (SKCAudioNode.mm:22)

似乎是由以下代码引起的:

let audio = SKAudioNode(fileNamed:fileNamed)
audio.autoplayLooped = false
parent.addChild(audio)

let playAction = SKAction.play()
let wait = SKAction.wait(forDuration: 5.0) 
let gain = SKAction.changeVolume(to: volume, duration: 0)
let grp = SKAction.group([playAction, gain, wait])
let rfp = SKAction.removeFromParent()
let sequence = SKAction.sequence([grp, rfp])
audio.run(sequence)
sprite-kit avfoundation 崩溃报告 avaudioengine skaudionode

评论


答: 暂无答案