IOS Application Terminating at main file itself NSException - objective-c

2015-09-21 10:57:48.696 Kip Up[4707:140538] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
*** First throw call stack:
(
0 CoreFoundation 0x00ce6746 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x005b9a97 objc_exception_throw + 44
2 CoreFoundation 0x00b9bce1 -[__NSArrayM insertObject:atIndex:] + 881
3 CoreFoundation 0x00b9b941 -[__NSArrayM addObject:] + 65
4 UIKit 0x0134bc3b -[UIView(UIViewGestures) addGestureRecognizer:] + 210
5 Kip Up 0x000c0c1e -[ViewController viewDidLoad] + 414
6 UIKit 0x0141dd54 -[UIViewController loadViewIfRequired] + 771
7 UIKit 0x0141e045 -[UIViewController view] + 35
8 UIKit 0x0130fe35 -[UIWindow addRootViewControllerViewIfPossible] + 66
9 UIKit 0x013102fc -[UIWindow _setHidden:forced:] + 287
10 UIKit 0x013105f8 -[UIWindow _orderFrontWithoutMakingKey] + 49
11 UIKit 0x0131e966 -[UIWindow makeKeyAndVisible] + 80
12 UIKit 0x012b3e88 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3217
13 UIKit 0x012b73d2 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1639
14 UIKit 0x012d08ee __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke + 59
15 UIKit 0x012b5ffa -[UIApplication workspaceDidEndTransaction:] + 155
16 FrontBoardServices 0x04490c9e __37-[FBSWorkspace clientEndTransaction:]_block_invoke_2 + 71
17 FrontBoardServices 0x0449072f __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 54
18 FrontBoardServices 0x044a2d7c __31-[FBSSerialQueue performAsync:]_block_invoke_2 + 30
19 CoreFoundation 0x00c08050 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 16
20 CoreFoundation 0x00bfd963 __CFRunLoopDoBlocks + 195
21 CoreFoundation 0x00bfd7bb __CFRunLoopRun + 2715
22 CoreFoundation 0x00bfca5b CFRunLoopRunSpecific + 443
23 CoreFoundation 0x00bfc88b CFRunLoopRunInMode + 123
24 UIKit 0x012b59b2 -[UIApplication _run] + 571
25 UIKit 0x012b90b6 UIApplicationMain + 1526
26 Kip Up 0x000c229a main + 138
27 libdyld.dylib 0x03278ac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

Please check if your root view controller UIViewController connections are intact. It usually happens due to broken link on the Interface Builder. If you are using Storyboards, make sure you haven't hooked up duplicate referencing outlets. Also ensure that you are importing AppDelegate.h.
Again there could be n number of reason for this crash. Please use exception or symbolic break point to come to a conclusion.

Related

UITableViewController in iOS 8 Today Extension

I'm trying to add UITableViewController to Today Widget, but every time I drag UITableViewController to Storyboard and run the Widget it crashes with the following error.
I've tried multiple times. I've tried it by using Table View object, but problem persists.
Note: It crashes even before loading viewDidLoad() method.
2015-06-06 01:19:20.569 iOSHackerToday[3202:283287] * Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '* -[NSArrayM
insertObject:atIndex:]: object cannot be nil'
*** First throw call stack: ( 0 CoreFoundation 0x0000000107842c65 __exceptionPreprocess + 165 1 libobjc.A.dylib
0x00000001074dbbb7 objc_exception_throw + 45 2 CoreFoundation
0x000000010770f8ca -[__NSArrayM insertObject:atIndex:] + 954 3
UIKit 0x0000000107d6f0b9
-[UIViewController _addChildViewController:performHierarchyCheck:notifyWillMove:] + 338 4 UIKit 0x0000000108241a0c
-[_UIViewServiceViewControllerOperator __createViewController:withContextToken:fbsDisplays:appearanceSerializedRepresentations:legacyAppearance:traitCollection:initialInterfaceOrientation:hostAccessibilityServerPort:canShowTextServices:replyHandler:]
+ 2216 5 CoreFoundation 0x0000000107738dec __invoking_ + 140 6 CoreFoundation 0x0000000107738c42 -[NSInvocation invoke] + 290 7 CoreFoundation
0x00000001077c9016 -[NSInvocation invokeWithTarget:] + 54 8 UIKit
0x00000001082fd01b -[_UIViewServiceImplicitAnimationDecodingProxy
forwardInvocation:] + 222 9 CoreFoundation
0x000000010779ff4f forwarding + 495 10 CoreFoundation
0x000000010779fcd8 _CF_forwarding_prep_0 + 120 11 CoreFoundation
0x0000000107738dec invoking_ + 140 12 CoreFoundation
0x0000000107738c42 -[NSInvocation invoke] + 290 13 CoreFoundation
0x00000001077c9016 -[NSInvocation invokeWithTarget:] + 54 14 UIKit
0x00000001082889f4 -[_UIQueueingProxy forwardInvocation:] + 319 15
CoreFoundation 0x000000010779ff4f
forwarding + 495 16 CoreFoundation 0x000000010779fcd8 _CF_forwarding_prep_0 + 120 17 CoreFoundation
0x0000000107738dec invoking_ + 140 18 CoreFoundation
0x0000000107738c42 -[NSInvocation invoke] + 290 19 CoreFoundation
0x00000001077c9016 -[NSInvocation invokeWithTarget:] + 54 20
CoreFoundation 0x000000010779ff4f
forwarding + 495 21 CoreFoundation 0x000000010779fcd8 _CF_forwarding_prep_0 + 120 22 CoreFoundation
0x0000000107738dec invoking_ + 140 23 CoreFoundation
0x0000000107738c42 -[NSInvocation invoke] + 290 24 libdispatch.dylib
0x0000000109da6f16 _dispatch_call_block_and_release + 12 25
libdispatch.dylib 0x0000000109dc1964
_dispatch_client_callout + 8 26 libdispatch.dylib 0x0000000109daca59 _dispatch_main_queue_callback_4CF + 704 27
CoreFoundation 0x00000001077aa1f9
CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9 28 CoreFoundation 0x000000010776bdcb __CFRunLoopRun
+ 2043 29 CoreFoundation 0x000000010776b366 CFRunLoopRunSpecific + 470 30 GraphicsServices
0x000000010b01ca3e GSEventRunModal + 161 31 UIKit
0x0000000107c3b900 UIApplicationMain + 1282 32 libxpc.dylib
0x000000010a0a7aec _xpc_objc_main + 453 33 libxpc.dylib
0x000000010a0a9e91 xpc_main + 185 34 Foundation
0x0000000107209ee1 service_connection_handler + 0 35 PlugInKit
0x0000000106ff3a82 -[PKService run] + 521 36 PlugInKit
0x0000000106ff3747 +[PKService main] + 55 37 PlugInKit
0x0000000106ff3aa6 +[PKService _defaultRun:arguments:] + 17 38
libextension.dylib 0x000000010978399d NSExtensionMain
+ 51 39 libdyld.dylib 0x0000000109df1145 start + 1 40 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type
NSException (lldb)
When you delete the default layout and drag a new table view controller, you need to mark the new view controller as 'Intial View Controller'
Here's the Apple's document which explains how to do it. https://developer.apple.com/library/ios/recipes/xcode_help-IB_storyboard/chapters/SetInitialController.html
In the storyboard, if you are using a custom view controller class made in swift, make sure you check the box 'Inherit Module From Target':

PFLoginViewController and Facebook Login: couldn't login

I'm currently experiencing a problem with the PFLoginViewController and Facebook Login process. I set up the FB app from the developer page, I put the APP id e secret ID in the Parse App setting in the Authorization tab then I add a URL scheme and FacebookAppID e DisplayName as string in the Custom iOS Target. All the required Frameworks have been previously installed in the app. When I click the Facebook login button the error I get is the following:
014-09-26 00:52:31.865 Diary[17009:19a03] -[__NSArrayI rangeOfString:]: unrecognized selector sent to instance 0xa3545b0
2014-09-26 00:52:31.902 Diary[17009:19a03] CRASH: -[__NSArrayI rangeOfString:]: unrecognized selector sent to instance 0xa3545b0
2014-09-26 00:52:31.911 Diary[17009:19a03] Stack Trace: (
0 CoreFoundation 0x0260e02e __exceptionPreprocess + 206
1 libobjc.A.dylib 0x01f6fe7e objc_exception_throw + 44
2 CoreFoundation 0x026994bd -[NSObject(NSObject) doesNotRecognizeSelector:] + 253
3 CoreFoundation 0x025fdbbc ___forwarding___ + 588
4 CoreFoundation 0x025fd94e _CF_forwarding_prep_0 + 14
5 Diary 0x00094f9c -[PFFacebookAuthenticationProvider containsPublishPermission] + 202
6 Diary 0x00095203 -[PFFacebookAuthenticationProvider authenticateWithSuccess:failure:cancel:] + 497
7 Diary 0x00030e36 +[PFUser(Private) logInWithProvider:block:] + 249
8 Diary 0x0003246a +[PFUser(Private) logInWithAuthType:block:] + 129
9 Diary 0x00093bca +[PFFacebookUtils logInWithPermissions:block:] + 177
10 Diary 0x0005ef45 -[PFLogInViewController logInUsingFacebook] + 193
11 libobjc.A.dylib 0x01f83705 -[NSObject performSelector:withObject:withObject:] + 77
12 UIKit 0x00eb72c0 -[UIApplication sendAction:to:from:forEvent:] + 96
13 UIKit 0x00eb7258 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
14 UIKit 0x00f78021 -[UIControl sendAction:to:forEvent:] + 66
15 UIKit 0x00f7857f -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 578
16 UIKit 0x00f776e8 -[UIControl touchesEnded:withEvent:] + 546
17 UIKit 0x00ee6cef -[UIWindow _sendTouchesForEvent:] + 846
18 UIKit 0x00ee6f02 -[UIWindow sendEvent:] + 273
19 UIKit 0x00ec4d4a -[UIApplication sendEvent:] + 436
20 UIKit 0x00eb6698 _UIApplicationHandleEvent + 9874
21 GraphicsServices 0x021ecdf9 _PurpleEventCallback + 339
22 GraphicsServices 0x021ecad0 PurpleEventCallback + 46
23 CoreFoundation 0x02583bf5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
24 CoreFoundation 0x02583962 __CFRunLoopDoSource1 + 146
25 CoreFoundation 0x025b4bb6 __CFRunLoopRun + 2118
26 CoreFoundation 0x025b3f44 CFRunLoopRunSpecific + 276
27 CoreFoundation 0x025b3e1b CFRunLoopRunInMode + 123
28 GraphicsServices 0x021eb7e3 GSEventRunModal + 88
29 GraphicsServices 0x021eb668 GSEventRun + 104
30 UIKit 0x00eb3ffc UIApplicationMain + 1211
31 Diary 0x0000225d main + 141
32 Diary 0x00002185 start + 53
)
2014-09-26 00:52:31.912 Diary[17009:19a03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI rangeOfString:]: unrecognized selector sent to instance 0xa3545b0'
*** First throw call stack:
(0x260e012 0x1f6fe7e 0x26994bd 0x25fdbbc 0x25fd94e 0x94f9c 0x95203 0x30e36 0x3246a 0x93bca 0x5ef45 0x1f83705 0xeb72c0 0xeb7258 0xf78021 0xf7857f 0xf776e8 0xee6cef 0xee6f02 0xec4d4a 0xeb6698 0x21ecdf9 0x21ecad0 0x2583bf5 0x2583962 0x25b4bb6 0x25b3f44 0x25b3e1b 0x21eb7e3 0x21eb668 0xeb3ffc 0x225d 0x2185)
libc++abi.dylib: terminate called throwing an exception
Any suggestion?

Xcode Error with slideviewcontroller

I am new to Xcode and I keep getting this error and I am not quite sure what it means and how to fix it:
Below is the link to the code error(http://pastebin.com/Y74frJxa) ...
2014-01-26 00:23:16.183 SidebarDemo[677:70b] *** Assertion failure in -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:], /SourceCache/UIKit_Sim/UIKit-2903.23/UITableView.m:5261
2014-01-26 00:23:16.186 SidebarDemo[677:70b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier map - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'
*** First throw call stack:
(
0 CoreFoundation 0x0222a5e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x016a48b6 objc_exception_throw + 44
2 CoreFoundation 0x0222a448 +[NSException raise:format:arguments:] + 136
3 Foundation 0x01077fee -[NSAssertionHandler handleFailureInMethodbject:file:lineNumber:description:] + 116
4 UIKit 0x002e9ed3 -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:] + 170
5 SidebarDemo 0x0000d6e9 -[SidebarViewController tableView:cellForRowAtIndexPath:] + 233
6 UIKit 0x002f461f -[UITableView _createPreparedCellForGlobalRow:withIndexPath:] + 412
7 UIKit 0x002f46f3 -[UITableView _createPreparedCellForGlobalRow:] + 69
8 UIKit 0x002d8774 -[UITableView _updateVisibleCellsNow:] + 2378
9 UIKit 0x002ebe95 -[UITableView layoutSubviews] + 213
10 UIKit 0x00270267 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
11 libobjc.A.dylib 0x016b681f -[NSObject performSelector:withObject:] + 70
12 QuartzCore 0x029ed2ea -[CALayer layoutSublayers] + 148
13 QuartzCore 0x029e10d4 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
14 QuartzCore 0x029e0f40 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
15 QuartzCore 0x02948ae6 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
16 QuartzCore 0x02949e71 _ZN2CA11Transaction6commitEv + 393
17 QuartzCore 0x02a06430 +[CATransaction flush] + 52
18 UIKit 0x00221dc9 _afterCACommitHandler + 131
19 CoreFoundation 0x021f24ce __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
20 CoreFoundation 0x021f241f __CFRunLoopDoObservers + 399
21 CoreFoundation 0x021d0344 __CFRunLoopRun + 1076
22 CoreFoundation 0x021cfac3 CFRunLoopRunSpecific + 467
23 CoreFoundation 0x021cf8db CFRunLoopRunInMode + 123
24 GraphicsServices 0x027c59e2 GSEventRunModal + 192
25 GraphicsServices 0x027c5809 GSEventRun + 104
26 UIKit 0x00205d3b UIApplicationMain + 1225
27 SidebarDemo 0x0000c76d main + 141
28 libdyld.dylib 0x0386a70d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Thank you to all who help in advance!
The error says you are missing reuseIdentifier. For this,
just select tableViewCell in yourTableView in Storyboard and set reuseIdentifier in attributes Inspector.
use that reuse identifier in cellForRowAtIndex method as
[tableView dequeueReusableCellWithIdentifier:#"xxxx"]

Error Log When Calling a row of table

Anyone knows Why this error?Occur when i select the row of a table,navigate to a view,then if i go back and select it again it just crash
-[CALayerArray name]: unrecognized selector sent to instance 0x5a4f8a0
2011-08-24 01:01:10.983 Prototipo[8277:207]
*** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '-[CALayerArray name]: unrecognized selector sent to instance 0x5a4f8a0'
*** Call stack at first throw:
(
0 CoreFoundation 0x010715a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x011c5313 objc_exception_throw + 44
2 CoreFoundation 0x010730bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x00fe2966 ___forwarding___ + 966
4 CoreFoundation 0x00fe2522 _CF_forwarding_prep_0 + 50
5 Prototipo 0x00003989 -[BaladaDetailsController setAllElements] + 129
6 Prototipo 0x00003cba -[BaladaDetailsController viewDidLoad] + 36
7 UIKit 0x00371089 -[UIViewController view] + 179
8 UIKit 0x0036f482 -[UIViewController contentScrollView] + 42
9 UIKit 0x0037ff25 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
10 UIKit 0x0037e555 -[UINavigationController _layoutViewController:] + 43
11 UIKit 0x0037f7aa -[UINavigationController _startTransition:fromViewController:toViewController:] + 326
12 UIKit 0x0037a32a -[UINavigationController _startDeferredTransitionIfNeeded] + 266
13 UIKit 0x00381562 -[UINavigationController pushViewController:transition:forceImmediate:] + 932
14 UIKit 0x0037a1c4 -[UINavigationController pushViewController:animated:] + 62
15 Prototipo 0x00004bea -[TableViewBaladasController tableView:didSelectRowAtIndexPath:] + 280
16 UIKit 0x00338b68 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1140
17 UIKit 0x0032eb05 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 219
18 Foundation 0x0004079e __NSFireDelayedPerform + 441
19 CoreFoundation 0x010528c3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 19
20 CoreFoundation 0x01053e74 __CFRunLoopDoTimer + 1220
21 CoreFoundation 0x00fb02c9 __CFRunLoopRun + 1817
22 CoreFoundation 0x00faf840 CFRunLoopRunSpecific + 208
23 CoreFoundation 0x00faf761 CFRunLoopRunInMode + 97
24 GraphicsServices 0x0192e1c4 GSEventRunModal + 217
25 GraphicsServices 0x0192e289 GSEventRun + 115
26 UIKit 0x002cfc93 UIApplicationMain + 1160
27 Prototipo 0x0000261c main + 102
28 Prototipo 0x000025ad start + 53
)
terminate called after throwing an instance of 'NSException'
You've probably have a memory management error and have over-released an object. Read the Memory Management Programming Guide. If you show some of your code we can provide more help.

terminate called after throwing an instance of 'NSException' error

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!!
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.
This happened to me because I forgot #synthesize.
#synthesize window;
In my view controller.