I am using UITableView to display data fetched from webservice.Fetching is done fine and displays data in console.However I am getting SIGABRT error.I have also added storyboard to empty application , if that is causing any problems here, I am not sure.What should be done here?
Here is the description : -
-[__NSDictionaryM objectAtIndex:]: unrecognized selector sent to instance 0xcb38930
2014-06-17 13:25:06.961 SushrutTest[879:a0b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryM objectAtIndex:]: unrecognized selector sent to instance 0xcb38930'
*** First throw call stack:
(
0 CoreFoundation 0x01a985e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x0181b8b6 objc_exception_throw + 44
2 CoreFoundation 0x01b35903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x01a8890b ___forwarding___ + 1019
4 CoreFoundation 0x01a884ee _CF_forwarding_prep_0 + 14
5 SushrutTest 0x0000380e -[ListViewController tableView:cellForRowAtIndexPath:] + 334
6 UIKit 0x0067cd2f -[UITableView _createPreparedCellForGlobalRow:withIndexPath:] + 412
7 UIKit 0x0067ce03 -[UITableView _createPreparedCellForGlobalRow:] + 69
8 UIKit 0x00661124 -[UITableView _updateVisibleCellsNow:] + 2378
9 UIKit 0x006745a5 -[UITableView layoutSubviews] + 213
10 UIKit 0x005f8dd7 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
11 libobjc.A.dylib 0x0182d81f -[NSObject performSelector:withObject:] + 70
12 QuartzCore 0x0452472a -[CALayer layoutSublayers] + 148
13 QuartzCore 0x04518514 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
14 QuartzCore 0x04526b55 -[CALayer(CALayerPrivate) layoutBelowIfNeeded] + 43
15 UIKit 0x005eb7e6 -[UIView(Hierarchy) layoutBelowIfNeeded] + 595
16 UIKit 0x005eb58d -[UIView(Hierarchy) layoutIfNeeded] + 74
17 UIKit 0x006c75a4 -[UINavigationController _layoutViewController:] + 1062
18 UIKit 0x006c67c6 -[UINavigationController _layoutTopViewController] + 176
19 UIKit 0x006c49f5 -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] + 429
20 UIKit 0x008b3732 -[UINavigationTransitionView _notifyDelegateTransitionDidStopWithContext:] + 328
21 UIKit 0x008b3a37 -[UINavigationTransitionView _cleanupTransition] + 703
22 UIKit 0x008b3a76 -[UINavigationTransitionView _navigationTransitionDidStop] + 55
23 UIKit 0x005da81c -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 267
24 UIKit 0x005d9005 +[UIViewAnimationState popAnimationState] + 334
25 UIKit 0x005ed866 +[UIView(Animation) commitAnimations] + 36
26 UIKit 0x008b3535 -[UINavigationTransitionView transition:fromView:toView:] + 2795
27 UIKit 0x008b2a42 -[UINavigationTransitionView transition:toView:] + 55
28 UIKit 0x006c83d7 -[UINavigationController _startTransition:fromViewController:toViewController:] + 3186
29 UIKit 0x006c872c -[UINavigationController _startDeferredTransitionIfNeeded:] + 645
30 UIKit 0x006c9349 -[UINavigationController __viewWillLayoutSubviews] + 57
31 UIKit 0x0080239d -[UILayoutContainerView layoutSubviews] + 213
32 UIKit 0x005f8dd7 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
33 libobjc.A.dylib 0x0182d81f -[NSObject performSelector:withObject:] + 70
34 QuartzCore 0x0452472a -[CALayer layoutSublayers] + 148
35 QuartzCore 0x04518514 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
36 QuartzCore 0x04524675 -[CALayer layoutIfNeeded] + 160
37 UIKit 0x006b3ca3 -[UIViewController window:setupWithInterfaceOrientation:] + 304
38 UIKit 0x005d2d27 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 5212
39 UIKit 0x005d18c6 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 82
40 UIKit 0x005d1798 -[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 117
41 UIKit 0x005d1820 -[UIWindow _setRotatableViewOrientation:duration:force:] + 67
42 UIKit 0x005d08ba __57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke + 120
43 UIKit 0x005d081c -[UIWindow _updateToInterfaceOrientation:duration:force:] + 400
44 UIKit 0x005d1573 -[UIWindow setAutorotates:forceUpdateInterfaceOrientation:] + 870
45 UIKit 0x005d4b66 -[UIWindow setDelegate:] + 449
46 UIKit 0x006a5dc7 -[UIViewController _tryBecomeRootViewControllerInWindow:] + 180
47 UIKit 0x005ca7cc -[UIWindow addRootViewControllerViewIfPossible] + 609
48 UIKit 0x005ca947 -[UIWindow _setHidden:forced:] + 312
49 UIKit 0x005cabdd -[UIWindow _orderFrontWithoutMakingKey] + 49
50 UIKit 0x005d544a -[UIWindow makeKeyAndVisible] + 65
51 UIKit 0x005888e0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1851
52 UIKit 0x0058cfb8 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
53 UIKit 0x005a142c -[UIApplication handleEvent:withNewEvent:] + 3447
54 UIKit 0x005a1999 -[UIApplication sendEvent:] + 85
55 UIKit 0x0058ec35 _UIApplicationHandleEvent + 736
56 GraphicsServices 0x038a82eb _PurpleEventCallback + 776
57 GraphicsServices 0x038a7df6 PurpleEventCallback + 46
58 CoreFoundation 0x01a13dd5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
59 CoreFoundation 0x01a13b0b __CFRunLoopDoSource1 + 523
60 CoreFoundation 0x01a3e7ec __CFRunLoopRun + 2156
61 CoreFoundation 0x01a3db33 CFRunLoopRunSpecific + 467
62 CoreFoundation 0x01a3d94b CFRunLoopRunInMode + 123
63 UIKit 0x0058c6ed -[UIApplication _run] + 840
64 UIKit 0x0058e94b UIApplicationMain + 1225
65 SushrutTest 0x00003b2d main + 141
66 libdyld.dylib 0x020d4725 start + 0
)
libc++abi.dylib: terminating with uncaught exception of type NSException
-[__NSDictionaryM objectAtIndex:]: unrecognized selector sent to instance 0xcb38930
You are asking -objectAtIndex: from an object that is an NSDictionary in your cellForRowAtIndexPath method.
NSDictionary doesn't know -objectAtIndex - but NSArray does. So somehow you get a dictionary when what you want is an array.
Show the contents of cellForRowAtIndexPath for further hints.
You are confuse NSDictonary and NSArray objects. As noted in message NSDictonary don't have objectAtIndex selector.
User contributions licensed under CC BY-SA 3.0