how to diagnose a crash report in SKAudioNode

40 Views Asked by At

Can anyone help explain the below crash report? It happens rarely, and it's from a remote user so I don't have access to console output. I can't reproduce the bug.

It appears to happen at SKAction.play(). Is there a way to know what kind of exception is being triggered? Anyone know what's at 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)

it appears to be caused by the following code:

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)
0

There are 0 best solutions below