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.
Related
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.
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>
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.
I'm new to xcode and objective-c and i have created the base class which is a UIViewController. Let's call it A.
I have also created created an inheriting class B.
Now im trying to use my storyboard and connect it to the relevant B file,
But it wont show on the inspector, only the A file does.
Here are the header files:
A:
#import <UIKit/UIKit.h>
#import "Deck.h"
#interface CardGameViewController : UIViewController
// for subclasses
- (Deck*)createDeck; //abstract
#end
and:
B:
#import "CardGameViewController.h"
#interface PlayingCardViewController : CardGameViewController
#end
Is there any way to pass that? or should B actually be on the inspector?
EDIT:
This is the error i get after forcing the inspector to use the PlayingCardViewController:
2014-01-07 18:24:09.874 Matchismo[80975:70b] Unknown class PlayingCardGameViewController in Interface Builder file.
2014-01-07 18:24:09.893 Matchismo[80975:70b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x8d841e0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key cardButtons.'
*** First throw call stack:
(
0 CoreFoundation 0x017415e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x014c48b6 objc_exception_throw + 44
2 CoreFoundation 0x017d16a1 -[NSException raise] + 17
3 Foundation 0x011859ee -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4 Foundation 0x010f1cfb _NSSetUsingKeyValueSetter + 88
5 Foundation 0x010f1253 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6 Foundation 0x0115370a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
7 UIKit 0x0071fe3a -[UIRuntimeOutletCollectionConnection performConnect] + 690
8 UIKit 0x0071fe75 -[UIRuntimeOutletCollectionConnection connect] + 33
9 libobjc.A.dylib 0x014d67d2 -[NSObject performSelector:] + 62
10 CoreFoundation 0x0173cb6a -[NSArray makeObjectsPerformSelector:] + 314
11 UIKit 0x004d356e -[UINib instantiateWithOwner:options:] + 1417
12 UIKit 0x00345605 -[UIViewController _loadViewFromNibNamed:bundle:] + 280
13 UIKit 0x00345dad -[UIViewController loadView] + 302
14 UIKit 0x003460ae -[UIViewController loadViewIfRequired] + 78
15 UIKit 0x003465b4 -[UIViewController view] + 35
16 UIKit 0x0026e9fd -[UIWindow addRootViewControllerViewIfPossible] + 66
17 UIKit 0x0026ed97 -[UIWindow _setHidden:forced:] + 312
18 UIKit 0x0026f02d -[UIWindow _orderFrontWithoutMakingKey] + 49
19 UIKit 0x0027989a -[UIWindow makeKeyAndVisible] + 65
20 UIKit 0x0022ccd0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1851
21 UIKit 0x002313a8 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
22 UIKit 0x0024587c -[UIApplication handleEvent:withNewEvent:] + 3447
23 UIKit 0x00245de9 -[UIApplication sendEvent:] + 85
24 UIKit 0x00233025 _UIApplicationHandleEvent + 736
25 GraphicsServices 0x036e82f6 _PurpleEventCallback + 776
26 GraphicsServices 0x036e7e01 PurpleEventCallback + 46
27 CoreFoundation 0x016bcd65 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
28 CoreFoundation 0x016bca9b __CFRunLoopDoSource1 + 523
29 CoreFoundation 0x016e777c __CFRunLoopRun + 2156
30 CoreFoundation 0x016e6ac3 CFRunLoopRunSpecific + 467
31 CoreFoundation 0x016e68db CFRunLoopRunInMode + 123
32 UIKit 0x00230add -[UIApplication _run] + 840
33 UIKit 0x00232d3b UIApplicationMain + 1225
34 Matchismo 0x000038dd main + 141
35 libdyld.dylib 0x01d7f70d start + 1
36 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Go to the Product menu in Xcode and choose Clean. Sometimes that fixes weird issues like this.
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.