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

Thread in my project, how can I fix it?

2016-01-04 20:53:56.024 FunFact[78261:4841618] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<FunFact.ViewController 0x7fbc98d3a160> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key randomNumber.' *** First throw call stack: ( 0 CoreFoundation 0x000000010ac53e65 exceptionPreprocess + 165 1 libobjc.A.dylib 0x000000010c993deb objc_exception_throw + 48 2 CoreFoundation 0x000000010ac53aa9 -[NSException raise] + 9 3 Foundation 0x000000010b01c9bb -[NSObject(NSKeyValueCoding) setValue:forKey:] + 288 4 UIKit 0x000000010b5ff320 -[UIViewController setValue:forKey:] + 88 5 UIKit 0x000000010b82df41 -[UIRuntimeOutletConnection connect] + 109 6 CoreFoundation 0x000000010ab944a0 -[NSArray makeObjectsPerformSelector:] + 224 7 UIKit 0x000000010b82c924 -[UINib instantiateWithOwner:options:] + 1864 8 UIKit 0x000000010b605eea -[UIViewController _loadViewFromNibNamed:bundle:] + 381 9 UIKit 0x000000010b606816 -[UIViewController loadView] + 178 10 UIKit 0x000000010b606b74 -[UIViewController loadViewIfRequired] + 138 11 UIKit 0x000000010b6072e7 -[UIViewController view] + 27 12 UIKit 0x000000010b4ddab0 -[UIWindow addRootViewControllerViewIfPossible] + 61 13 UIKit 0x000000010b4de199 -[UIWindow _setHidden:forced:] + 282 14 UIKit 0x000000010b4efc2e -[UIWindow makeKeyAndVisible] + 42 15 UIKit 0x000000010b468663 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4131 16 UIKit 0x000000010b46ecc6 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1760 17 UIKit 0x000000010b46be7b -[UIApplication workspaceDidEndTransaction:] + 188 18 FrontBoardServices 0x000000010e828754 -[FBSSerialQueue _performNext] + 192 19 FrontBoardServices 0x000000010e828ac2 -[FBSSerialQueue _performNextFromRunLoopSource] + 45 20 CoreFoundation 0x000000010ab7fa31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 21 CoreFoundation 0x000000010ab7595c __CFRunLoopDoSources0 + 556 22 CoreFoundation 0x000000010ab74e13 __CFRunLoopRun + 867 23 CoreFoundation 0x000000010ab74828 CFRunLoopRunSpecific + 488 24 UIKit 0x000000010b46b7cd -[UIApplication _run] + 402 25 UIKit 0x000000010b470610 UIApplicationMain + 171 26 FunFact 0x000000010aa73bfd main + 109 27 libdyld.dylib 0x000000010d49c92d start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException

(lldb)

This is what happens when I try to start my app on simulator. Anyone knows what this means or how I can fix this issue. It has something to do with app delegate, I think, which I have not touched.

Nathan Tallack
Nathan Tallack
22,159 Points

Ok. That is not really meaningful without the source code.

Are you happy to share your source code? If so, can you pop it up on github perhaps and let us take a look at it?