Swift Error - "Unrecognized selector sent to instance" - xcode

I am working on a Swift project in Xcode v6.1.1, and I am getting the following error that I don't understand. I believe there is a problem with a couple of the Labels in my Main.storyboard and/or the UILabel variable I have them connected to.
I have tried everything I can find to fix it, and nothing has worked.
Any help would be appreciated.
2015-03-02 19:43:14.854 Final Project[7380:250494] -[UILabel longValue]: unrecognized selector sent to instance 0x7b8e1810
2015-03-02 19:43:14.876 Final Project[7380:250494] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UILabel longValue]: unrecognized selector sent to instance 0x7b8e1810'
*** First throw call stack:
(
0 CoreFoundation 0x00686946 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x02062a97 objc_exception_throw + 44
2 CoreFoundation 0x0068e5c5 -[NSObject(NSObject) doesNotRecognizeSelector:] + 277
3 CoreFoundation 0x005d73e7 ___forwarding___ + 1047
4 CoreFoundation 0x005d6fae _CF_forwarding_prep_0 + 14
5 Foundation 0x00b0b6dc _NSSetLongValueForKeyWithMethod + 69
6 Foundation 0x00a691c6 _NSSetUsingKeyValueSetter + 257
7 Foundation 0x00a690bd -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
8 Foundation 0x00a9e9a6 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 386
9 UIKit 0x011cf649 -[UIRuntimeOutletConnection connect] + 106
10 libobjc.A.dylib 0x02078724 -[NSObject performSelector:] + 62
11 CoreFoundation 0x005c05dc -[NSArray makeObjectsPerformSelector:] + 316
12 UIKit 0x011ce10a -[UINib instantiateWithOwner:options:] + 1775
13 UIKit 0x00ff0624 -[UIViewController _loadViewFromNibNamed:bundle:] + 270
14 UIKit 0x00ff0dbb -[UIViewController loadView] + 295
15 UIKit 0x00ff0fef -[UIViewController loadViewIfRequired] + 78
16 UIKit 0x00ff1595 -[UIViewController view] + 35
17 UIKit 0x01664707 -[_UIFullscreenPresentationController _setPresentedViewController:] + 75
18 UIKit 0x00fc6a81 -[UIPresentationController initWithPresentedViewController:presentingViewController:] + 113
19 UIKit 0x00ffea61 -[UIViewController _presentViewController:withAnimationController:completion:] + 2102
20 UIKit 0x010015d2 __62-[UIViewController presentViewController:animated:completion:]_block_invoke + 345
21 UIKit 0x01001424 -[UIViewController presentViewController:animated:completion:] + 224
22 UIKit 0x010060be -[UIViewController _showViewController:withAction:sender:] + 213
23 UIKit 0x012423b5 -[UIStoryboardShowSegue perform] + 143
24 UIKit 0x014b6b49 -[UIStoryboardSegueTemplate _perform:] + 217
25 UIKit 0x014b6bc5 -[UIStoryboardSegueTemplate perform:] + 116
26 libobjc.A.dylib 0x020787cd -[NSObject performSelector:withObject:withObject:] + 84
27 UIKit 0x00e9b23d -[UIApplication sendAction:to:from:forEvent:] + 99
28 UIKit 0x00e9b1cf -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64
29 UIKit 0x00fcee86 -[UIControl sendAction:to:forEvent:] + 69
30 UIKit 0x00fcf2a3 -[UIControl _sendActionsForEvents:withEvent:] + 598
31 UIKit 0x00fce50d -[UIControl touchesEnded:withEvent:] + 660
32 UIKit 0x00eeb60a -[UIWindow _sendTouchesForEvent:] + 874
33 UIKit 0x00eec0e5 -[UIWindow sendEvent:] + 791
34 UIKit 0x00eb1549 -[UIApplication sendEvent:] + 242
35 UIKit 0x00ec137e _UIApplicationHandleEventFromQueueEvent + 20690
36 UIKit 0x00e95b19 _UIApplicationHandleEventQueue + 2206
37 CoreFoundation 0x005aa1df __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
38 CoreFoundation 0x0059fced __CFRunLoopDoSources0 + 253
39 CoreFoundation 0x0059f248 __CFRunLoopRun + 952
40 CoreFoundation 0x0059ebcb CFRunLoopRunSpecific + 443
41 CoreFoundation 0x0059e9fb CFRunLoopRunInMode + 123
42 GraphicsServices 0x0441a24f GSEventRunModal + 192
43 GraphicsServices 0x0441a08c GSEventRun + 104
44 UIKit 0x00e998b6 UIApplicationMain + 1526
45 Final Project 0x000e904e top_level_code + 78
46 Final Project 0x000e908b main + 43
47 libdyld.dylib 0x027cfac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

Have you forgot a : in the string name?
Is your class marked with #objc?

Just by looking at -[UILabel longValue]: unrecognized selector sent to instance 0x7b8e1810 gives me the answer. You are treating a UILabel as an NSString.
Somewhere in your code you have [label longValue] where you mean to have [label.text longValue].
After looking at more of your call stack. I can see that it's happening while a while initializing a view controller from a storyboard.
Have you subclassed any views? It looks like you might have inadvertently changed the type of a property from NSString to UILabel.

So... I fixed the problem. Turned out the answer was right in front of me the whole time (it usually is). The Label that couldn't be initialized had the same name as an Int variable I had declared in the same class, only with the first letter capitalized. For some reason, I assumed it was case-sensitive, so that wouldn't matter...

Related

i did not understand what is this error

2015-06-03 17:16:15.705 PSM-InPatient[10744:799454] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<PSM_InPatient.DocLoginViewController 0x7fbf3bc75990> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key docPassword.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000105b37f35 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010767bbb7 objc_exception_throw + 45
2 CoreFoundation 0x0000000105b37b79 -[NSException raise] + 9
3 Foundation 0x0000000105f4f7b3 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
4 CoreFoundation 0x0000000105a81e80 -[NSArray makeObjectsPerformSelector:] + 224
5 UIKit 0x0000000106688c7d -[UINib instantiateWithOwner:options:] + 1506
6 UIKit 0x00000001064e7f98 -[UIViewController _loadViewFromNibNamed:bundle:] + 242
7 UIKit 0x00000001064e8588 -[UIViewController loadView] + 109
8 UIKit 0x00000001064e87f9 -[UIViewController loadViewIfRequired] + 75
9 UIKit 0x00000001064e8c8e -[UIViewController view] + 27
10 UIKit 0x0000000106a8a41e -[_UIFullscreenPresentationController _setPresentedViewController:] + 65
11 UIKit 0x00000001064c4429 -[UIPresentationController initWithPresentedViewController:presentingViewController:] + 105
12 UIKit 0x00000001064f4a41 -[UIViewController _presentViewController:withAnimationController:completion:] + 1746
13 UIKit 0x00000001064f6d81 __62-[UIViewController presentViewController:animated:completion:]_block_invoke + 132
14 UIKit 0x00000001064f6ca5 -[UIViewController presentViewController:animated:completion:] + 229
15 UIKit 0x00000001063c48be -[UIApplication sendAction:to:from:forEvent:] + 75
16 UIKit 0x00000001064cb410 -[UIControl _sendActionsForEvents:withEvent:] + 467
17 UIKit 0x00000001064ca7df -[UIControl touchesEnded:withEvent:] + 522
18 UIKit 0x000000010640a308 -[UIWindow _sendTouchesForEvent:] + 735
19 UIKit 0x000000010640ac33 -[UIWindow sendEvent:] + 683
20 UIKit 0x00000001063d79b1 -[UIApplication sendEvent:] + 246
21 UIKit 0x00000001063e4a7d _UIApplicationHandleEventFromQueueEvent + 17370
22 UIKit 0x00000001063c0103 _UIApplicationHandleEventQueue + 1961
23 CoreFoundation 0x0000000105a6d551 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
24 CoreFoundation 0x0000000105a6341d __CFRunLoopDoSources0 + 269
25 CoreFoundation 0x0000000105a62a54 __CFRunLoopRun + 868
26 CoreFoundation 0x0000000105a62486 CFRunLoopRunSpecific + 470
27 GraphicsServices 0x0000000109c2e9f0 GSEventRunModal + 161
28 UIKit 0x00000001063c3420 UIApplicationMain + 1282
29 PSM-InPatient 0x00000001055a33de top_level_code + 78
30 PSM-InPatient 0x00000001055a341a main + 42
31 libdyld.dylib 0x0000000107e55145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
You have an outlet that doesn't exists anymore. Check the connections inspector for lost connections.
Your error is Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key docPassword.
Usually this means that the .xib file (or storyboard) for your viewController contains an outlet (docPassword in your case) that isn't in your code. You should either add the property in your code or remove the outlet entirely in interface builder.

Unrecognized Selector for NSNull isCString

I am experiencing unrecognized selector for this:
-[NSNull _isCString]: unrecognized selector sent to instance
The given log crashes my app. What are the possible causes of this error? Can anyone give some ideas? Any response will be very much appreciated. Thank you very much!
Actually, I just want to edit a row from a table view controller. I have noticed that when I click the EDIT at the navigation bar of my table view controller, the rows 0, 2 and 4 gets the error but the rows 1 and 3 doesn't.
2014-08-13 11:39:27.531 boysenios[5253:60b] -[NSNull _isCString]: unrecognized selector sent to instance 0x2068068
2014-08-13 11:39:27.535 boysenios[5253:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull _isCString]: unrecognized selector sent to instance 0x2068068'
*** First throw call stack:
(
0 CoreFoundation 0x01f1c1e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x01c9b8e5 objc_exception_throw + 44
2 CoreFoundation 0x01fb9243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x01f0c50b ___forwarding___ + 1019
4 CoreFoundation 0x01f0c0ee _CF_forwarding_prep_0 + 14
5 Foundation 0x018cc986 -[NSBigMutableString replaceCharactersInRange:withString:] + 317
6 Foundation 0x018cc815 -[NSConcreteMutableAttributedString replaceCharactersInRange:withAttributedString:] + 384
7 UIFoundation 0x03e86774 __71-[NSConcreteTextStorage replaceCharactersInRange:withAttributedString:]_block_invoke + 68
8 UIFoundation 0x03e866af -[NSConcreteTextStorage replaceCharactersInRange:withAttributedString:] + 121
9 Foundation 0x018f6f76 -[NSMutableAttributedString setAttributedString:] + 90
10 UIKit 0x01065c6c __32-[UITextView setAttributedText:]_block_invoke + 43
11 UIFoundation 0x03e84211 -[NSTextStorage coordinateEditing:] + 48
12 UIKit 0x010658cb -[UITextView setAttributedText:] + 254
13 UIKit 0x01069eb5 -[UITextView setText:] + 149
14 boysenios 0x000233c6 -[ProjectFormTableViewController resetView] + 3873
15 boysenios 0x00022494 -[ProjectFormTableViewController setViewToEdit:] + 61
16 libobjc.A.dylib 0x01cad880 -[NSObject performSelector:withObject:withObject:] + 77
17 UIKit 0x0095d3b9 -[UIApplication sendAction:to:from:forEvent:] + 108
18 UIKit 0x00c4a8df -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 139
19 libobjc.A.dylib 0x01cad880 -[NSObject performSelector:withObject:withObject:] + 77
20 UIKit 0x0095d3b9 -[UIApplication sendAction:to:from:forEvent:] + 108
21 UIKit 0x0095d345 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
22 UIKit 0x00a5ebd1 -[UIControl sendAction:to:forEvent:] + 66
23 UIKit 0x00a5efc6 -[UIControl _sendActionsForEvents:withEvent:] + 577
24 UIKit 0x00a5e243 -[UIControl touchesEnded:withEvent:] + 641
25 UIKit 0x0099cddd -[UIWindow _sendTouchesForEvent:] + 852
26 UIKit 0x0099d9d1 -[UIWindow sendEvent:] + 1117
27 UIKit 0x0096f5f2 -[UIApplication sendEvent:] + 242
28 UIKit 0x00959353 _UIApplicationHandleEventQueue + 11455
29 CoreFoundation 0x01ea577f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
30 CoreFoundation 0x01ea510b __CFRunLoopDoSources0 + 235
31 CoreFoundation 0x01ec21ae __CFRunLoopRun + 910
32 CoreFoundation 0x01ec19d3 CFRunLoopRunSpecific + 467
33 CoreFoundation 0x01ec17eb CFRunLoopRunInMode + 123
34 GraphicsServices 0x033345ee GSEventRunModal + 192
35 GraphicsServices 0x0333442b GSEventRun + 104
36 UIKit 0x0095bf9b UIApplicationMain + 1225
37 boysenios 0x00027f83 main + 94
38 libdyld.dylib 0x02fcd701 start + 1
39 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
NSNull is a class that class does not implement _isCString, hence the unrecognized selector error. Objective-C usually uses nil to represent a 0 or a null pointer value. However, standard containers like NSDictionary and NSArray cannot hold nil values, so you occasionally see [NSNull null] used instead.
It's basically convention in your code that determines whether you check for myVal == [NSNull null] or myVal == nil.
Based on the trace you posted, it appears you need to do a myVal == [NSNull null] check somewhere.

Weird runtime error with iOS 8 and XCode 6 beta 4

We have a UITableView object in our storyboard that is assigned to a custom class. When I load the view and try to select a row, the application crashes. I've been putting breakpoints up and down my class—the most intuitive one being at didSelectRowAtIndexPath—but all of this is to no avail. App just crashes before I get to any of my breakpoints.
This bug only exists in iOS8. Runs fine in iOS7. Any ideas what is causing this? Below is a log of my console.
CoreData: warning: Property 'year' is a 64 bit scalar type on class 'Term' that does not match its entity's property's 32 bit scalar type. Implicit coercion to 32 bits in the database is not recommended.
2014-08-04 13:45:47.415 Grades[29475:2823481] *** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller:<UICompatibilityInputViewController: 0x7fb9728ba400> should have parent view controller:<SyllabusDetailViewController: 0x7fb9706a96a0> but requested parent is:<UIInputWindowController: 0x7fb97086fa00>'
*** First throw call stack:
(
0 CoreFoundation 0x0000000108fcfc35 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001088c2a1c objc_exception_throw + 45
2 CoreFoundation 0x0000000108fcfb6d +[NSException raise:format:] + 205
3 UIKit 0x00000001070b348d -[UIViewController _addChildViewController:performHierarchyCheck:notifyWillMove:] + 184
4 UIKit 0x000000010764a4a2 -[UIInputWindowController changeToInputViewSet:] + 435
5 UIKit 0x000000010764b07a __43-[UIInputWindowController setInputViewSet:]_block_invoke + 85
6 UIKit 0x0000000106ffdb9e +[UIView(Animation) performWithoutAnimation:] + 65
7 UIKit 0x000000010764ae4b -[UIInputWindowController setInputViewSet:] + 288
8 UIKit 0x0000000107646e3b -[UIInputWindowController performOperations:withAnimationStyle:] + 50
9 UIKit 0x000000010744214e -[UIPeripheralHost(UIKitInternal) setInputViews:animationStyle:] + 1054
10 UIKit 0x00000001070ff32d -[UIResponder becomeFirstResponder] + 468
11 UIKit 0x0000000106ff9453 -[UIView(Hierarchy) becomeFirstResponder] + 99
12 UIKit 0x00000001076a4a0f -[UITextField becomeFirstResponder] + 51
13 UIKit 0x000000010733d3d1 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) setFirstResponderIfNecessary] + 177
14 UIKit 0x000000010733f440 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) oneFingerTap:] + 2263
15 UIKit 0x0000000107334b5d _UIGestureRecognizerSendActions + 262
16 UIKit 0x0000000107333134 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 1095
17 UIKit 0x0000000107338556 ___UIGestureRecognizerUpdate_block_invoke690 + 371
18 UIKit 0x0000000107338312 _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 254
19 UIKit 0x000000010732d87b _UIGestureRecognizerUpdate + 2858
20 UIKit 0x0000000106fd3b36 -[UIWindow _sendGesturesForEvent:] + 1041
21 UIKit 0x0000000106fd4763 -[UIWindow sendEvent:] + 667
22 UIKit 0x0000000106fa1811 -[UIApplication sendEvent:] + 246
23 UIKit 0x0000000106fae8ae _UIApplicationHandleEventFromQueueEvent + 17707
24 UIKit 0x0000000106f8a009 _UIApplicationHandleEventQueue + 1967
25 CoreFoundation 0x0000000108f057f1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
26 CoreFoundation 0x0000000108efb16d __CFRunLoopDoSources0 + 269
27 CoreFoundation 0x0000000108efa7a4 __CFRunLoopRun + 868
28 CoreFoundation 0x0000000108efa1d6 CFRunLoopRunSpecific + 470
29 GraphicsServices 0x000000010b330a3a GSEventRunModal + 161
30 UIKit 0x0000000106f8d280 UIApplicationMain + 1282
31 Grades 0x0000000106300003 main + 115
32 libdyld.dylib 0x00000001095ea145 start + 1
33 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Okay, fixed the problem. Had some bad CONTRL+drag connections between my Storyboard objects and my IBOutlets. Turned those off and now the problem is gone.

