Discussion Forums  >  Uncategorized

Replies: 3    Views: 208

MacApple
Apple Fan
Profile
Posts: 4675
Reg: Oct 25, 2010
USA
61,150
11/19/11 09:37 AM (14 years ago)

Is there a maximum number of sound effects that can be pre-loaded in the 'loadSoundEffects' array

Hi all. I had an app all working nice and sweet but when I added in some more of the sound effects the App now crashes any time I press one of the buttons with the additional sound effects. I get this error when I select the 'Golf' button on the tabbed home screen: 2011-11-19 11:23:38.576 talkingscotsman[941:707] BT_viewControllerManager: the menu/button tapped is itemId: 6F1FF5C07066448A394F1B2 2011-11-19 11:23:38.577 talkingscotsman[941:707] BT_viewControllerManager: the screen to load is nickname: Golf itemId: 646AD1F8CC9DAB12ECBE95E itemType: BT_screen_menuButtons 2011-11-19 11:23:38.578 talkingscotsman[941:707] talkingscotsman_appDelegate: playSoundEffect golf.mp3 2011-11-19 11:23:38.580 talkingscotsman[941:707] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 32 beyond bounds [0 .. 22]' *** First throw call stack: (0x37c808bf 0x317661e5 0x37bc9b6b 0x7251 0x754ed 0xfb9d 0x31bb1943 0x37c54a63 0x37c546c9 0x37c5329f 0x37bd64dd 0x37bd63a5 0x37754fcd 0x35066743 0x3aa0f 0x2610) terminate called throwing an exception[Switching to process 7171 thread 0x1c03] (gdb) So I'm told the program received the 'SIGABRT' signal. Looking at error above it looks like the 'Golf.mp3' sound effect is number 32 in the array and am I correct in thinking this is outside of the allowed 22 effects? (index 32 beyond bounds [0 .. 22]) I've trawled through the code but I cannot see anywhere that specifies the max allowed amount of sound effects to loaded in the array. I only have 4 days to submit this App to Apple or I lose it so any help is much appreciated. Cheers
 
MacApple
Apple Fan
Profile
Posts: 4675
Reg: Oct 25, 2010
USA
61,150
like
11/19/11 11:04 AM (14 years ago)
Problem solved! All working, onwards and upwards.
 
Parker @ buzztouch
buzztouch Evangelist
Profile
Posts: 1395
Reg: May 09, 2011
Pacific Grove, ...
24,500
like
11/19/11 11:24 AM (14 years ago)
Hey MacApple, What was your solution?
 
MacApple
Apple Fan
Profile
Posts: 4675
Reg: Oct 25, 2010
USA
61,150
like
11/19/11 11:38 AM (14 years ago)
I'm sorry. Went out to buy cigs and realised I should post back to say what I did, bad form from me! After going through all the audio and sound files and reference fields I decided there wasn't a limit. Something happened though and the buttons were playing the wrong sounds even though everything was correct, only happened after I dropped in 13 more mp3s. 1. Step one. Checked all .mp3 file names were correct and matched the array. They were. 2. Pulled all the audio files, removed all refs and closed xcode. 3. Opened up xcode, created new batch of the mp3 and imported in. Voila! It wasn't a Buzztouch Issue and as far as I can tell wasn't an issue on my part, was xcode being quirky I believe as it crashed a couple of times as well. Thanks for checking in Parker, appreciate it. Have two apps to finish next week and then I'll get into server. Love what you chaps are doing, regards to team!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.