0

Okay, so I'm fairly new to Xcode and am not at all familiar with debugging. I've spent a few days creating a neat little application. Everything was working perfectly, and I decided to run one final Simulation before calling it a day. This is when my headache began:

Thread 1: signal SIGABRT
    return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));

I began looking over my code when I noticed one of the AppDelegate files out of the folder at at the bottom of the Project Navigator. I placed it back in the folder and ran the Simulator again. Same exception thrown. (I don't remember which delegate file it was, this happened hours ago)

All Output:

   2012-06-02 04:54:14.901 App Name[438:f803] ***Terminating app due to uncaught exception 'NSUnkownKeyException', reason: '[<UIApplication 0x687b3d0> setValue:forUndefinedKey:]: this class is not key value coding-complaint for the key _slider.'      

Can someone please help me?
I'm thinking the files have lost communication between each other somehow.
Does Xcode unreference the file because its location changed?

iamruskie
  • 766
  • 4
  • 9
  • 22
  • `return UIApplication(argc, etc...)` <- this should not even compile. UIApplication is not a function, it's a class. –  Jun 02 '12 at 08:49
  • @H2CO3 It is 'UIApplicationMain' not 'UIApplication' . I'm sorry I posted it wrong. Edited & updated – iamruskie Jun 02 '12 at 08:56
  • Configure Xcode to break on exceptions. That will show the real location of the problem. Anyway, something is using Key-Value Coding (KVC) or bindings (which are built on KVC) to access a property using the key "_slider" on an object that doesn't have such a property. If the exception still points to the call to `UIApplicationMain()`, check your NIBs. – Ken Thomases Jun 02 '12 at 09:10
  • @KenThomases There is 1 breakpoint. It is on the line of implementation in the implementation(.m) file. '@implementation AppNameViewController' <- that is all on the line. – iamruskie Jun 02 '12 at 09:22
  • A breakpoint is a request that you make to ask the debugger to stop when a particular thing happens. I'm suggesting that you add a breakpoint for all exceptions. See http://stackoverflow.com/a/10845508/1312143 for a mini-walkthrough. – Ken Thomases Jun 02 '12 at 09:36
  • @KenThomases Okay, I did that. When I run simulator, It's still pointing at Thread 1: signal SIGABRT return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); – iamruskie Jun 02 '12 at 09:47
  • The check your NIBs for things bound to _slider or which have connections for a no-longer-existing outlet. – Ken Thomases Jun 02 '12 at 10:04
  • I ended up creating a new project and copying my old .xib, .m, & .h files into the new one and it works. Thanks for the help anyways guys. – iamruskie Jun 02 '12 at 18:13

1 Answers1

0

I ended up creating a new project and copying my old .xib, .m, & .h files into the new one and it works. Thanks for the help anyways guys.

iamruskie
  • 766
  • 4
  • 9
  • 22