Strange memory error in Xcode

I'm getting some strange memory errors in Xcode; it's accessing code from other apps which is very strange.
Here is the code:
[Session started at 2011-03-08 17:04:33 +0800.]
2011-03-08 17:04:59.438 Movie[5309:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "MovieViewController" nib but the view outlet was not set.'
*** Call stack at first throw:
(
0 CoreFoundation 0x00daebe9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00f035c2 objc_exception_throw + 47
2 CoreFoundation 0x00d67628 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x00d6759a +[NSException raise:format:] + 58
4 UIKit 0x00367b75 -[UIViewController _loadViewFromNibNamed:bundle:] + 295
5 UIKit 0x00365709 -[UIViewController loadView] + 120
6 UIKit 0x003655e3 -[UIViewController view] + 56
7 Movie 0x00002466 -[MovieAppDelegate application:didFinishLaunchingWithOptions:] + 79
8 UIKit 0x002b81fa -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1163
9 UIKit 0x002ba55e -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 439
10 UIKit 0x002c4db2 -[UIApplication handleEvent:withNewEvent:] + 1533
11 UIKit 0x002bd202 -[UIApplication sendEvent:] + 71
12 UIKit 0x002c2732 _UIApplicationHandleEvent + 7576
13 GraphicsServices 0x016e4a36 PurpleEventCallback + 1550
14 CoreFoundation 0x00d90064 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
15 CoreFoundation 0x00cf06f7 __CFRunLoopDoSource1 + 215
16 CoreFoundation 0x00ced983 __CFRunLoopRun + 979
17 CoreFoundation 0x00ced240 CFRunLoopRunSpecific + 208
18 CoreFoundation 0x00ced161 CFRunLoopRunInMode + 97
19 UIKit 0x002b9fa8 -[UIApplication _run] + 636
20 UIKit 0x002c642e UIApplicationMain + 1160
21 Movie 0x000023f4 main + 102
22 Movie 0x00002385 start + 53
)
terminate called after throwing an instance of 'NSException'
Can you tell me what this means?
Thanks in advance!
It says in plain english what the problem is: "[UIViewController _loadViewFromNibNamed:bundle:] loaded the "MovieViewController" nib but the view outlet was not set". Set the view outlet in Interface Builder and that's it.

One line keeps crashing, I think it could be something to do with CFDictionary but not sure. Please help

I have a line of code that keeps crashing
NSArray* address = [NSArray arrayWithArray:[[[access.filteredResults objectAtIndex:[indexPath row]] addressArray] objectAtIndex:0]];
I debugged it and I discovered that addressArray is the culprit.
It's defined in a class called ABContact (created by Erica Sadun, author of Developer Cookbook)
#property (nonatomic, readonly) NSArray *addressArray;
The implementation file has
- (NSArray *) addressArray {return [self arrayForProperty:kABPersonAddressProperty];}
The error message that I get is
-[__NSCFDictionary getObjects:range:]: unrecognized selector sent to instance 0x18aeb0
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary getObjects:range:]: unrecognized selector sent to instance 0x18aeb0'
*** Call stack at first throw:
(
0 CoreFoundation 0x3284b987 __exceptionPreprocess + 114
1 libobjc.A.dylib 0x31aca49d objc_exception_throw + 24
2 CoreFoundation 0x3284d133 -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3 CoreFoundation 0x327f4aa9 ___forwarding___ + 508
4 CoreFoundation 0x327f4860 _CF_forwarding_prep_0 + 48
5 CoreFoundation 0x327dc325 -[NSArray initWithArray:range:copyItems:] + 372
6 CoreFoundation 0x327e94d3 +[NSArray arrayWithArray:] + 62
7 ContactMapper 0x00003c17 -[RootViewController tableView:cellForRowAtIndexPath:] + 1110
8 UIKit 0x32c46a21 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 516
9 UIKit 0x32c467f3 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 34
10 UIKit 0x32c44d2d -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 936
11 UIKit 0x32c43edd -[UITableView layoutSubviews] + 140
12 UIKit 0x32bf00cf -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 26
13 CoreFoundation 0x327e9bbf -[NSObject(NSObject) performSelector:withObject:] + 22
14 QuartzCore 0x3087b685 -[CALayer layoutSublayers] + 120
15 QuartzCore 0x3087b43d CALayerLayoutIfNeeded + 184
16 QuartzCore 0x3089e593 -[CALayer(CALayerPrivate) layoutBelowIfNeeded] + 18
17 UIKit 0x32c1c3f3 -[UIView(Hierarchy) layoutBelowIfNeeded] + 22
18 UIKit 0x32e41cb3 -[UISplitViewController willRotateToInterfaceOrientation:duration:] + 614
19 UIKit 0x32cadc71 -[UIViewController window:willRotateToInterfaceOrientation:duration:] + 540
20 UIKit 0x32ced6b3 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 1158
21 UIKit 0x32caef5f -[UIWindow _setRotatableViewOrientation:duration:force:] + 54
22 UIKit 0x32c27007 -[UIWindow _updateToInterfaceOrientation:duration:force:] + 74
23 UIKit 0x32c26f81 -[UIWindow _updateInterfaceOrientationFromDeviceOrientation:] + 112
24 UIKit 0x32c26ead -[UIWindow _handleDeviceOrientationChange:] + 88
25 Foundation 0x320f1623 _nsnote_callback + 142
26 CoreFoundation 0x327d2123 __CFXNotificationPost_old + 402
27 CoreFoundation 0x327d1dc3 _CFXNotificationPostNotification + 118
28 Foundation 0x320e0d23 -[NSNotificationCenter postNotificationName:object:userInfo:] + 70
29 UIKit 0x32bf0819 -[UIDevice setOrientation:animated:] + 144
30 UIKit 0x32c152ff -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 438
31 UIKit 0x32be148b -[UIApplication handleEvent:withNewEvent:] + 1114
32 UIKit 0x32be0ec9 -[UIApplication sendEvent:] + 44
33 UIKit 0x32be0907 _UIApplicationHandleEvent + 5090
34 GraphicsServices 0x3094af03 PurpleEventCallback + 666
35 CoreFoundation 0x327e06ff __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
36 CoreFoundation 0x327e06c3 __CFRunLoopDoSource1 + 166
37 CoreFoundation 0x327d2f7d __CFRunLoopRun + 520
38 CoreFoundation 0x327d2c87 CFRunLoopRunSpecific + 230
39 CoreFoundation 0x327d2b8f CFRunLoopRunInMode + 58
40 UIKit 0x32c14309 -[UIApplication _run] + 380
41 UIKit 0x32c11e93 UIApplicationMain + 670
42 ContactMapper 0x00002b67 main + 70
43 ContactMapper 0x00002b1c start + 40
I'm not sure how to fix it?
access.filteredResults is an NSArray
It might be how AddressBook data is handled (CFDictionary vs NSArray or NSDictionary). I've spent 15 hours and I'm stuck. Any help would be appreciated.
Nope. NSCFDictionary has nothing to do with your problem.
Your problem is that you have under-retained or over-released an array object, and that object died, and another object (in this case, it was a dictionary, but it could have been anything) got allocated at the same address. Your code is trying to create an array with the old object, but ends up passing the dictionary that has succeeded it instead.
You need to find out where you are unduly releasing or failing to retain the value of addressArray.
It may help to run your app under the Zombies instrument, whose very purpose is debugging an application that prematurely releases or fails to retain an object.

Resources