0

I've got a card game in final stages of pre-release. After playing the game for some time, say 10 to 15 minutes, there is a random crash. No trace is left in the device logs.

I have tried profiling for leaks, which there are none.

I did hook up my iPhone, run for release (with debug) and played until a crash occurred. What I found was as follows:

2015-03-15 09:38:15.945 Spin Solitaire[457:84443] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Resource card_contact1.m4a can not be loaded'

Now, that sound file was played perhaps hundreds of times during the game, so it is definitely available. The file was produced in audacity and was in m4a format.

I switched all sound formats to caf using afconvert and re-released the app. I am hoping this solves this annoying issue, but I'm not convinced.

Does anyone have advice on how to troubleshoot, debug this? Without a stack trace, I am lost.

Daniel K
  • 1,119
  • 10
  • 20
  • When all else fails, log. I'd add a bunch of logging around all accesses to that file and use something like CocoaLumberjack to help diagnose. You can turn on file sharing for your app to make it easier for testers to pull the logs from the device using iTunes. – Sandy Chapman Mar 15 '15 at 18:28
  • 1
    Thanks Sandy, I found the answer here [link](http://stackoverflow.com/questions/26683171/skaction-playsoundfilenamed-crashes-when-repeat-sprite-kit) – Daniel K Mar 16 '15 at 04:35

1 Answers1

0

I found the answer here:

Skaction.playsoundfilenamed crashes when repeat - sprite kit

it appears to be a known issue, but I never assume bugs in other people's code...

Community
  • 1
  • 1
Daniel K
  • 1,119
  • 10
  • 20