0

Can you please help me, my application worked well, but when i did a modification on it, (i don't remember what kind of modification) i got this message in the console:

[Session started at 2010-11-21 17:15:36 -0500.]
2010-11-21 17:15:37.472 ITMFR[3942:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UICustomObject 0x6a50d90> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key window.'
*** Call stack at first throw:
(
 0   CoreFoundation                      0x021f2b99 __exceptionPreprocess + 185
 1   libobjc.A.dylib                     0x0234240e objc_exception_throw + 47
 2   CoreFoundation                      0x021f2ad1 -[NSException raise] + 17
 3   Foundation                          0x000320f3 _NSSetUsingKeyValueSetter + 135
 4   Foundation                          0x00032061 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
 5   UIKit                               0x004b070a -[UIRuntimeOutletConnection connect] + 112
 6   CoreFoundation                      0x02168d0f -[NSArray makeObjectsPerformSelector:] + 239
 7   UIKit                               0x004af121 -[UINib instantiateWithOwner:options:] + 1041
 8   UIKit                               0x004b0eb5 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
 9   UIKit                               0x002bc402 -[UIApplication _loadMainNibFile] + 172
 10  UIKit                               0x002bd31c -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 198
 11  UIKit                               0x002c73ec -[UIApplication handleEvent:withNewEvent:] + 1958
 12  UIKit                               0x002bfb3c -[UIApplication sendEvent:] + 71
 13  UIKit                               0x002c49bf _UIApplicationHandleEvent + 7672
 14  GraphicsServices                    0x02ad2822 PurpleEventCallback + 1550
 15  CoreFoundation                      0x021d3ff4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
 16  CoreFoundation                      0x02134807 __CFRunLoopDoSource1 + 215
 17  CoreFoundation                      0x02131a93 __CFRunLoopRun + 979
 18  CoreFoundation                      0x02131350 CFRunLoopRunSpecific + 208
 19  CoreFoundation                      0x02131271 CFRunLoopRunInMode + 97
 20  UIKit                               0x002bcc6d -[UIApplication _run] + 625
 21  UIKit                               0x002c8af2 UIApplicationMain + 1160
 22  ITMFR                               0x00003eb8 main + 102
 23  ITMFR                               0x000028e9 start + 53
 24  ???                                 0x00000001 0x0 + 1

) terminate called after throwing an instance of 'NSException'

please, HELP ME!!

Charles
  • 1
  • 1
  • 1

2 Answers2

1

From the crash report, I would guess that the change you made was to the nib / xib file in Interface builder, specifically in binding a value to a button / control. Check the Inspector for all of your UI controls to make sure that any Button Bindings that are bound to Shared User Defaults Controller have controller key values, and not something else.

Chetan
  • 46,743
  • 31
  • 106
  • 145
  • Reading from the bottom up you can see that it's trying to load the main nib. It tries to make a connection to an IBOutlet and set a value for a key related to the outlet -- binding something in the interface to something in the code. It fails and crashes. Chetan's answer logically follows from that sequence of events. There's no guarantee, but it looks very likely. – Matthew Frederick Nov 21 '10 at 22:52
  • but where you can see what is the binding?? i don't see it in the inspector of the buttons.. – Charles Nov 21 '10 at 22:56
  • Look under the Button Bindings tab of the Inspector for all your buttons and checkmark boxes. – Chetan Nov 22 '10 at 00:34
  • sorry, i am very noob... can you send me a screenshot? – Charles Nov 22 '10 at 03:04
  • Here's an example of what to look for (`values` is highlighted): http://d.pr/3yAH – Chetan Nov 22 '10 at 03:13
0

This happened to me because I forgot @synthesize.

@synthesize window;

In my view controller.

ios-lizard
  • 834
  • 1
  • 12
  • 19