Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 11    Views: 208

Absentia
buzztouch Evangelist
Profile
Posts: 960
Reg: Oct 20, 2011
Alaska
20,600
05/28/14 06:35 PM (10 years ago)

Flappy Bird Clone recurring crash

Is anybody else experiencing the recurring crash with Mackimack's Flappy Bird Clone plugin? I'm not on my computer right now so I can't provide the complete log, but I can give some details - It seems to occur completely randomly and it has to do with the wind.mp3 sound file (the sound the bird makes when you tap the screen). The error reads something like this - "unable to load sound file wind.mp3" - when this happens the app completely crashes. It's strange because this usually occurs after the wind.mp3 sound has already been played numerous times, so it's kind of a mystery that it suddenly has an issue loading.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
05/28/14 07:00 PM (10 years ago)
Perhaps a [release] needs to happen if it is non-ARC?
 
Absentia
buzztouch Evangelist
Profile
Posts: 960
Reg: Oct 20, 2011
Alaska
20,600
like
05/29/14 12:57 AM (10 years ago)
Thanks for the reply, but this a BT 3.0 project so it is ARC enabled. Here is a more detailed crash log *** Terminating app due to uncaught exception 'Failed to Load Resource', reason: 'Resource wind.mp3 can not be loaded' *** First throw call stack: ( 0 CoreFoundation 0x038471e4 __exceptionPreprocess + 180 1 libobjc.A.dylib 0x035c68e5 objc_exception_throw + 44 2 CoreFoundation 0x03846fbb +[NSException raise:format:] + 139 3 SpriteKit 0x03ae22c9 +[SKPlaySound playSoundFileNamed:atPosition:waitForCompletion:] + 609 4 SpriteKit 0x03a99321 +[SKAction(SKActions) playSoundFileNamed:waitForCompletion:] + 77 5 flappyhamuketsu 0x00016229 -[Scene touchesBegan:withEvent:] + 505 6 SpriteKit 0x03abd2bf -[SKView touchesBegan:withEvent:] + 824 7 UIKit 0x021ddc0b -[UIWindow _sendTouchesForEvent:] + 386 8 UIKit 0x021de9d1 -[UIWindow sendEvent:] + 1117 9 UIKit 0x021b05f2 -[UIApplication sendEvent:] + 242 10 UIKit 0x0219a353 _UIApplicationHandleEventQueue + 11455 11 CoreFoundation 0x037d077f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15 12 CoreFoundation 0x037d010b __CFRunLoopDoSources0 + 235 13 CoreFoundation 0x037ed1ae __CFRunLoopRun + 910 14 CoreFoundation 0x037ec9d3 CFRunLoopRunSpecific + 467 15 CoreFoundation 0x037ec7eb CFRunLoopRunInMode + 123 16 GraphicsServices 0x03bc65ee GSEventRunModal + 192 17 GraphicsServices 0x03bc642b GSEventRun + 104 18 UIKit 0x0219cf9b UIApplicationMain + 1225 19 flappyhamuketsu 0x00018bf6 main + 86 20 flappyhamuketsu 0x00002c85 start + 53 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb) a Google search has returned some similar cases - http://stackoverflow.com/questions/20229878/skaction-playsoundfilenamed-error - it seems to stem from SpriteKit. Hopefully I'll be able to get this figured out with a bit more internet digging
 
trouty
I hate code!
Profile
Posts: 338
Reg: Mar 26, 2013
London Outskirt...
4,830
like
05/29/14 02:07 AM (10 years ago)
i dont know, but i can tell you, i am RUBISH at it! Top score - 3
 
Absentia
buzztouch Evangelist
Profile
Posts: 960
Reg: Oct 20, 2011
Alaska
20,600
like
05/29/14 03:42 AM (10 years ago)
Got it! Thanks to this stackoverflow topic - http://stackoverflow.com/questions/22865950/spritekit-is-unable-to-load-a-previously-used-resource It looks like the crash was happening because the code was loading the sounds EVERY time the sounds played. The solution was to load the sound once when the game started, and then just call the "SKAction" object associated with that sound. So basically, (I might fake it well, but I'm really not a pro with this stuff) now I am telling the app to "play the loaded sound effect" instead of before when I was essentially telling the app to "load the sound effect and then play it within a matter of milliseconds" I'm not sure if anybody else has had the same issue as me, so I'm not going to spend time going into details about changes to the plugin code. If anybody else is experiencing this same issue and needs help, send me a pm PS: Top score - 47 :) to be fair, I started playing the original Flappy Bird the week it came out...it's interesting that it's such a simple game, yet it's still a game that you get better at over time
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
05/29/14 10:20 AM (10 years ago)
Awesome, good sleuthing! :-) Hopefully the plugin author will update the code accordingly. -- Niraj
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
05/29/14 11:30 AM (10 years ago)
47!!!!! Respect.... Are you making it ipad compatible? I think it's a great plugin but not having it on Ipad is a major let down. Farcat
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
05/29/14 04:58 PM (10 years ago)
Nice Im having error like this : dyld: Library not loaded: /System/Library/Frameworks/SpriteKit.framework/SpriteKit Referenced from: /Users/christophercoffee/Library/Application Support/iPhone Simulator/6.1/Applications/FA8FAC7F-613F-4743-A121-FE50D0DB072F/jumpyjesse.app/jumpyjesse Reason: no suitable image found. Did find: /System/Library/Frameworks/SpriteKit.framework/SpriteKit: mach-o, but wrong architecture (lldb) any ideas?
 
Absentia
buzztouch Evangelist
Profile
Posts: 960
Reg: Oct 20, 2011
Alaska
20,600
like
05/29/14 05:44 PM (10 years ago)
@farcat - it actually does run fairly well on the iPad - it just doesn't look as great. A few little tweaks on the .xib files will probably fix that. The App Store is so saturated with flappy bird clones right now anyway, I'm fine just building for iPhone to start - if by some crazy chance my app turns out to be a success, I'll roll out a universal update a bit later @CMCOFFEE - You are getting that error because you are trying to launch on a 6.1 simulator. The plugin is made using SpriteKit, which can only be run on iOS 7.0 and up. I'm just now noticing that Mackimack does actually state in the plugin description that this plugin can run on iOS 6...that may have been an accident on his part
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
05/29/14 06:06 PM (10 years ago)
@Absentia, thanks that worked !
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
05/30/14 01:10 AM (10 years ago)
Thanks @Absentia, good call. If it doesn't look good I can still try and add a Xib file for iPad. Farcat
 
Hugo Furneaux
Aspiring developer
Profile
Posts: 10
Reg: Feb 07, 2014
London
1,550
like
12/23/14 10:34 AM (9 years ago)
Hi I seem to be having a similar problem but I'm pretty sure the solution isn"t the same. My crash log reads (along with other stuff: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Scene delegate]: unrecognized selector sent to instance Has anyone come across this /know what to do? My flappy bird clone doesn't even start when testing it on a phone, it just crashes - but weirdly works fine on the simulator... Thanks
 

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.