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
Aaron Yow
Courses Plus Student 8,262 Pointsapp crashed while testing
not sure whats wrong with it but this came up
2015-10-17 15:21:55.391 Stormy[2887:91184] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Stormy.ViewController 0x7fc0aa67de60> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key currentHumudityLabel.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000109cf1f65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010b983deb objc_exception_throw + 48
2 CoreFoundation 0x0000000109cf1ba9 -[NSException raise] + 9
3 Foundation 0x000000010a0b9f5b -[NSObject(NSKeyValueCoding) setValue:forKey:] + 288
4 UIKit 0x000000010a68fd40 -[UIViewController setValue:forKey:] + 88
5 UIKit 0x000000010a8ac923 -[UIRuntimeOutletConnection connect] + 109
6 CoreFoundation 0x0000000109c32b10 -[NSArray makeObjectsPerformSelector:] + 224
7 UIKit 0x000000010a8ab306 -[UINib instantiateWithOwner:options:] + 1864
8 UIKit 0x000000010a69684d -[UIViewController _loadViewFromNibNamed:bundle:] + 381
9 UIKit 0x000000010a697179 -[UIViewController loadView] + 178
10 UIKit 0x000000010a69747c -[UIViewController loadViewIfRequired] + 139
11 UIKit 0x000000010a697c7d -[UIViewController view] + 27
12 UIKit 0x000000010a5750c0 -[UIWindow addRootViewControllerViewIfPossible] + 61
13 UIKit 0x000000010a5757bd -[UIWindow _setHidden:forced:] + 302
14 UIKit 0x000000010a587020 -[UIWindow makeKeyAndVisible] + 43
15 UIKit 0x000000010a50493c -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4131
16 UIKit 0x000000010a50ae15 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1755
17 UIKit 0x000000010a507ff0 -[UIApplication workspaceDidEndTransaction:] + 188
18 FrontBoardServices 0x000000010d81a7ac -[FBSSerialQueue _performNext] + 192
19 FrontBoardServices 0x000000010d81ab1a -[FBSSerialQueue _performNextFromRunLoopSource] + 45
20 CoreFoundation 0x0000000109c1e0a1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
21 CoreFoundation 0x0000000109c13fcc __CFRunLoopDoSources0 + 556
22 CoreFoundation 0x0000000109c13483 __CFRunLoopRun + 867
23 CoreFoundation 0x0000000109c12e98 CFRunLoopRunSpecific + 488
24 UIKit 0x000000010a50798d -[UIApplication _run] + 402
25 UIKit 0x000000010a50c676 UIApplicationMain + 171
26 Stormy 0x0000000109b1358d main + 109
27 libdyld.dylib 0x000000010c49b92d start + 1
28 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
1 Answer
ianhan3
4,263 PointsThere are tons of reasons why the app may have crashed with that error so we would need a bit more info on exactly. Check out the error handling section, "Debugging Our App" in the "Build a Simple iPhone App" for an example of this error and how to go about figuring out exactly what is wrong.
Most commonly (for me at least), this is caused by you deleting a button and not disconnecting the other side. So for example if I created a button in interface builder, connected it to my ViewController.swift file then decided I didn't want the button, yet only deleted it from the storyboard, I would get this error. Check your buttons for extraneous connections by right clicking them or looking in the connections inspector.