iOS app crash when keyboard showing on iPad - ios

I have an app which work perfectly on iPhone. But when i starting it on iPad and tap on UITextField it’s crash with error:
Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
*** First throw call stack:
(
0 CoreFoundation 0x032a05e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x02c1e8b6 objc_exception_throw + 44
2 CoreFoundation 0x032414e6 -[__NSArrayM objectAtIndex:] + 246
3 Parking 0x002b0ccd -[UIView(Hackery) pd_swizzled_exchangeSubviewAtIndex:withSubviewAtIndex:] + 141
4 UIKit 0x020a89ef -[_UIBackdropView ensureProperSubviewOrdering] + 666
5 UIKit 0x020a810e -[_UIBackdropView updateSubviewHierarchyIfNeededForSettings:] + 127
6 UIKit 0x020a47dc -[_UIBackdropView setComputesColorSettings:] + 235
7 UIKit 0x01b1c87a -[UIKBBackdropView triggerUpdate:] + 400
8 Foundation 0x028f1bf9 __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke + 40
9 CoreFoundation 0x032fc524 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
10 CoreFoundation 0x0325400b _CFXNotificationPost + 2859
11 Foundation 0x0282b951 -[NSNotificationCenter postNotificationName:object:userInfo:] + 98
12 UIKit 0x01e1cb1b -[UIInputViewTransition postNotificationsForTransitionEnd] + 1054
13 UIKit 0x0c69c453 -[UIInputViewTransitionAccessibility(SafeCategory) postNotificationsForTransitionEnd] + 51
14 UIKit 0x01e13138 __53-[UIPeripheralHost(UIKitInternal) executeTransition:]_block_invoke1332 + 455
15 UIKit 0x019ef005 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 306
16 UIKit 0x019d8c6c -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 267
17 UIKit 0x019d8f58 -[UIViewAnimationState animationDidStop:finished:] + 80
18 UIKit 0x0c6a4b67 -[UIViewAnimationStateAccessibility(SafeCategory) animationDidStop:finished:] + 66
19 QuartzCore 0x00821a44 _ZN2CA5Layer23run_animation_callbacksEPv + 304
20 libdispatch.dylib 0x0362b4b0 _dispatch_client_callout + 14
21 libdispatch.dylib 0x0361975e _dispatch_main_queue_callback_4CF + 340
22 CoreFoundation 0x03305a5e __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
23 CoreFoundation 0x032466bb __CFRunLoopRun + 1963
24 CoreFoundation 0x03245ac3 CFRunLoopRunSpecific + 467
25 CoreFoundation 0x032458db CFRunLoopRunInMode + 123
26 GraphicsServices 0x03f7d9e2 GSEventRunModal + 192
27 GraphicsServices 0x03f7d809 GSEventRun + 104
28 UIKit 0x0198cd3b UIApplicationMain + 1225
29 Parking 0x00073cad main + 141
30 libdyld.dylib 0x038bd70d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I tried comment all my code to find a reason. Even created an empty view controller and add text field to it. But it’s didn't helped. Any idea?

It is an issue with PonyDebugger which has been fixed in the latest release. Use a version >= 0.3.1.
pod 'PonyDebugger', '~> 0.3.1'

Related

iOS Contacts Picker

So i was doing a tutorial from Sinch! on how to Fetch and Call Contacts,
Well it loads up the Contacts just fine.
The problem is that whenever I select a Contact to call, the app crashes and Xcode shows this error on the console.
Can anyone help me with that?
inchAppToPhoneTutorial[1143:42160] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Parameter 'applicationKey' is invalid (was '')'
*** First throw call stack:
(
0 CoreFoundation 0x000000010a70634b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010a08821e objc_exception_throw + 48
2 SinchAppToPhoneTutorial 0x0000000108cca77b SINCallOrderByStartTimeComparator + 66724
3 SinchAppToPhoneTutorial 0x0000000108cb1c6b _ZN6rebrtc13OfflineInvite6encodeERKS0_PhmPm + 4418449
4 SinchAppToPhoneTutorial 0x0000000108cc4d45 SINCallOrderByStartTimeComparator + 43630
5 SinchAppToPhoneTutorial 0x0000000108cc496c SINCallOrderByStartTimeComparator + 42645
6 SinchAppToPhoneTutorial 0x00000001088268e9 -[DetailViewController initSinchClient] + 89
7 SinchAppToPhoneTutorial 0x0000000108825e8a -[DetailViewController viewDidLoad] + 234
8 UIKit 0x000000010accb06d -[UIViewController loadViewIfRequired] + 1258
9 UIKit 0x000000010acd14d6 -[UIViewController __viewWillAppear:] + 118
10 UIKit 0x000000010acfc393 -[UINavigationController _startCustomTransition:] + 1290
11 UIKit 0x000000010ad0d008 -[UINavigationController _startDeferredTransitionIfNeeded:] + 697
12 UIKit 0x000000010ad0e19b -[UINavigationController __viewWillLayoutSubviews] + 58
13 UIKit 0x000000010af051b7 -[UILayoutContainerView layoutSubviews] + 223
14 UIKit 0x000000010abee344 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1237
15 QuartzCore 0x000000010e03bcdc -[CALayer layoutSublayers] + 146
16 QuartzCore 0x000000010e02f7a0 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
17 QuartzCore 0x000000010e02f61e _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
18 QuartzCore 0x000000010dfbd62c _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 280
19 QuartzCore 0x000000010dfea713 _ZN2CA11Transaction6commitEv + 475
20 UIKit 0x000000010ab54878 _afterCACommitHandler + 346
21 CoreFoundation 0x000000010a6aae17 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
22 CoreFoundation 0x000000010a6aad87 __CFRunLoopDoObservers + 391
23 CoreFoundation 0x000000010a68fb9e __CFRunLoopRun + 1198
24 CoreFoundation 0x000000010a68f494 CFRunLoopRunSpecific + 420
25 GraphicsServices 0x000000010e959a6f GSEventRunModal + 161
26 UIKit 0x000000010ab29f34 UIApplicationMain + 159
27 SinchAppToPhoneTutorial 0x00000001088257bf main + 111
28 libdyld.dylib 0x000000010c4fe68d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
It says what happened at the very top
inchAppToPhoneTutorial[1143:42160] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Parameter 'applicationKey' is invalid (was '')'
So figure out where you're calling something that utilizes an applicationKey and figure out why it's blank :)

app works on iphone 6plus simulator but not in iphone6 simulator

I'm developing an app that uses SQLITE and works perfectly on Iphone 6plus simulator but crash on Iphone6 simulator and also on Iphone5. I'm not sure what's the problem. Can anyone help me with that?
This is the debug error that I'm getting from Xcode
*** Terminating app due to uncaught exception 'NSRangeException', reason:
*** -[__NSArrayM objectAtIndex:]: index 9223372036854775807 beyond bounds [0 .. 10]'
*** First throw call stack:
(
0 CoreFoundation 0x000000010492ae65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001043a3deb objc_exception_throw + 48
2 CoreFoundation 0x000000010480e404 -[__NSArrayM objectAtIndex:] + 212
3 ILFCalc 0x0000000103d85cf8 -[EditInfoViewController loadInfoToEdit] + 424
4 ILFCalc 0x0000000103d83f76 -[EditInfoViewController viewDidLoad] + 1174
5 UIKit 0x0000000104e6df98 -[UIViewController loadViewIfRequired] + 1198
6 UIKit 0x0000000104e73f4f -[UIViewController __viewWillAppear:] + 120
7 UIKit 0x0000000104ea3e44 -[UINavigationController _startCustomTransition:] + 1203
8 UIKit 0x0000000104eb423f -[UINavigationController _startDeferredTransitionIfNeeded:] + 712
9 UIKit 0x0000000104eb53af -[UINavigationController __viewWillLayoutSubviews] + 57
10 UIKit 0x000000010505bff7 -[UILayoutContainerView layoutSubviews] + 248
11 UIKit 0x0000000104d8e4a3 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 703
12 QuartzCore 0x000000010874559a -[CALayer layoutSublayers] + 146
13 QuartzCore 0x0000000108739e70 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
14 QuartzCore 0x0000000108739cee _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
15 QuartzCore 0x000000010872e475 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
16 QuartzCore 0x000000010875bc0a _ZN2CA11Transaction6commitEv + 486
17 QuartzCore 0x000000010875c37c _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
18 CoreFoundation 0x0000000104856367 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
19 CoreFoundation 0x00000001048562d7 __CFRunLoopDoObservers + 391
20 CoreFoundation 0x000000010484bf2b __CFRunLoopRun + 1147
21 CoreFoundation 0x000000010484b828 CFRunLoopRunSpecific + 488
22 GraphicsServices 0x0000000107fd2ad2 GSEventRunModal + 161
23 UIKit 0x0000000104cd7610 UIApplicationMain + 171
24 ILFCalc 0x0000000103d898af main + 111
25 libdyld.dylib 0x000000010631a92d start + 1
26 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

"__NSCFString navigationBar" : unrecognized selector sent to instance

Alright Everyone,
I've got a real tough nut to crack. I am getting a very strange crash in my iOS app. During the sequence of closing a UIPopoverController by clicking off of it (on an iPad), this crash is occurring.
The really odd thing here is that it is a crash coming out of UIKit. I have filed a radar report for a very similar issue, but Apple marked it as closed and when asked, did not provide any further information than to say it was a duplicate of another issue (which I can not see).
Has anyone seen anything like this before?
EDIT 1: I can't figure out how to make the below a code block, the code block markup tool didn't do it. If anyone could point that out, that would be great :).
Thanks,
~Arash
-[__NSCFString navigationBar]: unrecognized selector sent to instance 0x7be4f510
2015-06-22 11:12:57.375 SpotlightEnterprise[82694:1472906] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString navigationBar]: unrecognized selector sent to instance 0x7be4f510'
*** First throw call stack:
(
0 CoreFoundation 0x0522f746 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x04e10a97 objc_exception_throw + 44
2 CoreFoundation 0x05237705 -[NSObject(NSObject) doesNotRecognizeSelector:] + 277
3 CoreFoundation 0x0517e287 ___forwarding___ + 1047
4 CoreFoundation 0x0517de4e _CF_forwarding_prep_0 + 14
5 UIKit 0x03506810 -[UINavigationItemView _updateLabelColor] + 45
6 UIKit 0x03507df3 -[UINavigationItemButtonView tintColorDidChange] + 86
7 UIKit 0x0377d28b -[_UITintColorVisitor _visitView:] + 363
8 UIKit 0x0377dab1 _UIViewVisitorEntertainVisitors + 98
9 UIKit 0x0377cb09 _UIViewVisitorRecursivelyEntertainDescendingVisitors + 166
10 UIKit 0x0377c859 +[_UIViewVisitor _startTraversalOfVisitor:withView:] + 377
11 UIKit 0x03484df1 -[UIView _receiveVisitor:] + 51
12 UIKit 0x0348a4dd -[UIView _dispatchTintColorVisitorWithReasons:] + 143
13 UIKit 0x0348a922 -[UIView setTintAdjustmentMode:] + 116
14 UIKit 0x03551433 -[UIPresentationController _enableOcclusion:] + 423
15 UIKit 0x035515d0 __55-[UIPresentationController _beginOcclusionIfNecessary:]_block_invoke + 44
16 UIKit 0x03c8208b -[_UIViewControllerTransitionCoordinator _applyBlocks:releaseBlocks:] + 198
17 UIKit 0x03c7e9b9 -[_UIViewControllerTransitionContext __runAlongsideAnimations] + 168
18 UIKit 0x03550f49 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke392 + 67
19 UIKit 0x03481b3e -[UIViewAnimationState _runAlongsideAnimations] + 37
20 UIKit 0x03481182 -[UIViewAnimationState pop] + 36
21 UIKit 0x0347ff6e +[UIViewAnimationState popAnimationState] + 47
22 UIKit 0x0349ec6e +[UIView(UIViewAnimationWithBlocks) _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 518
23 UIKit 0x0349f017 +[UIView(UIViewAnimationWithBlocks) animateWithDuration:delay:options:animations:completion:] + 110
24 UIKit 0x03813b71 -[_UIPopoverAnimationController animateTransition:] + 384
25 UIKit 0x03550a8c __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 2315
26 UIKit 0x0358531b __40+[UIViewController _scheduleTransition:]_block_invoke + 18
27 UIKit 0x0343e862 ___afterCACommitHandler_block_invoke + 15
28 UIKit 0x0343e80d _applyBlockToCFArrayCopiedToStack + 415
29 UIKit 0x0343e622 _afterCACommitHandler + 549
30 CoreFoundation 0x0515086e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
31 CoreFoundation 0x051507b0 __CFRunLoopDoObservers + 400
32 CoreFoundation 0x051461ea __CFRunLoopRun + 1226
33 CoreFoundation 0x05145a5b CFRunLoopRunSpecific + 443
34 CoreFoundation 0x0514588b CFRunLoopRunInMode + 123
35 GraphicsServices 0x05c1a2c9 GSEventRunModal + 192
36 GraphicsServices 0x05c1a106 GSEventRun + 104
37 UIKit 0x03414106 UIApplicationMain + 1526
38 MyAppName 0x000c841d main + 77
39 libdyld.dylib 0x057d5ac9 start + 1</code>

Objective C++, SIGABRT signal

Im doing an iOS app(actually just copying code) from this tutorial http://hubpages.com/hub/Tutorial-on-Creating-an-IOS-5-SQLite-Database-Application-IOS-5-SQLite
and I can't run my app. Build succeds and then I get signal SIGABRT in my XCode.
2014-08-28 09:04:40.105 Whine2[526:60b] Problem with prepare statement
2014-08-28 09:04:40.109 Whine2[526:60b] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(
0 CoreFoundation 0x018d81e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x016578e5 objc_exception_throw + 44
2 CoreFoundation 0x018793f6 -[__NSArrayM objectAtIndex:] + 246
3 Whine2 0x000029bd -[kcbViewController viewDidLoad] + 269
4 UIKit 0x0043633d -[UIViewController loadViewIfRequired] + 696
5 UIKit 0x004365d9 -[UIViewController view] + 35
6 UIKit 0x00356267 -[UIWindow addRootViewControllerViewIfPossible] + 66
7 UIKit 0x003565ef -[UIWindow _setHidden:forced:] + 312
8 UIKit 0x0035686b -[UIWindow _orderFrontWithoutMakingKey] + 49
9 UIKit 0x003613c8 -[UIWindow makeKeyAndVisible] + 65
10 UIKit 0x00311bc0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 2097
11 UIKit 0x00316667 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
12 UIKit 0x0032af92 -[UIApplication handleEvent:withNewEvent:] + 3517
13 UIKit 0x0032b555 -[UIApplication sendEvent:] + 85
14 UIKit 0x00318250 _UIApplicationHandleEvent + 683
15 GraphicsServices 0x038cdf02 _PurpleEventCallback + 776
16 GraphicsServices 0x038cda0d PurpleEventCallback + 46
17 CoreFoundation 0x01853ca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
18 CoreFoundation 0x018539db __CFRunLoopDoSource1 + 523
19 CoreFoundation 0x0187e68c __CFRunLoopRun + 2156
20 CoreFoundation 0x0187d9d3 CFRunLoopRunSpecific + 467
21 CoreFoundation 0x0187d7eb CFRunLoopRunInMode + 123
22 UIKit 0x00315d9c -[UIApplication _run] + 840
23 UIKit 0x00317f9b UIApplicationMain + 1225
24 Whine2 0x0000282d main + 141
25 libdyld.dylib 0x01e21701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
I understand there is some problem with array, right?
As your error message and code in the link says, there is one array named wines in viewDidLoad of kcbViewController and it is empty. aJust log the array wines before accessing it . If you need to check whether an array is empty, you can check if self.wines.count is 0.

Strange Modal View Controller NSException bug

Can anyone help me make sense of the crash log below? It came from Apple after inquiring further about a crash my app had. They rejected the app because of this crash, but I have never once been able to make it occur on my end or with 10+ beta testers. So basically, it is only occurring for them for some reason. It looks like it has to do with presenting a view, but that's weird because, like I said, this view is coming up perfectly fine.
Mar 11 14:46:09 unknown StageBloc[2309] <Error>: *** Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '-[AccountOverviewViewController popupViewController]: unrecognized selector sent to instance 0x2c7820'
*** Call stack at first throw:
(
0 CoreFoundation 0x3291964f __exceptionPreprocess + 114
1 libobjc.A.dylib 0x36b5cc5d objc_exception_throw + 24
2 CoreFoundation 0x3291d1bf -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3 CoreFoundation 0x3291c649 ___forwarding___ + 508
4 CoreFoundation 0x32893180 _CF_forwarding_prep_0 + 48
5 AppName 0x0004b56d -[TTBaseViewController shouldAutorotateToInterfaceOrientation:] + 36
6 UIKit 0x35b0dead -[UIViewController _isSupportedInterfaceOrientation:] + 48
7 UIKit 0x35b76e51 -[UIViewController _preferredInterfaceOrientationGivenCurrentOrientation:] + 68
8 UIKit 0x35b75f07 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 794
9 UIKit 0x35b756f7 -[UIViewController presentModalViewController:withTransition:] + 2378
10 UIKit 0x35b74cd7 -[UIViewController presentModalViewController:animated:] + 58
11 StageBloc 0x00009bb1 -[StageBlocViewController loginSuccessful] + 196
12 StageBloc 0x00004c21 -[StageBlocAppDelegate successfulAttempt:] + 288
13 CoreFoundation 0x32886f03 -[NSObject(NSObject) performSelector:withObject:] + 22
14 AppName 0x0002aa75 -[ASIHTTPRequest reportFinished] + 60
15 CoreFoundation 0x32886f03 -[NSObject(NSObject) performSelector:withObject:] + 22
16 Foundation 0x325707a9 __NSThreadPerformPerform + 268
17 CoreFoundation 0x328f0a79 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
18 CoreFoundation 0x328f275f __CFRunLoopDoSources0 + 382
19 CoreFoundation 0x328f34eb __CFRunLoopRun + 230
20 CoreFoundation 0x32883ec3 CFRunLoopRunSpecific + 230
21 CoreFoundation 0x32883dcb CFRunLoopRunInMode + 58
22 GraphicsServices 0x30b2b41f GSEventRunModal + 114
23 GraphicsServices 0x30b2b4cb GSEventRun + 62
24 UIKit 0x35af9d69 -[UIApplication _run] + 404
25 UIKit 0x35af7807 UIApplicationMain + 670
26 AppName 0x00002ae1 main + 48
27 AppName 0x00002aac start + 40
)
This had to do with forgetting to add some required built variables to my project that the Three20 libraries use. I didn't notice it because you can't run App Store release builds locally.

Resources