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

iOS Build a Weather App with Swift Simple Data Structures Bootstrapping the UI

guys my app keep crashing :( please help

hello every one :) i got a problem with my App it keep crashing and i don't know how to fix this problem i literally made as Mr.Pasan made but i don't know where these errors came from ! some times i feel like i will break my laptop :\ hear you can see what happen to my App http://store1.up-00.com/2016-01/145392518649891.png

Nathan Tallack
Nathan Tallack
22,160 Points

Get the output from that bottom right box (the one that ends with lldb) and paste it here for us.

here is the error :

2016-01-28 21:48:49.966 Stormy[547:13821] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Stormy.ViewController 0x7fddd37ad4e0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key currenPerciptionalLable.' *** First throw call stack: ( 0 CoreFoundation 0x00000001020c6e65 exceptionPreprocess + 165 1 libobjc.A.dylib 0x0000000103e06deb objc_exception_throw + 48 2 CoreFoundation 0x00000001020c6aa9 -[NSException raise] + 9 3 Foundation 0x000000010248f9bb -[NSObject(NSKeyValueCoding) setValue:forKey:] + 288 4 UIKit 0x0000000102a72320 -[UIViewController setValue:forKey:] + 88 5 UIKit 0x0000000102ca0f41 -[UIRuntimeOutletConnection connect] + 109 6 CoreFoundation 0x00000001020074a0 -[NSArray makeObjectsPerformSelector:] + 224 7 UIKit 0x0000000102c9f924 -[UINib instantiateWithOwner:options:] + 1864 8 UIKit 0x0000000102a78eea -[UIViewController _loadViewFromNibNamed:bundle:] + 381 9 UIKit 0x0000000102a79816 -[UIViewController loadView] + 178 10 UIKit 0x0000000102a79b74 -[UIViewController loadViewIfRequired] + 138 11 UIKit 0x0000000102a7a2e7 -[UIViewController view] + 27 12 UIKit 0x0000000102950ab0 -[UIWindow addRootViewControllerViewIfPossible] + 61 13 UIKit 0x0000000102951199 -[UIWindow _setHidden:forced:] + 282 14 UIKit 0x0000000102962c2e -[UIWindow makeKeyAndVisible] + 42 15 UIKit 0x00000001028db663 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4131 16 UIKit 0x00000001028e1cc6 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1760 17 UIKit 0x00000001028dee7b -[UIApplication workspaceDidEndTransaction:] + 188 18 FrontBoardServices 0x0000000105c98754 -[FBSSerialQueue _performNext] + 192 19 FrontBoardServices 0x0000000105c98ac2 -[FBSSerialQueue _performNextFromRunLoopSource] + 45 20 CoreFoundation 0x0000000101ff2a31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 21 CoreFoundation 0x0000000101fe895c __CFRunLoopDoSources0 + 556 22 CoreFoundation 0x0000000101fe7e13 __CFRunLoopRun + 867 23 CoreFoundation 0x0000000101fe7828 CFRunLoopRunSpecific + 488 24 UIKit 0x00000001028de7cd -[UIApplication _run] + 402 25 UIKit 0x00000001028e3610 UIApplicationMain + 171 26 Stormy 0x0000000101ee60ad main + 109 27 libdyld.dylib 0x000000010490f92d start + 1 28 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)

Nathan Tallack
Nathan Tallack
22,160 Points

Ok, if I had to guess your problem is a typo.

Take a look at the start.

*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key currenPerciptionalLable.' ***

See how you have spelt currenPerciptionallable

It is ok to spell things however you wish, but it is important that is spelt that way all through your code. At a guess you have misstyped a value someplace. Review your code, validate all of your value names and verify that you have no made any typo's. Xcode will help by highlighting most of them, but sometimes things are syntaxed in such a way that xCode wont understand that you have a typo at compile time.

So double check everything is typed correctly. :)

thank you deer Nathan Tallack i found the solution here :) http://stackoverflow.com/questions/17769245/terminating-with-uncaught-exception-of-type-nsexception i posted the link to let other Friends get a solution if they got the same problem :)