My app keeps crashing whenever I tap on a UITextField that I add to my view programmatically. Here is the stack trace if it is of any help:
'NSInvalidArgumentException', reason: '-[Clifford_Bradford.OtherVehiclesViewController numOfOtherVehiclesUpdated:]: unrecognized selector sent to instance 0x7fd92a57f8d0'
*** First throw call stack:
(
0 CoreFoundation 0x0000000107e5dc65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001099c8bb7 objc_exception_throw + 45
2 CoreFoundation 0x0000000107e650ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x0000000107dbb13c ___forwarding___ + 988
4 CoreFoundation 0x0000000107dbacd8 _CF_forwarding_prep_0 + 120
5 UIKit 0x00000001086fdd62 -[UIApplication sendAction:to:from:forEvent:] + 75
6 UIKit 0x000000010880f50a -[UIControl _sendActionsForEvents:withEvent:] + 467
7 UIKit 0x0000000108e26d39 -[UITextField _resignFirstResponder] + 256
8 UIKit 0x0000000108e26bab -[UITextField _finishResignFirstResponder] + 45
9 UIKit 0x000000010888078b -[UIResponder resignFirstResponder] + 114
10 UIKit 0x0000000108e26b04 -[UITextField resignFirstResponder] + 114
11 UIKit 0x0000000108880575 -[UIResponder becomeFirstResponder] + 284
12 UIKit 0x000000010876fb81 -[UIView(Hierarchy) becomeFirstResponder] + 99
13 UIKit 0x0000000108e26307 -[UITextField becomeFirstResponder] + 51
14 UIKit 0x0000000108ab5d4e -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) setFirstResponderIfNecessary] + 177
15 UIKit 0x0000000108ab7dc0 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) oneFingerTap:] + 2263
16 UIKit 0x0000000108aad656 _UIGestureRecognizerSendActions + 262
17 UIKit 0x0000000108aac2f9 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 532
18 UIKit 0x0000000108ab0f16 ___UIGestureRecognizerUpdate_block_invoke662 + 51
19 UIKit 0x0000000108ab0e12 _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 254
20 UIKit 0x0000000108aa6e8d _UIGestureRecognizerUpdate + 2796
21 UIKit 0x000000010874a646 -[UIWindow _sendGesturesForEvent:] + 1041
22 UIKit 0x000000010874b272 -[UIWindow sendEvent:] + 666
23 UIKit 0x0000000108711541 -[UIApplication sendEvent:] + 246
24 UIKit 0x000000010871ecdc _UIApplicationHandleEventFromQueueEvent + 18265
25 UIKit 0x00000001086f959c _UIApplicationHandleEventQueue + 2066
26 CoreFoundation 0x0000000107d91431 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
27 CoreFoundation 0x0000000107d872fd __CFRunLoopDoSources0 + 269
28 CoreFoundation 0x0000000107d86934 __CFRunLoopRun + 868
29 CoreFoundation 0x0000000107d86366 CFRunLoopRunSpecific + 470
30 GraphicsServices 0x000000010be31a3e GSEventRunModal + 161
31 UIKit 0x00000001086fc8c0 UIApplicationMain + 1282
32 Clifford Bradford 0x0000000107c33bb7 main + 135
33 libdyld.dylib 0x000000010a0fe145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException`.
It just points me to the first line of the AppDelegate.swift which doesn't really help me. Here is the corresponding code that adds the textField to the view. I would like to add that the contView is inside a scrollView.
var otherVehiclePlateNum:UITextField = UITextField(frame: CGRectMake(carLabel.bounds.origin.x + 15, carLabel.frame.maxY + 10, self.contView.frame.width - 30, 25))
otherVehiclePlateNum.placeholder = "TEST"
self.contView.addSubview(otherVehiclePlateNum)
Thanks so much for your help, I've been stuck on this.
Look at the first line: Does the method numOfOtherVehiclesUpdated: actually exist in the OtherVehiclesViewController class? Make sure that that if you're calling any #selectors that the colon matches the signature (i.e., you may have a numOfOtherVehiclesUpdated method, which isn't the same as numOfOtherVehiclesUpdated: which takes a parameter).
Look there first - you may be calling that by accident
Related
In my application I had a button and from there I opened a TableViewController and it worked perfectly fine.
And now I added another button and I linked the button to another TableViewController
Now when I am clicking this new button my application is crashing:
libc++abi.dylib: terminating with uncaught exception of type NSException
In other places in StackOverflow they mentioned about an unclosed IBOutlet but I have not created any outlet for the button itself, so what problem could that be.
Log :
*** First throw call stack:
(
0 CoreFoundation 0x000000010712f34b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010677321e objc_exception_throw + 48
2 CoreFoundation 0x0000000107198265 +[NSException raise:format:] + 197
3 UIKit 0x000000010797383c -[UITableViewController loadView] + 638
4 UIKit 0x00000001076f3c4c -[UIViewController loadViewIfRequired] + 201
5 UIKit 0x00000001076f44a0 -[UIViewController view] + 27
6 UIKit 0x0000000107fb88d0 -[_UIFullscreenPresentationController _setPresentedViewController:] + 87
7 UIKit 0x00000001076ced26 -[UIPresentationController initWithPresentedViewController:presentingViewController:] + 141
8 UIKit 0x000000010770730b -[UIViewController _presentViewController:withAnimationController:completion:] + 3956
9 UIKit 0x000000010770a6df -[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 530
10 UIKit 0x000000010770a1c5 -[UIViewController presentViewController:animated:completion:] + 179
11 UIKit 0x000000010770f892 -[UIViewController _showViewController:withAction:sender:] + 274
12 UIKit 0x0000000107bd41b6 __66-[UIStoryboardShowSegueTemplate newDefaultPerformHandlerForSegue:]_block_invoke + 134
13 UIKit 0x0000000107d2d40d -[UIStoryboardSegueTemplate _performWithDestinationViewController:sender:] + 447
14 UIKit 0x0000000107d2d21d -[UIStoryboardSegueTemplate _perform:] + 82
15 UIKit 0x0000000107d2d4df -[UIStoryboardSegueTemplate perform:] + 156
16 UIKit 0x0000000107554b88 -[UIApplication sendAction:to:from:forEvent:] + 83
17 UIKit 0x00000001076da2b2 -[UIControl sendAction:to:forEvent:] + 67
18 UIKit 0x00000001076da5cb -[UIControl _sendActionsForEvents:withEvent:] + 444
19 UIKit 0x00000001076d94c7 -[UIControl touchesEnded:withEvent:] + 668
20 UIKit 0x00000001075c20d5 -[UIWindow _sendTouchesForEvent:] + 2747
21 UIKit 0x00000001075c37c3 -[UIWindow sendEvent:] + 4011
22 UIKit 0x0000000107570a33 -[UIApplication sendEvent:] + 371
23 UIKit 0x0000000107d62b6d __dispatchPreprocessedEventFromEventQueue + 3248
24 UIKit 0x0000000107d5b817 __handleEventQueue + 4879
25 CoreFoundation 0x00000001070d4311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
26 CoreFoundation 0x00000001070b959c __CFRunLoopDoSources0 + 556
27 CoreFoundation 0x00000001070b8a86 __CFRunLoopRun + 918
28 CoreFoundation 0x00000001070b8494 CFRunLoopRunSpecific + 420
29 GraphicsServices 0x0000000109ebaa6f GSEventRunModal + 161
30 UIKit 0x0000000107552f34 UIApplicationMain + 159
31 OneTest 0x0000000105bfbc3f main + 111
32 libdyld.dylib 0x0000000108eef68d start + 1
)
This is what I did, I removed that new TableViewcontroller. Then I added a new ViewController and linked this ViewController to my Button by making a Segue. To the same button and it worked by opening the new ViewController. Then as soon as I linked the new View controller to my class it stopped working. Any possible reason for that?
So, I'm having problems with my code.
It runs smoothly with iOS8 but when I run iOS7.1 simulator or run it through an iOS7.1 phone, I get this error.
*** First throw call stack:
(
0 CoreFoundation 0x004dd1e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x01afc8e5 objc_exception_throw + 44
2 CoreFoundation 0x0057a243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x004cd50b ___forwarding___ + 1019
4 CoreFoundation 0x004cd0ee _CF_forwarding_prep_0 + 14
5 testapp 0x00062e29 _TFC4hp2m14ViewController11viewDidLoadfS0_FT_T_ + 633
6 testapp 0x00063392 _TToFC4hp2m14ViewController11viewDidLoadfS0_FT_T_ + 34
7 UIKit 0x00d0133d -[UIViewController loadViewIfRequired] + 696
8 UIKit 0x00d015d9 -[UIViewController view] + 35
9 UIKit 0x00c21267 -[UIWindow addRootViewControllerViewIfPossible] + 66
10 UIKit 0x00c215ef -[UIWindow _setHidden:forced:] + 312
11 UIKit 0x00c2186b -[UIWindow _orderFrontWithoutMakingKey] + 49
12 UIKit 0x00c2c3c8 -[UIWindow makeKeyAndVisible] + 65
13 UIKit 0x00bdcbc0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 2097
14 UIKit 0x00be1667 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
15 UIKit 0x00bf5f92 -[UIApplication handleEvent:withNewEvent:] + 3517
16 UIKit 0x00bf6555 -[UIApplication sendEvent:] + 85
17 UIKit 0x00be3250 _UIApplicationHandleEvent + 683
18 GraphicsServices 0x037c2f02 _PurpleEventCallback + 776
19 GraphicsServices 0x037c2a0d PurpleEventCallback + 46
20 CoreFoundation 0x00458ca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
21 CoreFoundation 0x004589db __CFRunLoopDoSource1 + 523
22 CoreFoundation 0x0048368c __CFRunLoopRun + 2156
23 CoreFoundation 0x004829d3 CFRunLoopRunSpecific + 467
24 CoreFoundation 0x004827eb CFRunLoopRunInMode + 123
25 UIKit 0x00be0d9c -[UIApplication _run] + 840
26 UIKit 0x00be2f9b UIApplicationMain + 1225
27 testapp 0x0006cd9e top_level_code + 78
28 testapp 0x0006cddb main + 43
29 libdyld.dylib 0x023db6d9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
The error occurs at the first line of appdelegate:
#UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
My app imports corelocation, foundation and contactlist.
Check all the methods called in your ViewController (viewDidLoad method) you probably have a selector only available on iOS8.
To check the availability you can just right click on the method and check the documentation.
Here is an example for the showViewController:sender: method.
when i run my app, i received this error :
2014-08-11 10:52:10.546 ControlViewTest[918:60b] -[UIViewController collectionView:numberOfItemsInSection:]: unrecognized selector sent to instance 0x8c862f0
2014-08-11 10:52:10.605 ControlViewTest[918:60b] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController collectionView:numberOfItemsInSection:]: unrecognized selector sent to instance 0x8c862f0'
* First throw call stack:
(
0 CoreFoundation 0x017ec1e4 exceptionPreprocess + 180
1 libobjc.A.dylib 0x0156b8e5 objc_exception_throw + 44
2 CoreFoundation 0x01889243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x017dc50b ___forwarding_ + 1019
4 CoreFoundation 0x017dc0ee _CF_forwarding_prep_0 + 14
5 UIKit 0x008b0c34 -[UICollectionViewData _updateItemCounts] + 331
6 UIKit 0x008b0ce1 -[UICollectionViewData _validateItemCounts] + 45
7 UIKit 0x008b2c64 -[UICollectionViewData numberOfSections] + 35
8 UIKit 0x0087d6ed -[UICollectionView numberOfSections] + 62
9 UIKit 0x0089d614 -[UICollectionViewFlowLayout(Internal) _getSizingInfos] + 205
10 UIKit 0x0089e48f -[UICollectionViewFlowLayout(Internal) _fetchItemsInfo] + 521
11 UIKit 0x00899fe2 -[UICollectionViewFlowLayout prepareLayout] + 157
12 UIKit 0x008b0d9d -[UICollectionViewData _prepareToLoadData] + 76
13 UIKit 0x008b15c5 -[UICollectionViewData validateLayoutInRect:] + 56
14 UIKit 0x00877603 -[UICollectionView layoutSubviews] + 173
15 UIKit 0x0029a964 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
16 libobjc.A.dylib 0x0157d82b -[NSObject performSelector:withObject:] + 70
17 QuartzCore 0x03c5745a -[CALayer layoutSublayers] + 148
18 QuartzCore 0x03c4b244 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
19 QuartzCore 0x03c573a5 -[CALayer layoutIfNeeded] + 160
20 UIKit 0x0035cae3 -[UIViewController window:setupWithInterfaceOrientation:] + 304
21 UIKit 0x00272aa7 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 5212
22 UIKit 0x00271646 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 82
23 UIKit 0x00271518 -[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 117
24 UIKit 0x002715a0 -[UIWindow _setRotatableViewOrientation:duration:force:] + 67
25 UIKit 0x0027063a 57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke + 120
26 UIKit 0x0027059c -[UIWindow _updateToInterfaceOrientation:duration:force:] + 400
27 UIKit 0x002712f3 -[UIWindow setAutorotates:forceUpdateInterfaceOrientation:] + 870
28 UIKit 0x002748e6 -[UIWindow setDelegate:] + 449
29 UIKit 0x0034eb77 -[UIViewController _tryBecomeRootViewControllerInWindow:] + 180
30 UIKit 0x0026a474 -[UIWindow addRootViewControllerViewIfPossible] + 591
31 UIKit 0x0026a5ef -[UIWindow _setHidden:forced:] + 312
32 UIKit 0x0026a86b -[UIWindow _orderFrontWithoutMakingKey] + 49
33 UIKit 0x002753c8 -[UIWindow makeKeyAndVisible] + 65
34 UIKit 0x00225bc0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 2097
35 UIKit 0x0022a667 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
36 UIKit 0x0023ef92 -[UIApplication handleEvent:withNewEvent:] + 3517
37 UIKit 0x0023f555 -[UIApplication sendEvent:] + 85
38 UIKit 0x0022c250 _UIApplicationHandleEvent + 683
39 GraphicsServices 0x037e1f02 _PurpleEventCallback + 776
40 GraphicsServices 0x037e1a0d PurpleEventCallback + 46
41 CoreFoundation 0x01767ca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 53
42 CoreFoundation 0x017679db __CFRunLoopDoSource1 + 523
43 CoreFoundation 0x0179268c __CFRunLoopRun + 2156
44 CoreFoundation 0x017919d3 CFRunLoopRunSpecific + 467
45 CoreFoundation 0x017917eb CFRunLoopRunInMode + 123
46 UIKit 0x00229d9c -[UIApplication _run] + 840
47 UIKit 0x0022bf9b UIApplicationMain + 1225
48 ControlViewTest 0x0000264d main + 141
49 libdyld.dylib 0x01e33701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
somebody can help me pls
Your UICollectionView has a data source set which does not implement the required method collectionView:numberOfItemsInSection:. You need to assign your UICollectionView a valid data source: a class that you've written and that implements collectionView:numberOfItemsInSection:.
This question already has an answer here:
Loaded the nib but didn't get a UITableView Exception
(1 answer)
Closed 8 years ago.
Today I ran my code that hasn't had any errors until now. Whenever someone clicks on the middle tab at the bottom the app crashes completely but all the other tabs work fine. Here's the call stack:
2014-07-01 16:27:19.848 Test Web[66180:60b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "lwz-qR-aDm-view-tp0-bK-7dP" nib but didn't get a UITableView.'
*** First throw call stack:
(
0 CoreFoundation 0x017f11e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x015708e5 objc_exception_throw + 44
2 CoreFoundation 0x017f0fbb +[NSException raise:format:] + 139
3 UIKit 0x0050418e -[UITableViewController loadView] + 281
4 UIKit 0x0034f0d3 -[UIViewController loadViewIfRequired] + 78
5 UIKit 0x0034f5d9 -[UIViewController view] + 35
6 UIKit 0x0038711f -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] + 407
7 UIKit 0x00386943 -[UITabBarController transitionFromViewController:toViewController:] + 63
8 UIKit 0x00382bed -[UITabBarController _setSelectedViewController:] + 281
9 UIKit 0x00382acc -[UITabBarController setSelectedViewController:] + 180
10 UIKit 0x0038683f -[UITabBarController _tabBarItemClicked:] + 312
11 libobjc.A.dylib 0x01582880 -[NSObject performSelector:withObject:withObject:] + 77
12 UIKit 0x002323b9 -[UIApplication sendAction:to:from:forEvent:] + 108
13 UIKit 0x00232345 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
14 UIKit 0x004f6629 -[UITabBar _sendAction:withEvent:] + 479
15 libobjc.A.dylib 0x0158282b -[NSObject performSelector:withObject:] + 70
16 UIKit 0x002323b9 -[UIApplication sendAction:to:from:forEvent:] + 108
17 UIKit 0x00232345 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
18 UIKit 0x00333bd1 -[UIControl sendAction:to:forEvent:] + 66
19 UIKit 0x00333fc6 -[UIControl _sendActionsForEvents:withEvent:] + 577
20 UIKit 0x00333c06 -[UIControl sendActionsForControlEvents:] + 48
21 UIKit 0x004fb23d -[UITabBar(Static) _buttonUp:] + 123
22 libobjc.A.dylib 0x01582880 -[NSObject performSelector:withObject:withObject:] + 77
23 UIKit 0x002323b9 -[UIApplication sendAction:to:from:forEvent:] + 108
24 UIKit 0x00232345 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
25 UIKit 0x00333bd1 -[UIControl sendAction:to:forEvent:] + 66
26 UIKit 0x00333fc6 -[UIControl _sendActionsForEvents:withEvent:] + 577
27 UIKit 0x00333243 -[UIControl touchesEnded:withEvent:] + 641
28 UIKit 0x00271ddd -[UIWindow _sendTouchesForEvent:] + 852
29 UIKit 0x002729d1 -[UIWindow sendEvent:] + 1117
30 UIKit 0x002445f2 -[UIApplication sendEvent:] + 242
31 UIKit 0x0022e353 _UIApplicationHandleEventQueue + 11455
32 CoreFoundation 0x0177a77f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
33 CoreFoundation 0x0177a10b __CFRunLoopDoSources0 + 235
34 CoreFoundation 0x017971ae __CFRunLoopRun + 910
35 CoreFoundation 0x017969d3 CFRunLoopRunSpecific + 467
36 CoreFoundation 0x017967eb CFRunLoopRunInMode + 123
37 GraphicsServices 0x037e55ee GSEventRunModal + 192
38 GraphicsServices 0x037e542b GSEventRun + 104
39 UIKit 0x00230f9b UIApplicationMain + 1225
40 Test Web 0x000031fd main + 141
41 libdyld.dylib 0x01e38701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I've tried looking for a solution to this error and checking back over the storyboard but found nothing out of place. Any ideas on a fix?
UITableViewController needs an UITableView connected to it's view property.
Also make sure that the delegate and datasource are properly connected.
If you use xib, make sure that UITableView connected to fileOwner.tableView property.
You probably use xib file to make interface.
We have a failry complex mobile application that uses a static table view for input. With the update to ios 7.1 we are now getting a crash after a user goes through a few text fields without entering information, then enters something and moves to the next text field. The crash is
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: ' setObjectForKey: object cannot be nil (key: NSShadow)'
with this stack trace:
* First throw call stack: (
0 CoreFoundation 0x000000010342b495 exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010318a99e objc_exception_throw + 43
2 CoreFoundation 0x00000001034aa544 -[NSDictionaryM setObject:forKey:] + 916
3 UIKit 0x0000000101eb877c -[UILabel setShadow:] + 339
4 UIKit 0x0000000101eb88b5 -[UILabel setShadowColor:] + 100
5 CoreFoundation 0x0000000103420f1c invoking + 140
6 CoreFoundation 0x00000001034b0e84 -[NSInvocation invokeUsingIMP:] + 212
7 UIKit 0x00000001021f0b4d workaround10030904InvokeWithTarget_block_invoke + 88
8 UIKit 0x0000000101d7eecb +[UIView _performCustomizableAppearanceModifications:] + 33
9 UIKit 0x00000001021f0ae3 workaround10030904InvokeWithTarget + 938
10 UIKit 0x00000001021ebfc9 +[_UIAppearance _applyInvocationsTo:window:matchingSelector:] + 3482
11 UIKit 0x0000000101d938fa 88-[UIView(Internal) performUpdatesForPossibleChangesOfIdiom:orScreen:traverseHierarchy:]block_invoke + 63
12 UIKit 0x0000000101d93885 -[UIView(Internal) _performUpdatesForPossibleChangesOfIdiom:orScreen:traverseHierarchy:] + 230
13 UIKit 0x0000000101d92e2c -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1369
14 UIKit 0x0000000101d8b996 45-[UIView(Hierarchy) postMovedFromSuperview:]_block_invoke + 128
15 UIKit 0x0000000101d8b85c -[UIView(Hierarchy) _postMovedFromSuperview:] + 276
16 UIKit 0x0000000101d952ac -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1508
17 UIKit 0x000000010237d922 -[UITextField willDetachFieldEditor:] + 96
18 UIKit 0x0000000101e1b48e -[UIFieldEditor becomeFieldEditorForView:] + 236
19 UIKit 0x0000000102375497 -[UITextField _resignFirstResponder] + 197
20 UIKit 0x0000000101e6b212 -[UIResponder resignFirstResponder] + 128
21 UIKit 0x00000001023752db -[UITextField resignFirstResponder] + 114
22 UIKit 0x0000000101e6b011 -[UIResponder becomeFirstResponder] + 297
23 UIKit 0x0000000101d8b673 -[UIView(Hierarchy) becomeFirstResponder] + 99
24 UIKit 0x0000000102374b08 -[UITextField becomeFirstResponder] + 51
25 UIKit 0x0000000102067d01 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) setFirstResponderIfNecessary] + 187
26 UIKit 0x0000000102069b30 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) oneFingerTap:] + 1768
27 UIKit 0x000000010205ffc2 _UIGestureRecognizerSendActions + 188
28 UIKit 0x000000010205ef28 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 357
29 UIKit 0x00000001020632d9 UIGestureRecognizerUpdate_block_invoke + 53
30 UIKit 0x0000000102063261 _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 257
31 UIKit 0x000000010205b337 _UIGestureRecognizerUpdate + 93
32 UIKit 0x0000000101d6fa15 -[UIWindow _sendGesturesForEvent:] + 928
33 UIKit 0x0000000101d706d4 -[UIWindow sendEvent:] + 909
34 UIKit 0x0000000101d4829a -[UIApplication sendEvent:] + 211
35 UIKit 0x0000000101d35aed _UIApplicationHandleEventQueue + 9579
36 CoreFoundation 0x00000001033bad21 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
37 CoreFoundation 0x00000001033ba5f2 CFRunLoopDoSources0 + 242
38 CoreFoundation 0x00000001033d646f CFRunLoopRun + 767
39 CoreFoundation 0x00000001033d5d83 CFRunLoopRunSpecific + 467
40 GraphicsServices 0x000000010524cf04 GSEventRunModal + 161
41 UIKit 0x0000000101d37e33 UIApplicationMain + 1010
42 Sales Rabbit 0x000000010000c333 main + 115
43 libdyld.dylib 0x0000000103ac35fd start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
As far as I can tell the crash is happening when we call
[curView becomeFirstResponder];
curView is not nil, and is a uitextfield
Any ideas on what to check or help would be greatly appreciated.
So I ended up finding the answer, for some reason someone had written this line of code even though it doesnt seem necessary.
[[UILabel appearance] setShadowColor:[UIColor clearColor]];
And this was causing it to crash, but only in the situation that I described above, not when it was set in the app delegate. It seems like it should be allowed to set a the shadow color to clear, although why you would do this is not apparent to me.