Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Joseph Muruguru
3,913 Pointsswift fun fact app crashing
I keep on getting this error whenever i try to press the show another fact button during the fun fact app tutorial:
***** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[fun_facts.ViewController pickfact]: unrecognized selector sent to instance 0x7faa82d423a0' *** First throw call stack:**
( 0 CoreFoundation 0x0000000103b0a3f5 exceptionPreprocess + 165 1 libobjc.A.dylib 0x0000000105638bb7 objc_exception_throw + 45 2 CoreFoundation 0x0000000103b1150d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205 3 CoreFoundation 0x0000000103a697fc ___forwarding_ + 988 4 CoreFoundation 0x0000000103a69398 CF_forwarding_prep_0 + 120 5 UIKit 0x00000001043959ee -[UIApplication sendAction:to:from:forEvent:] + 75 6 UIKit 0x000000010449bbd0 -[UIControl _sendActionsForEvents:withEvent:] + 467 7 UIKit 0x000000010449af9f -[UIControl touchesEnded:withEvent:] + 522 8 UIKit 0x00000001043db3b8 -[UIWindow _sendTouchesForEvent:] + 735 9 UIKit 0x00000001043dbce3 -[UIWindow sendEvent:] + 683 10 UIKit 0x00000001043a8ae1 -[UIApplication sendEvent:] + 246 11 UIKit 0x00000001043b5bad _UIApplicationHandleEventFromQueueEvent + 17370 12 UIKit 0x0000000104391233 _UIApplicationHandleEventQueue + 1961 13 CoreFoundation 0x0000000103a3fad1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION_ + 17 14 CoreFoundation 0x0000000103a3599d __CFRunLoopDoSources0 + 269 15 CoreFoundation 0x0000000103a34fd4 __CFRunLoopRun + 868 16 CoreFoundation 0x0000000103a34a06 CFRunLoopRunSpecific + 470 17 GraphicsServices 0x0000000107be69f0 GSEventRunModal + 161 18 UIKit 0x0000000104394550 UIApplicationMain + 1282 19 fun_facts 0x000000010392e25e top_level_code + 78 20 fun_facts 0x000000010392e29a main + 42 21 libdyld.dylib 0x0000000105e12145 start + 1 )
libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)
How would I go about fixing this error?
1 Answer
Renato Nobre
5,805 PointsOk, displaying the error sometimes might not be enough for helps solving your problem. It might be a problem with some label that you linked to the code and them deleted, but forgot to remove the link by right clicking it and taking of the attribute. I recommend you skip a bit and go a little bit further in the course at the Debugging our app chapter.
Hope you can fix it, fell free to contact me on my facebook page or twitter, just check my profile! Give me some feedback!
(I put it as a answer now)
Joseph Muruguru
3,913 PointsJoseph Muruguru
3,913 Pointsthanks for your help Renato! i think the error did involve a label that i linked!