I create a method to do something in background and manipulate ui on foreground. In background i still do nothing right now/ but later i want to take one core data object and On foreground i push from active navigation controller.
When I do that I got this error :
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: ' -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
This is a piece of my code :
[[NSOperationQueue new] addOperationWithBlock:^{
[[NSOperationQueue mainQueue]addOperationWithBlock:^{
//theCatalog is not nil here just FYI
PO1(theCatalog); //just for log the catalog object
[theCatalog showImageForThisCatalogwithNavigationController:self.delegateBGCatalogSearchTableCellResultProtocol.navigationController withPage:pageNumber];
}];
}];
But when i just call this, my code doesn't give error like that.
[theCatalog showImageForThisCatalogwithNavigationController:self.delegateBGCatalogSearchTableCellResultProtocol.navigationController withPage:pageNumber];
Basically, the code simply won't run in any block.
I can run
[theCatalog showImageForThisCatalogwithNavigationController:self.delegateBGCatalogSearchTableCellResultProtocol.navigationController withPage:pageNumber]; just fine
Bit if I run
[[NSOperationQueue mainQueue]addOperationWithBlock:^{
[theCatalog showImageForThisCatalogwithNavigationController:self.delegateBGCatalogSearchTableCellResultProtocol.navigationController withPage:pageNumber];
//theCatalog is not nil here just FYI
}];
Which is almost equivalent, then I got that error. I can't know where the error is. I just get redirected to main() and the program crash there.
This is the full error code
2014-09-18 18:15:52.808 [1735:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
*** First throw call stack:
(0x2f262fd3 0x39a0fccf 0x2f19cf9d 0x31b15c6f 0x31b15aab 0x31b15633 0x31b2cf49 0x31b2cb8d 0x31b2cb25 0x31a7ed79 0x316fc62b 0x316f7e3b 0x316f7ccd 0x316f76df 0x316f74ef 0x316f121d 0x2f22e2a5 0x2f22bc49 0x2f22bf8b 0x2f196f4f 0x2f196d33 0x3409b663 0x31ae216d 0xc91cd 0x39f1cab7)
Perhaps numbers below First throw call stack, which are (0x2f262fd3 0x39a0fccf 0x2f19cf9d 0x31b15c6f 0x31b15aab 0x31b15633 0x31b2cf49 0x31b2cb8d 0x31b2cb25 0x31a7ed79 0x316fc62b 0x316f7e3b 0x316f7ccd 0x316f76df 0x316f74ef 0x316f121d 0x2f22e2a5 0x2f22bc49 0x2f22bf8b 0x2f196f4f 0x2f196d33 0x3409b663 0x31ae216d 0xc91cd 0x39f1cab7) could help to debug but I have no idea what those are.
libc++abi.dylib: terminating with uncaught exception of type NSException
Right now i got another first throw call stack like this 2014-09-19 14:13:19.595[18059:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
*** First throw call stack:
(
0 CoreFoundation 0x05e501e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x02c258e5 objc_exception_throw + 44
2 CoreFoundation 0x05e02abc -[__NSArrayM insertObject:atIndex:] + 844
3 CoreFoundation 0x05e02760 -[__NSArrayM addObject:] + 64
4 UIKit 0x012e8050 -[UINavigationBar pushNavigationItem:] + 244
5 UIKit 0x012e73b7 -[UINavigationBar _pushNavigationItem:transition:] + 429
6 UIKit 0x01389fee __71-[UINavigationController pushViewController:transition:forceImmediate:]_block_invoke + 207
7 UIKit 0x01388a2d -[UINavigationController _startDeferredTransitionIfNeeded:] + 998
8 UIKit 0x013894e9 -[UINavigationController __viewWillLayoutSubviews] + 57
9 UIKit 0x014ca0d1 -[UILayoutContainerView layoutSubviews] + 213
10 UIKit 0x11ebd21b -[UILayoutContainerViewAccessibility(SafeCategory) layoutSubviews] + 50
11 UIKit 0x012b1964 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
12 libobjc.A.dylib 0x02c3782b -[NSObject performSelector:withObject:] + 70
13 QuartzCore 0x00f3b45a -[CALayer layoutSublayers] + 148
14 QuartzCore 0x00f2f244 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
15 QuartzCore 0x00f2f0b0 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
16 QuartzCore 0x00e957fa _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
17 QuartzCore 0x00e96b85 _ZN2CA11Transaction6commitEv + 393
18 QuartzCore 0x00e97258 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
19 CoreFoundation 0x05e1836e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
20 CoreFoundation 0x05e182bf __CFRunLoopDoObservers + 399
21 CoreFoundation 0x05df6254 __CFRunLoopRun + 1076
22 CoreFoundation 0x05df59d3 CFRunLoopRunSpecific + 467
23 CoreFoundation 0x05df57eb CFRunLoopRunInMode + 123
24 GraphicsServices 0x034f95ee GSEventRunModal + 192
25 GraphicsServices 0x034f942b GSEventRun + 104
26 UIKit 0x01242f9b UIApplicationMain + 1225
27 0x0000291d main + 141
28 libdyld.dylib 0x03118701 start + 1
29 ??? 0x00000001 0x0 + 1
)
Related
I've read that other people have had similar uncaught exceptions, however most seem to be caused by a missing outlet connection. I don't believe mine is related to IBOutlets because the VC runs fine in most scenarios and so do my other VCs.
I think it has to do with Core Data. Here's the error, which I believe occurs in my table's cellForRowAtIndexPath:
2016-01-05 15:18:14.947 Do List[1476:81278] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<NSManagedObject 0x7fbb89e7cc50> valueForUndefinedKey:]: the entity TomTask is not key value coding-compliant for the key "completedDate".'
*** First throw call stack:
(
0 CoreFoundation 0x0000000102b5ee65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000104cfddeb objc_exception_throw + 48
2 CoreFoundation 0x0000000102b5eaa9 -[NSException raise] + 9
3 CoreData 0x0000000102757ec1 -[NSManagedObject valueForUndefinedKey:] + 289
4 Do List 0x000000010235b9d6 _TFC7Do_List24AllocationViewController9tableViewfS0_FTCSo11UITableView21cellForRowAtIndexPathCSo11NSIndexPath_CSo15UITableViewCell + 2630
5 Do List 0x000000010235c24f _TToFC7Do_List24AllocationViewController9tableViewfS0_FTCSo11UITableView21cellForRowAtIndexPathCSo11NSIndexPath_CSo15UITableViewCell + 79
6 UIKit 0x0000000103933e43 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 766
7 UIKit 0x0000000103933f7b -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 74
8 UIKit 0x0000000103908a39 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2996
9 UIKit 0x000000010393d01c -[UITableView _performWithCachedTraitCollection:] + 92
10 UIKit 0x0000000103923edc -[UITableView layoutSubviews] + 224
11 UIKit 0x00000001038914a3 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 703
12 QuartzCore 0x000000010369659a -[CALayer layoutSublayers] + 146
13 QuartzCore 0x000000010368ae70 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
14 QuartzCore 0x000000010368acee _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
15 QuartzCore 0x000000010367f475 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
16 QuartzCore 0x00000001036acc0a _ZN2CA11Transaction6commitEv + 486
17 UIKit 0x00000001037d4f7c _UIApplicationHandleEventQueue + 7329
18 CoreFoundation 0x0000000102a8aa31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
19 CoreFoundation 0x0000000102a8095c __CFRunLoopDoSources0 + 556
20 CoreFoundation 0x0000000102a7fe13 __CFRunLoopRun + 867
21 CoreFoundation 0x0000000102a7f828 CFRunLoopRunSpecific + 488
22 GraphicsServices 0x0000000106bb7ad2 GSEventRunModal + 161
23 UIKit 0x00000001037da610 UIApplicationMain + 171
24 Do List 0x0000000102368fad main + 109
25 libdyld.dylib 0x000000010a52392d start + 1
26 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
A Few Notes
There's a particular set of VCs that, if run in a particular order, cause this error.
The error occurs when I go from A -> B -> C, then try to unwind to A.
If you look at the exception stack above, the error is happening in the cellForRowAtIndexPath of the allocViewController. That VC is B ,so it shouldn't be loading, just being unwound through.
It references "CompletedDate" which is the new thing I added yesterday that kick this whole thing off. CompletedDate was an existing CoreData attribute which I just started showing in view controller C.
If you look at the first line of the error, it looks like you have a class called TomTask which you're trying to use the "completedDate" from, but there isn't a "completedDate" in TomTask.
It appears (from entry #4 in your call stack) you're trying to do this in your tableView:cellForRowAtIndexPath: method of that view controller.
I integrated 'XBChatModule' Library from Cocoapods into my project.
When I run the code for the first time, It crashed the app by throwing following error -[XBMessage messageHash]: unrecognized selector sent to instance and it got resolved by changing XBMessage.m file as below
XBMessage.m
- (NSUInteger)messageHash
{
return self.hash;
}
But this produces new issue saying
Assertion failure in -[ChatMessagesController collectionView:cellForItemAtIndexPath:], /Users/Neelacharya/Harshit/LIve Projects/Project/V1/Source/Project/Pods/JSQMessagesViewController/JSQMessagesViewController/Controllers/JSQMessagesViewController.m:452
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: messageSenderId != nil'
*** First throw call stack:
(
0 CoreFoundation 0x000000011161ca75 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001112b1bb7 objc_exception_throw + 45
2 CoreFoundation 0x000000011161c8da +[NSException raise:format:arguments:] + 106
3 Foundation 0x000000010edcfb6f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 CinchGaming 0x000000010d7be3c5 -[JSQMessagesViewController collectionView:cellForItemAtIndexPath:] + 693
5 CinchGaming 0x000000010d7f5f6d -[XBMessageViewController collectionView:cellForItemAtIndexPath:] + 141
6 UIKit 0x00000001102b9fab -[UICollectionView _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:] + 244
7 UIKit 0x00000001102bb6e4 -[UICollectionView _updateVisibleCellsNow:] + 3445
8 UIKit 0x00000001102bf391 -[UICollectionView layoutSubviews] + 243
9 UIKit 0x000000010fd041c3 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 521
10 QuartzCore 0x000000010f9d2c58 -[CALayer layoutSublayers] + 150
11 QuartzCore 0x000000010f9c787e _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
12 QuartzCore 0x000000010f9c76ee _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
13 QuartzCore 0x000000010f93536e _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242
14 QuartzCore 0x000000010f936482 _ZN2CA11Transaction6commitEv + 390
15 QuartzCore 0x000000010f936aed _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 89
16 CoreFoundation 0x0000000111551507 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
17 CoreFoundation 0x0000000111551460 __CFRunLoopDoObservers + 368
18 CoreFoundation 0x0000000111547293 __CFRunLoopRun + 1123
19 CoreFoundation 0x0000000111546bc6 CFRunLoopRunSpecific + 470
20 GraphicsServices 0x0000000112796a58 GSEventRunModal + 161
21 UIKit 0x000000010fc8a580 UIApplicationMain + 1282
22 CinchGaming 0x000000010d67e463 main + 115
23 libdyld.dylib 0x0000000111b4e145 start + 1
24 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I understand the reason of crash is the member messageSenderId is nil at 452'th line of JSQMessagesViewController.m file. But I don't know why does it occur and how to get it resolved.
I also reported as issue to the authors at Github, but couldn't get response.
I would appreciate if you can help me to solve the problem.
It think the application is crashing on this line:
NSString *messageSenderId = [messageItem senderId];
NSParameterAssert(messageSenderId != nil);
When I dig into that I found that the senderIdis being set from XBMessageViewController's loadDataToTable method. The only reason I can find the value for senderId is nil is you aren't setting the values for jidStr and senderId.
You will require to set jidStr and senderId and XBMessageViewController, where jidStr is receiver and senderId is self user.
Hope this helps.
You need to register your class like [self.collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:#"Cell"];
I am really confused as to why this is happening.
Since this happened randomly
Here is the stacktrace, I have not been able to figure it out.
Please help
Thanks
2015-03-30 15:12:50.817 MarcoApp[1857:23629] -[NSIBPrototypingLayoutConstraint finishedLoading]: unrecognized selector sent to instance 0x7f929ccc8cf0
2015-03-30 15:12:50.908 MarcoApp[1857:23629] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSIBPrototypingLayoutConstraint finishedLoading]: unrecognized selector sent to instance 0x7f929ccc8cf0'
*** First throw call stack:
(
0 CoreFoundation 0x000000010aa74a75 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010a333bb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010aa7bd1d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x000000010a9d39dc ___forwarding___ + 988
4 CoreFoundation 0x000000010a9d3578 _CF_forwarding_prep_0 + 120
5 CoreFoundation 0x000000010aa447fc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
6 CoreFoundation 0x000000010a944204 _CFXNotificationPost + 2484
7 Foundation 0x0000000109e8ddf8 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
8 UIKit 0x000000010b73baa7 -[UIApplication _handleApplicationDectivationWithScene:shouldForceExit:transitionContext:completion:] + 1054
9 UIKit 0x000000010b748833 __88-[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:]_block_invoke + 87
10 UIKit 0x000000010b7487cd -[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:] + 349
11 UIKit 0x000000010b73345a -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 486
12 FrontBoardServices 0x00000001115ae243 __31-[FBSSerialQueue performAsync:]_block_invoke + 16
13 CoreFoundation 0x000000010a9a9c7c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
14 CoreFoundation 0x000000010a99f9c5 __CFRunLoopDoBlocks + 341
15 CoreFoundation 0x000000010a99f785 __CFRunLoopRun + 2389
16 CoreFoundation 0x000000010a99ebc6 CFRunLoopRunSpecific + 470
17 GraphicsServices 0x000000010e89ca58 GSEventRunModal + 161
18 UIKit 0x000000010b735580 UIApplicationMain + 1282
19 MarcoApp 0x0000000109184afe top_level_code + 78
20 MarcoApp 0x0000000109184bda main + 42
21 libdyld.dylib 0x000000010ee2b145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
hard to tell without seeing your code but "unrecognized selector sent to instance" implies you have a method the requires a selector (name of a function) as a parameter and that methods got an invalid selector (the name of the function is wrong).
not sure but ther is any method in
- (void)applicationWillResignActive:(UIApplication *)application
which does not have selector thats why you app crash
Hey can anyone help me out that what type of exception is this i had earlier a code and link is as: Application run on simulator but not on device in iphone
can anybody here who can tell that what type of exception is in it? is there any memory leak?
here is the log below:
2013-12-27 17:53:26.814 Skirr[1346:a0b] Application windows are expected to have a root view controller at the end of application launch
2013-12-27 17:53:27.995 Skirr[1346:a0b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]'
*** First throw call stack:
(
0 CoreFoundation 0x032745e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x021b88b6 objc_exception_throw + 44
2 CoreFoundation 0x03228316 -[__NSPlaceholderArray initWithObjects:count:] + 390
3 CoreFoundation 0x0324bce9 +[NSArray arrayWithObject:] + 73
4 Skirr 0x000093bd -[SlideViewController viewDidLoad] + 1597
5 UIKit 0x00e2d318 -[UIViewController loadViewIfRequired] + 696
6 UIKit 0x00e2d5b4 -[UIViewController view] + 35
7 UIKit 0x00e473e2 -[UINavigationController _startCustomTransition:] + 778
8 UIKit 0x00e540c7 -[UINavigationController _startDeferredTransitionIfNeeded:] + 688
9 UIKit 0x00e54cb9 -[UINavigationController __viewWillLayoutSubviews] + 57
10 UIKit 0x00f8e181 -[UILayoutContainerView layoutSubviews] + 213
11 UIKit 0x00d84267 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
12 libobjc.A.dylib 0x021ca81f -[NSObject performSelector:withObject:] + 70
13 QuartzCore 0x005622ea -[CALayer layoutSublayers] + 148
14 QuartzCore 0x005560d4 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
15 QuartzCore 0x00555f40 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
16 QuartzCore 0x004bdae6 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
17 QuartzCore 0x004bee71 _ZN2CA11Transaction6commitEv + 393
18 QuartzCore 0x004bf544 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
19 CoreFoundation 0x0323c4ce __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
20 CoreFoundation 0x0323c41f __CFRunLoopDoObservers + 399
21 CoreFoundation 0x0321a344 __CFRunLoopRun + 1076
22 CoreFoundation 0x03219ac3 CFRunLoopRunSpecific + 467
23 CoreFoundation 0x032198db CFRunLoopRunInMode + 123
24 GraphicsServices 0x034ce9e2 GSEventRunModal + 192
25 GraphicsServices 0x034ce809 GSEventRun + 104
26 UIKit 0x00d19d3b UIApplicationMain + 1225
27 Skirr 0x000055a2 main + 130
28 libdyld.dylib 0x06896725 start + 0
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
have look at this link from
attempt to insert nil object from objects[0]
you are inserting or handling nil object you can get that line refer given above link
The error
* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]'
is occurring because you are trying to add nil value to an NSArray. After looking through your code on the other question the specific line of code that it is crashing on is
[_slideNavigationController setViewControllers:[NSArray arrayWithObject:initalViewController] animated:NO];
It is crashing here because of one of two things
1) initalViewController is nil so when you add it using arrayWithObject it crashes.
or
2) setViewControllers:[NSArray arrayWithObject:initalViewController] is causing the error because [NSArray arrayWithObject:initalViewController] is setting nil to the method setViewControllers: method which takes an NSArray.
I would say it is option (1) that is causing your issue though as the crash happens when arrayWithObject is called.
Check your main.m. The last argument should be set to the name of the class that implements the UIApplicationDelegate protocol OR you can try for last argument like NSStringFromClass([AppDelegate class]).
Please check this link it might help you .
click here
I used 'Detail - Master Application' of Apple's example file.
I edited its 'Main-iPhone.storyboard'like this image.
And happened this error to my application.
2013-12-14 15:13:12.960 IFST[2448:70b] -[UITabBarController topViewController]: unrecognized selector sent to instance 0x8a6c290
2013-12-14 15:13:12.963 IFST[2448:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITabBarController topViewController]: unrecognized selector sent to instance 0x8a6c290'
*** First throw call stack:
(
0 CoreFoundation 0x01aa15e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x018248b6 objc_exception_throw + 44
2 CoreFoundation 0x01b3e903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x01a9190b ___forwarding___ + 1019
4 CoreFoundation 0x01a914ee _CF_forwarding_prep_0 + 14
5 IFST 0x00004d40 -[AppDelegate application:didFinishLaunchingWithOptions:] + 848
6 UIKit 0x0058c355 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 309
7 UIKit 0x0058cb95 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1536
8 UIKit 0x005913a8 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
9 UIKit 0x005a587c -[UIApplication handleEvent:withNewEvent:] + 3447
10 UIKit 0x005a5de9 -[UIApplication sendEvent:] + 85
11 UIKit 0x00593025 _UIApplicationHandleEvent + 736
12 GraphicsServices 0x039042f6 _PurpleEventCallback + 776
13 GraphicsServices 0x03903e01 PurpleEventCallback + 46
14 CoreFoundation 0x01a1cd65 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
15 CoreFoundation 0x01a1ca9b __CFRunLoopDoSource1 + 523
16 CoreFoundation 0x01a4777c __CFRunLoopRun + 2156
17 CoreFoundation 0x01a46ac3 CFRunLoopRunSpecific + 467
18 CoreFoundation 0x01a468db CFRunLoopRunInMode + 123
19 UIKit 0x00590add -[UIApplication _run] + 840
20 UIKit 0x00592d3b UIApplicationMain + 1225
21 IFST 0x0000592d main + 141
22 libdyld.dylib 0x020df70d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
and SIGABRT.
Why did happened it?
Please tell me.
Your crash log gives you the answer:
2013-12-14 15:13:12.963 IFST[2448:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITabBarController topViewController]: unrecognized selector sent to instance 0x8a6c290'
Somewhere you're sending topViewController to the tab bar controller. It's not a navigation controller, so this method is not appropriate. Maybe selectedViewController is the one you're looking for.