swift - SpriteKit playSoundFileNamed crash on iOS 8.3 -
i'm seeing small amounts of spritekit playsoundfilenamed crashes app's crash log. crashes happen on ios 8.3.
0 corefoundation __exceptionpreprocess 1 libobjc.a.dylib objc_exception_throw 2 corefoundation -[nsexception initwithcoder:] 3 spritekit +[skplaysound playsoundfilenamed:atposition:waitforcompletion:] 4 spritekit +[skaction(skactions) playsoundfilenamed:waitforcompletion:] ... and few related crashes:
0 corefoundation __exceptionpreprocess 1 libobjc.a.dylib objc_exception_throw 2 corefoundation -[nsexception raise:format:] 3 spritekit +[skplaysound playsoundfilenamed:atposition:waitforcompletion:] 4 spritekit +[skaction(skactions) playsoundfilenamed:waitforcompletion:] ... does know causes crash , how fix it? should wrap every calls playsoundfilenamed: in try-catch block?
edited
more information:
i'm using swift. trying play own sounds , i'm seeing crashes coming different sounds. i'm seeing couple reports ios 8.2 crash might not ios 8.3 specific.
the lines play sound:
var sound = skaction.playsoundfilenamed("sound/abc.mp3", waitforcompletion: false) self.runaction(sound)
i experienced similar issue while back. issue variable not made enough play creating variable each time user tapped on screen. try defining action in didmovetoview, , seeing if still issue. hope helps
Comments
Post a Comment