Strange Modal View Controller NSException bug - ios

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.

Related

PayPal issues on different iPhone models

I use PayPal in my iOS app. When I run the app on the iPhone 4s it works perfectly, but when I run the app on the iPhone 5s or iPhone 6s the app crashes. This is the error:
2016-08-09 11:51:56.241 Signalyx[64835:356737] *** Terminating app due to uncaught exception 'NSRangeException', reason: '-[NSTaggedPointerString getCharacters:range:]: Range {0, 7} out of bounds; string length 4'
*** First throw call stack:
(
0 CoreFoundation 0x0000000109138f45 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000108756deb objc_exception_throw + 48
2 CoreFoundation 0x0000000109138e7d +[NSException raise:format:] + 205
3 CoreFoundation 0x000000010912468a -[NSTaggedPointerString getCharacters:range:] + 394
4 CoreFoundation 0x0000000109011eaa CFStringCompareWithOptionsAndLocale + 2970
5 CoreFoundation 0x0000000109124feb -[NSTaggedPointerString compare:options:range:locale:] + 219
6 Foundation 0x00000001082ecee3 -[NSString compare:options:range:] + 29
7 Signalyx 0x00000001054d328f __53-[PPZebraLocalizer localizeString:adaptedForCountry:]_block_invoke + 60
8 CoreFoundation 0x000000010906813b -[NSArray indexOfObject:inSortedRange:options:usingComparator:] + 491
9 Signalyx 0x00000001054d2fd4 -[PPZebraLocalizer localizeString:adaptedForCountry:] + 426
10 Signalyx 0x00000001054d3a44 PPZebraLocalizedStringWithAlert + 1044
11 Signalyx 0x00000001054c1da3 +[PPZebraUI localizedStringForKey:adaptedForCountry:] + 140
12 Signalyx 0x00000001054c2de1 +[PPZebraUI cancelBarButtonWithTarget:withAction:] + 88
13 Signalyx 0x00000001054b0c01 -[PPDeviceCheckViewController viewDidLoad] + 292
14 UIKit 0x0000000106d46cc4 -[UIViewController loadViewIfRequired] + 1198
15 UIKit 0x0000000106d47013 -[UIViewController view] + 27
16 UIKit 0x0000000106d991c5 -[UINavigationController preferredContentSize] + 194
17 UIKit 0x0000000106d1df26 -[UIPresentationController preferredContentSizeDidChangeForChildContentContainer:] + 59
18 UIKit 0x0000000106d1a2b4 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 95
19 UIKit 0x0000000106bc01ba _runAfterCACommitDeferredBlocks + 317
20 UIKit 0x0000000106bd3396 _cleanUpAfterCAFlushAndRunDeferredBlocks + 95
21 UIKit 0x0000000106bdf1c2 _afterCACommitHandler + 90
22 CoreFoundation 0x0000000109064947 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
23 CoreFoundation 0x00000001090648b7 __CFRunLoopDoObservers + 391
24 CoreFoundation 0x000000010905a50b __CFRunLoopRun + 1147
25 CoreFoundation 0x0000000109059e08 CFRunLoopRunSpecific + 488
26 GraphicsServices 0x000000010bf10ad2 GSEventRunModal + 161
27 UIKit 0x0000000106bb430d UIApplicationMain + 171
28 Signalyx 0x00000001053656af main + 111
29 libdyld.dylib 0x000000010970192d start + 1
30 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I hope there is card.io SDK installed in your app with PayPal. If you check files in your project you will get CardIO files. In that you are using old version of card.io SDK. This issue has been fixed in version 5.1.0.
Here is the issue
Fixed :
https://github.com/card-io/card.io-iOS-source/commit/b9b3c0a329b75d048a20190f8843da4f247d755a
The current version of card.io SDK is 5.3.2 and that you need to use. I hope this will resolve your issue.
For more info refer :
https://github.com/card-io/card.io-iOS-SDK

Bug detection terminal in Swift cites variable as issue - variable doesn't exist

The first view controller of my project crashed when segue'd to from another view controller - but not when it loads. I get this error message:
2016-01-05 20:06:33.836 collaboration[48812:1788623] -[collaboration.createAccountViewController loginExisting:]: unrecognized selector sent to instance 0x796cc950
2016-01-05 20:06:33.849 collaboration[48812:1788623] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[collaboration.createAccountViewController loginExisting:]: unrecognized selector sent to instance 0x796cc950'
*** First throw call stack:
(
0 CoreFoundation 0x00396a14 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x022c5e02 objc_exception_throw + 50
2 CoreFoundation 0x0039fd63 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x002dd6bd ___forwarding___ + 1037
4 CoreFoundation 0x002dd28e _CF_forwarding_prep_0 + 14
5 libobjc.A.dylib 0x022da0b5 -[NSObject performSelector:withObject:withObject:] + 84
6 UIKit 0x00df7b79 -[UIApplication sendAction:to:from:forEvent:] + 118
7 UIKit 0x00df7af8 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64
8 UIKit 0x00f978f8 -[UIControl sendAction:to:forEvent:] + 79
9 UIKit 0x00f97c78 -[UIControl _sendActionsForEvents:withEvent:] + 408
10 UIKit 0x00f96c7e -[UIControl touchesEnded:withEvent:] + 714
11 UIKit 0x00e74182 -[UIWindow _sendTouchesForEvent:] + 1095
12 UIKit 0x00e75220 -[UIWindow sendEvent:] + 1159
13 UIKit 0x00e19f93 -[UIApplication sendEvent:] + 266
14 UIKit 0x00def668 _UIApplicationHandleEventQueue + 7802
15 CoreFoundation 0x002b06ff __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
16 CoreFoundation 0x002a638b __CFRunLoopDoSources0 + 523
17 CoreFoundation 0x002a57a8 __CFRunLoopRun + 1032
18 CoreFoundation 0x002a50e6 CFRunLoopRunSpecific + 470
19 CoreFoundation 0x002a4efb CFRunLoopRunInMode + 123
20 GraphicsServices 0x07075664 GSEventRunModal + 192
21 GraphicsServices 0x070754a1 GSEventRun + 104
22 UIKit 0x00df5bfa UIApplicationMain + 160
23 collaboration 0x00085a3c main + 140
24 libdyld.dylib 0x039bca21 start + 1
25 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
As you can see, it cites the variable 'loginExisting' as the issue, however loginExisting is not a variable on in any of my scripts (it was before but has since been removes). How can I 'refresh' XCode so that it forgets about the absent variable? I have tried restarting my machine and cleaning XCode but have had not success.
Thank you for your help.
Go to your storyboard that's crashing and right click the yellow icon at the top of the ViewController.
After right clicking, look towards the bottom where it says "Received actions" and delete all of the actions pertaining to the loginExisting method.
This is one of many possible culprits, but this tends to be the most common.
EDIT: It's also possible that you have a property (IBOutlet) connected to the storyboard that no longer exists which will throw an error.

SDWebImage in iOS 7.1 crashes

So, i've just updated my xcode and started building my app for iOS 7.1. But now i find out that my SDWebImage is broken. Whenever i try to set an ImageWithUrl for a UIImageView my app crashes with the following exception and stacktrace:
2014-03-11 12:55:36.647 Wiggle[1983:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView setImageWithURL:placeholderImage:options:]: unrecognized selector sent to instance 0x10fa12890'
*** First throw call stack:
(
0 CoreFoundation 0x0000000103188795 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000102eeb991 objc_exception_throw + 43
2 CoreFoundation 0x0000000103219bad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x000000010317a09d ___forwarding___ + 973
4 CoreFoundation 0x0000000103179c48 _CF_forwarding_prep_0 + 120
5 Wiggle 0x000000010001fe94 -[MenuTableViewController tableView:viewForHeaderInSection:] + 1316
6 UIKit 0x000000010182cdb3 __84-[UITableView _sectionHeaderView:withFrame:forSection:floating:reuseViewIfPossible:]_block_invoke + 112
7 UIKit 0x00000001017b60ac +[UIView(Animation) performWithoutAnimation:] + 70
8 UIKit 0x000000010182ccc5 -[UITableView _sectionHeaderView:withFrame:forSection:floating:reuseViewIfPossible:] + 223
9 UIKit 0x00000001018149cf -[UITableView _updateVisibleHeadersAndFootersNow:] + 2596
10 UIKit 0x0000000101815b6f -[UITableView _updateVisibleCellsNow:] + 3122
11 UIKit 0x0000000101826381 -[UITableView layoutSubviews] + 207
12 UIKit 0x00000001017bdb27 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 354
13 QuartzCore 0x0000000100bb7a22 -[CALayer layoutSublayers] + 151
14 QuartzCore 0x0000000100bac589 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 363
15 QuartzCore 0x0000000100bac40a _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
16 QuartzCore 0x0000000100b21694 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 252
17 QuartzCore 0x0000000100b2270c _ZN2CA11Transaction6commitEv + 394
18 UIKit 0x0000000101779444 _afterCACommitHandler + 128
19 CoreFoundation 0x0000000103153ff7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
20 CoreFoundation 0x0000000103153f67 __CFRunLoopDoObservers + 391
21 CoreFoundation 0x00000001031336d2 __CFRunLoopRun + 946
22 CoreFoundation 0x0000000103132f33 CFRunLoopRunSpecific + 467
23 GraphicsServices 0x00000001036a53a0 GSEventRunModal + 161
24 UIKit 0x0000000101762043 UIApplicationMain + 1010
I'm not sure what to do, can anybody help?
Thanks to Amar I found the answer.
SDWebImage with Base SDK iOS 7.1 requires you to exclude arm64 in
Project > BuildSettings > Architectures> Valid Architectures.
You might also need to set Build Active Architectures Only to NO for it to work.
Obviously now that there are lots of 64 bit devices out there you don't want to do this anymore, you instead want to download the latests SDWeb library that is compatible with the new architecture.

iOS app crash when keyboard showing on iPad

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'

How to understand and fixed this error?

2011-04-20 18:38:41.347 RIE[1683:607] -[UICGColor _shouldContinuePlaybackInBackground]: unrecognized selector sent to instance 0x28db10
2011-04-20 18:38:41.417 RIE[1683:607] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UICGColor _shouldContinuePlaybackInBackground]: unrecognized selector sent to instance 0x28db10'
*** Call stack at first throw:
(
0 CoreFoundation 0x342ed64f __exceptionPreprocess + 114
1 libobjc.A.dylib 0x35570c5d objc_exception_throw + 24
2 CoreFoundation 0x342f11bf -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3 CoreFoundation 0x342f0649 ___forwarding___ + 508
4 CoreFoundation 0x34267180 _CF_forwarding_prep_0 + 48
5 MediaPlayer 0x344628b7 -[MPMoviePlayerViewController _moviePlayerViewController_applicationDidEnterBackgroundNotification:] + 42
6 Foundation 0x333b5183 _nsnote_callback + 142
7 CoreFoundation 0x342bc20f __CFXNotificationPost_old + 402
8 CoreFoundation 0x34256eeb _CFXNotificationPostNotification + 118
9 Foundation 0x333b25d3 -[NSNotificationCenter postNotificationName:object:userInfo:] + 70
10 UIKit 0x36364d01 -[UIApplication _handleApplicationSuspend:eventInfo:] + 500
11 UIKit 0x362feaf9 -[UIApplication handleEvent:withNewEvent:] + 1916
12 UIKit 0x362fe215 -[UIApplication sendEvent:] + 44
13 UIKit 0x362fdc53 _UIApplicationHandleEvent + 5090
14 GraphicsServices 0x33e58e77 PurpleEventCallback + 666
15 CoreFoundation 0x342c4a97 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
16 CoreFoundation 0x342c683f __CFRunLoopDoSource1 + 166
17 CoreFoundation 0x342c760d __CFRunLoopRun + 520
18 CoreFoundation 0x34257ec3 CFRunLoopRunSpecific + 230
19 CoreFoundation 0x34257dcb CFRunLoopRunInMode + 58
20 GraphicsServices 0x33e5841f GSEventRunModal + 114
21 GraphicsServices 0x33e584cb GSEventRun + 62
22 UIKit 0x36328d69 -[UIApplication _run] + 404
23 UIKit 0x36326807 UIApplicationMain + 670
24 Motor Show 0x0000219b main + 70
25 Motor Show 0x00002150 start + 40
)
terminate called after throwing an instance of 'NSException'
Program received signal: “SIGABRT”.
Hard to say given just the stack trace, but I would suggest the following:
Implement applicationWillResignActive: in your UIApplicationDelegate to ensure that video playback is paused or stopped before the application enters the background.
Create a custom UIApplication subclass to use in your app, and override the _handleApplicationSuspend:eventInfo: method so that it returns without propagating the event to other classes further down the chain.
Figure out how to unregister your MPMoviePlayerViewController component from the notification center so that it does not receive the 'ApplicationDidEnterBackgroundNotification'.

Resources