copywithzone exception on object not included in current class - ios

I am using a 4 UIButton that bring up the same UIPickerView but with different NSArray(4) appearing for each button. Using a 4 bool to let the UIPickerView to decide which to load, and which row's text to grab. The buttons methods just include the four bool properties, that sets the three to false and the correct one(button tapped) to true. Then UIViewAnimateWithDuration is called that brings up the UIPickerView (printed in a UIView - for both UIPickerView and UIToolbar to work together). All buttons are working just fine(no matter how many time I bring/close the UIPickerView)apart from one (even if it is pressed in first-middle-last-any order). Xcode throws the following exception:
What I did:
remove the button, create a new one
tried both storyboard/controller method of creating a button
added method to button using addtarget
linked button with method using storyboard
So what I am asking if anyone can see anything that I cannot see in my debugger's exception thrown:(sportCenter is a NSObject and it is not imported in this controller -tried that too!)
2015-11-05 13:14:36.356 -----[3975:1397857] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[sportCenter copyWithZone:]: unrecognized selector sent to instance 0x7f8709f62250'
*** First throw call stack:
(
0 CoreFoundation 0x0000000103673f45 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001030eddeb objc_exception_throw + 48
2 CoreFoundation 0x000000010367c56d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00000001035c9eea ___forwarding___ + 970
4 CoreFoundation 0x00000001035c9a98 _CF_forwarding_prep_0 + 120
5 UIKit 0x0000000103c8954b -[UILabel _setText:] + 114
6 UIKit 0x0000000103a0580c -[UIPickerView tableView:cellForRowAtIndexPath:] + 863
7 UIKit 0x000000010429c146 -[UIPickerColumnView tableView:cellForRowAtIndexPath:] + 103
8 UIKit 0x0000000103b75e2a -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 782
9 UIKit 0x0000000103b75f3f -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 74
10 UIKit 0x0000000103b4b307 -[UITableView _updateVisibleCellsNow:isRecursive:] + 3187
11 UIKit 0x0000000103b5d369 -[UITableView cellForRowAtIndexPath:] + 186
12 UIKit 0x000000010412419a -[UIPickerTableView selectRow:animated:notify:] + 342
13 UIKit 0x0000000103a0421f -[UIPickerView _resetSelectionOfTables] + 157
14 UIKit 0x0000000103a040ab __30-[UIPickerView layoutSubviews]_block_invoke + 9523
15 UIKit 0x0000000103ac9c10 +[UIView(Animation) performWithoutAnimation:] + 65
16 UIKit 0x0000000103a01b33 -[UIPickerView layoutSubviews] + 147
17 UIKit 0x0000000103a04fcb -[UIPickerView selectedRowInComponent:] + 45
18 UIKit 0x0000000103a0009e -[UIPickerView _updateSelectedRows] + 135
19 UIKit 0x0000000103a001cf -[UIPickerView didMoveToWindow] + 117
20 UIKit 0x0000000103acebe0 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1768
21 UIKit 0x0000000103ace856 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 862
22 UIKit 0x0000000103ac3e2c __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 155
23 Foundation 0x0000000102cc3d4a -[NSISEngine withBehaviors:performModifications:] + 155
24 UIKit 0x0000000103ac3d4a -[UIView(Hierarchy) _postMovedFromSuperview:] + 575
25 UIKit 0x0000000103ad17e7 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1967
26 --- 0x00000001026cbe7b -[AllOngoingViewController animatePickerView] + 107
27 --- 0x00000001026cbcd7 -[AllOngoingViewController centersAreTapped] + 71
28 UIKit 0x0000000103f0194f _UIGestureRecognizerSendTargetActions + 153
29 UIKit 0x0000000103efdfc1 _UIGestureRecognizerSendActions + 162
30 UIKit 0x0000000103efbfbe -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 843
31 UIKit 0x0000000103f04283 ___UIGestureRecognizerUpdate_block_invoke898 + 79
32 UIKit 0x0000000103f04121 _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 342
33 UIKit 0x0000000103ef1bdd _UIGestureRecognizerUpdate + 2634
34 UIKit 0x0000000103a8f9c0 -[UIWindow _sendGesturesForEvent:] + 1137
35 UIKit 0x0000000103a90bf6 -[UIWindow sendEvent:] + 849
36 UIKit 0x0000000103a402fa -[UIApplication sendEvent:] + 263
37 UIKit 0x0000000103a1aabf _UIApplicationHandleEventQueue + 6844
38 CoreFoundation 0x00000001035a0011 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
39 CoreFoundation 0x0000000103595f3c __CFRunLoopDoSources0 + 556
40 CoreFoundation 0x00000001035953f3 __CFRunLoopRun + 867
41 CoreFoundation 0x0000000103594e08 CFRunLoopRunSpecific + 488
42 GraphicsServices 0x0000000106616ad2 GSEventRunModal + 161
43 UIKit 0x0000000103a2030d UIApplicationMain + 171
44 ----- 0x00000001026c1caf main + 111
45 libdyld.dylib 0x000000010a19e92d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

You must add your own copyWithZone: method in your objects...
However, I don't really understand your question / context. It looks designed in a bit complex way. Booleans array have chances to be a bad approach. It is better to have a selectedButton ( UIButton ) property in your controller, to know which one is selected, than maintain four booleans.
And finally, no matter the situation, if things are working for all objects, excepted the first one, it often means that you have an array index error somewhere.
I hope it helps.

Related

UITextField crash on touch

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

terminating with uncaught exception of type NSException? 'NSInternalInconsistencyException' [duplicate]

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.

iOS 7.1 update crash when switching between uitextfields with reason setObjectForKey: object cannot be nil (key: NSShadow)

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.

iOS 7 app crashes on UITextField input

I'm trying to develop a questionnaire app where sometimes, a string must be inputted. In interface builder I have a scroll view, and in it a UITextField. But when I run it in the simulator, the app crashes when I try to input a simple string into it. The keyboard shows up, but as soon as I try to type something, I get a SIGARBT on the main function. The complete error message (don't mind the app name, it's just a simple test app that I made in a few minutes):
2014-03-08 18:16:38.564 hetisweertijdvoordepolonaise[4381:70b] -[NSNull length]: unrecognized selector sent to instance 0x1898068
2014-03-08 18:16:38.569 hetisweertijdvoordepolonaise[4381:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull length]: unrecognized selector sent to instance 0x1898068'
*** First throw call stack:
(
0 CoreFoundation 0x0174c5e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x014bb8b6 objc_exception_throw + 44
2 CoreFoundation 0x017e9903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x0173c90b ___forwarding___ + 1019
4 CoreFoundation 0x0173c4ee _CF_forwarding_prep_0 + 14
5 CoreFoundation 0x016cc95c CFStringGetLength + 140
6 CoreFoundation 0x016e0284 CFStringCompareWithOptionsAndLocale + 52
7 Foundation 0x010c6634 -[NSString compare:options:range:locale:] + 175
8 Foundation 0x010c6580 -[NSString compare:options:range:] + 69
9 Foundation 0x010d8a59 -[NSString caseInsensitiveCompare:] + 80
10 UIKit 0x0043ff48 -[UIPhysicalKeyboardEvent _matchesKeyCommand:] + 280
11 UIKit 0x00383ac9 -[UIResponder(Internal) _keyCommandForEvent:] + 312
12 UIKit 0x00383b3b -[UIResponder(Internal) _keyCommandForEvent:] + 426
13 UIKit 0x00383b3b -[UIResponder(Internal) _keyCommandForEvent:] + 426
14 UIKit 0x00383b3b -[UIResponder(Internal) _keyCommandForEvent:] + 426
15 UIKit 0x00383b3b -[UIResponder(Internal) _keyCommandForEvent:] + 426
16 UIKit 0x0023d34b -[UIApplication _handleKeyUIEvent:] + 138
17 UIKit 0x00383fa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
18 UIKit 0x00383fa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
19 UIKit 0x00383fa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
20 UIKit 0x00383fa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
21 UIKit 0x00383fa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
22 UIKit 0x00383fa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
23 UIKit 0x0023d2ba -[UIApplication handleKeyUIEvent:] + 84
24 UIKit 0x00413d29 -[UIKeyboardImpl _handleKeyEvent:executionContext:] + 80
25 UIKit 0x0058d179 -[UIKeyboardLayoutStar completeRetestForTouchUp:timestamp:interval:executionContext:] + 4078
26 UIKit 0x0058bc7f -[UIKeyboardLayoutStar touchUp:executionContext:] + 1545
27 UIKit 0x00421f18 __28-[UIKeyboardLayout touchUp:]_block_invoke + 269
28 UIKit 0x009383c8 -[UIKeyboardTaskQueue continueExecutionOnMainThread] + 402
29 UIKit 0x00938a6f -[UIKeyboardTaskQueue addTask:] + 144
30 UIKit 0x00421e03 -[UIKeyboardLayout touchUp:] + 263
31 UIKit 0x00422939 -[UIKeyboardLayout touchesEnded:withEvent:] + 362
32 UIKit 0x0026851d -[UIWindow _sendTouchesForEvent:] + 852
33 UIKit 0x00269184 -[UIWindow sendEvent:] + 1232
34 UIKit 0x0023ce86 -[UIApplication sendEvent:] + 242
35 UIKit 0x0022718f _UIApplicationHandleEventQueue + 11421
36 CoreFoundation 0x016d583f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
37 CoreFoundation 0x016d51cb __CFRunLoopDoSources0 + 235
38 CoreFoundation 0x016f229e __CFRunLoopRun + 910
39 CoreFoundation 0x016f1ac3 CFRunLoopRunSpecific + 467
40 CoreFoundation 0x016f18db CFRunLoopRunInMode + 123
41 GraphicsServices 0x036dd9e2 GSEventRunModal + 192
42 GraphicsServices 0x036dd809 GSEventRun + 104
43 UIKit 0x00229d3b UIApplicationMain + 1225
44 hetisweertijdvoordepolonaise 0x0000204d main + 141
45 libdyld.dylib 0x01d76701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
ViewController.m:
#import "ViewController.h"
#interface ViewController ()
#end
#implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
}
#end
Is there some fundamental thing I forgot?
According to the stack trace, maybe you have initialized a NSString incorrectly. Please paste the relevant code.
This is a shot in the dark without seeing more of your code. Looking at the stacktrace, it seems like your code is misinterpreting your text input as a key command for some reason. It is trying to compare your input against a set of known commands and failing.
There are a few other things that might be related since you are running in the simulator. In the 'hardware' menu is 'simulate hardware keyboard' checked? What about 'IOS uses same layout as OSX'?
One last thing. If you really want people to be able to reproduce this issue, we need to see the UI code. If you right click on your storyboard file and select 'open as' there is an option to view the file as source code. For an app as simple as what you described, the text should be small enough that you can paste it here or host it somewhere and provide a link.

Code no longer working in OS4.3 but fine in 5.0 (used to work fine)

Weird error. My code was written in Xcode 3, and it loaded fine in 4.4 without errors.
Recently, it started not working in OS 4.3 or below, but fine in 5.0 and 5.1. I've done a few weeks of updating my app, so I have no idea where it went out of whack (I was using the current simulator 5.1 when testing, so I didn't even think to try the others after each trial).
Here is my error log, but I can't figure out whats causing the crash. It should note that I get "location services not available" when launching in 4.3 or below, but not in 5.0 and above. It crashes about the time I try to load a view that has a table. Here is my debugger info... any ideas?
> 2012-09-03 05:43:39.582 Diners[7811:12203] [-[MapViewController viewDidLoad] /Users/user/Documents/Source Code/Working Projects/Diners/Classes/MapViewController.m:48]
bootstrap_look_up failed (44e)
2012-09-03 05:43:42.997 Diners[7811:12203] [-[StripClubsAppDelegate i3fSplashViewBrickDidRemoveFromSuperview:] /Users/user/Documents/Source Code/Working Projects/Diners/Classes/StripClubsAppDelegate.m:77]
2012-09-03 05:43:49.883 Diners[7811:12203] -[UITapGestureRecognizer initWithCoder:]: unrecognized selector sent to instance 0x5fe01b0
2012-09-03 05:43:49.950 Diners[7811:12203] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITapGestureRecognizer initWithCoder:]: unrecognized selector sent to instance 0x5fe01b0'
*** Call stack at first throw:
(
0 CoreFoundation 0x014585a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x01205313 objc_exception_throw + 44
2 CoreFoundation 0x0145a0bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x013c9966 ___forwarding___ + 966
4 CoreFoundation 0x013c9522 _CF_forwarding_prep_0 + 50
5 UIKit 0x0061c9fd UINibDecoderDecodeObjectForValue + 2592
6 UIKit 0x0061d6ac -[UINibDecoder decodeObjectForKey:] + 398
7 UIKit 0x0053293e -[UIRuntimeConnection initWithCoder:] + 153
8 UIKit 0x00532ee7 -[UIRuntimeEventConnection initWithCoder:] + 64
9 UIKit 0x0061c9fd UINibDecoderDecodeObjectForValue + 2592
10 UIKit 0x0061c2f5 UINibDecoderDecodeObjectForValue + 792
11 UIKit 0x0061d6ac -[UINibDecoder decodeObjectForKey:] + 398
12 UIKit 0x00531c36 -[UINib instantiateWithOwner:options:] + 804
13 UIKit 0x00533ab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
14 UIKit 0x003e9628 -[UIViewController _loadViewFromNibNamed:bundle:] + 70
15 UIKit 0x003e7134 -[UIViewController loadView] + 120
16 UIKit 0x003e700e -[UIViewController view] + 56
17 UIKit 0x003e5482 -[UIViewController contentScrollView] + 42
18 UIKit 0x003f5f25 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
19 UIKit 0x003f4555 -[UINavigationController _layoutViewController:] + 43
20 UIKit 0x003f5870 -[UINavigationController _startTransition:fromViewController:toViewController:] + 524
21 UIKit 0x003f032a -[UINavigationController _startDeferredTransitionIfNeeded] + 266
22 UIKit 0x003f7562 -[UINavigationController pushViewController:transition:forceImmediate:] + 932
23 UIKit 0x003f01c4 -[UINavigationController pushViewController:animated:] + 62
24 Diners 0x00002c83 -[MapViewController goToListByState] + 275
25 UIKit 0x003374fd -[UIApplication sendAction:to:from:forEvent:] + 119
26 UIKit 0x003c7799 -[UIControl sendAction:to:forEvent:] + 67
27 UIKit 0x003c9c2b -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
28 UIKit 0x003c8a1c -[UIControl touchesBegan:withEvent:] + 277
29 UIKit 0x0035bd41 -[UIWindow _sendTouchesForEvent:] + 395
30 UIKit 0x0033cc37 -[UIApplication sendEvent:] + 447
31 UIKit 0x00341f2e _UIApplicationHandleEvent + 7576
32 GraphicsServices 0x01a2e992 PurpleEventCallback + 1550
33 CoreFoundation 0x01439944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
34 CoreFoundation 0x01399cf7 __CFRunLoopDoSource1 + 215
35 CoreFoundation 0x01396f83 __CFRunLoopRun + 979
36 CoreFoundation 0x01396840 CFRunLoopRunSpecific + 208
37 CoreFoundation 0x01396761 CFRunLoopRunInMode + 97
38 GraphicsServices 0x01a2d1c4 GSEventRunModal + 217
39 GraphicsServices 0x01a2d289 GSEventRun + 115
40 UIKit 0x00345c93 UIApplicationMain + 1160
41 Diners 0x0000203d main + 125
42 Diners 0x00001fb5 start + 53
)
terminate called throwing an exception(lldb)
It seems that you add a gesture recognizer using interface builder, this feature is only available for ios5 and more.

Resources