When performing programatically performing a segue, the segue does work and the intended storyboard opens, but terminates immediately afterwards. The view controller/storyboard does work and shouldn't have any errors in the code as I've tested it individually, so I'm not entirely sure as to why it terminates. Any help would be appreciated.
2017-05-01 20:22:59.358605 FInal Project[15659:499662] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/student/Library/Developer/CoreSimulator/Devices/265EA47F-07A6-47C7-A6B4-5E62D37E72BA/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2017-05-01 20:22:59.376075 FInal Project[15659:499662] [MC] Reading from private effective user settings.
in
2017-05-01 20:23:48.095 FInal Project[15659:499662] <UILayoutContainerView: 0x7fdae3c082f0; frame = (0 0; 414 736); autoresize = W+H; gestureRecognizers = <NSArray: 0x600000242be0>; layer = <CALayer: 0x60000003ea40>>'s window is not equal to <UINavigationController: 0x7fdae40aee00>'s view's window!
2017-05-01 20:23:48.715 FInal Project[15659:499662] -[FInal_Project.User_Info NameInputEditingDidEnd:]: unrecognized selector sent to instance 0x7fdae3c11d40
2017-05-01 20:23:48.721 FInal Project[15659:499662] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FInal_Project.User_Info NameInputEditingDidEnd:]: unrecognized selector sent to instance 0x7fdae3c11d40'
*** First throw call stack:
(
0 CoreFoundation 0x0000000101fc3d4b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000101a2521e objc_exception_throw + 48
2 CoreFoundation 0x0000000102033f04 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x0000000101f49005 ___forwarding___ + 1013
4 CoreFoundation 0x0000000101f48b88 _CF_forwarding_prep_0 + 120
5 UIKit 0x00000001030cb8bc -[UIApplication sendAction:to:from:forEvent:] + 83
6 UIKit 0x0000000103251c38 -[UIControl sendAction:to:forEvent:] + 67
7 UIKit 0x0000000103251f51 -[UIControl _sendActionsForEvents:withEvent:] + 444
8 UIKit 0x0000000103bdbc20 -[UITextField _resignFirstResponder] + 313
9 UIKit 0x00000001032e1778 -[UIResponder _finishResignFirstResponder] + 286
10 UIKit 0x0000000103bdba0e -[UITextField _finishResignFirstResponder] + 49
11 UIKit 0x00000001032e1827 -[UIResponder resignFirstResponder] + 140
12 UIKit 0x0000000103bdb8dd -[UITextField resignFirstResponder] + 136
13 UIKit 0x000000010317802f -[UIView(Hierarchy) _removeFirstResponderFromSubtree] + 167
14 UIKit 0x00000001031786b8 __UIViewWillBeRemovedFromSuperview + 76
15 UIKit 0x000000010317846a -[UIView(Hierarchy) removeFromSuperview] + 95
16 UIKit 0x000000010324d451 __71-[UIPresentationController _initViewHierarchyForPresentationSuperview:]_block_invoke.629 + 704
17 UIKit 0x0000000103246fba -[UIPresentationController transitionDidFinish:] + 111
18 UIKit 0x000000010345ef83 -[_UICurrentContextPresentationController transitionDidFinish:] + 42
19 UIKit 0x000000010324aef0 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke_2 + 183
20 UIKit 0x0000000103c0c56c -[_UIViewControllerTransitionContext completeTransition:] + 102
21 UIKit 0x0000000103243ddc -[UITransitionView notifyDidCompleteTransition:] + 251
22 UIKit 0x0000000103243aef -[UITransitionView _didCompleteTransition:] + 1539
23 UIKit 0x000000010324651c -[UITransitionView _transitionDidStop:finished:] + 104
24 UIKit 0x0000000103156bd5 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 222
25 UIKit 0x000000010315712a -[UIViewAnimationState animationDidStop:finished:] + 136
26 QuartzCore 0x0000000108526648 _ZN2CA5Layer23run_animation_callbacksEPv + 316
27 libdispatch.dylib 0x0000000105e2e0cd _dispatch_client_callout + 8
28 libdispatch.dylib 0x0000000105e0e8a4 _dispatch_main_queue_callback_4CF + 406
29 CoreFoundation 0x0000000101f87e49 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
30 CoreFoundation 0x0000000101f4d37d __CFRunLoopRun + 2205
31 CoreFoundation 0x0000000101f4c884 CFRunLoopRunSpecific + 420
32 GraphicsServices 0x0000000107d38a6f GSEventRunModal + 161
33 UIKit 0x00000001030c9c68 UIApplicationMain + 159
34 FInal Project 0x00000001013fb65f main + 111
35 libdyld.dylib 0x0000000105e7a68d start + 1
36 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
The issue (discovered in the comments above) was that there was an action in the storyboard that was no longer hooked up to an action in code.
If anyone else in the future has a similar problem, look through the outlets menu for an outlet or action with the name provided in the console output. In this case, the action was named NameInputEditingDidEnd.
To expand on Nathan's answer, instead of randomly looking around, just cmd+shift+f the name of the outlet, in this case NameInputEditingDidEnd, and xcode will output the storyboard with the dangling outlet for you and center you to it.
Related
My Application is getting crashed while scrolling UIWebview - I have used ILPDFKit for implementing interactive PDF - Editable Forms.App is getting crashed only if i am adding more than 126 Objects.
Here is code I am using (from ILPDFKit)
for (PDFWidgetAnnotationView *element in widgetAnnotationViews)
{
element.alpha = 0;
element.parentView = self;
[_pdfView.scrollView addSubview:element];
[_pdfView.scrollView bringSubviewToFront:element];
if ([element isKindOfClass:[PDFFormButtonField class]])
{
[(PDFFormButtonField*)element setButtonSuperview];
}
}
I have also raise Issue here
I have added some customview's in my webview.scrollview , so while scrolling webview my App is getting crashed. i have checked for all possible solutions i found on google/stackoverflow.
none of the delegate method of scrollview / webview called before this crash , as soon as i tried to scroll and app is getting crashed.
below is crash report.
*** Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection <__NSArrayM: 0x6000024535f0> was mutated while being enumerated.'
*** First throw call stack:
(
0 CoreFoundation 0x00000001045dd34b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000103f5f21e objc_exception_throw + 48
2 CoreFoundation 0x0000000104645f1c __NSFastEnumerationMutationHandler + 124
3 CoreFoundation 0x0000000104582638 -[NSArray makeObjectsPerformSelector:] + 424
4 UIKit 0x00000001020d8f4f -[UIScrollView(UIScrollViewInternal) _notifyDidScroll] + 163
5 UIKit 0x00000001020c3919 -[UIScrollView setContentOffset:] + 478
6 UIKit 0x00000001020c8351 -[UIScrollView _updatePanGesture] + 2346
7 UIKit 0x0000000102531289 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] + 57
8 UIKit 0x0000000102539028 _UIGestureRecognizerSendTargetActions + 109
9 UIKit 0x0000000102536af7 _UIGestureRecognizerSendActions + 227
10 UIKit 0x0000000102535d83 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 891
11 UIKit 0x0000000102521e56 _UIGestureEnvironmentUpdate + 1395
12 UIKit 0x000000010252189b -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 521
13 UIKit 0x0000000102520a7e -[UIGestureEnvironment _updateGesturesForEvent:window:] + 286
14 UIKit 0x000000010205f7ad -[UIWindow sendEvent:] + 3989
15 UIKit 0x000000010200ca33 -[UIApplication sendEvent:] + 371
16 UIKit 0x00000001027feb6d __dispatchPreprocessedEventFromEventQueue + 3248
17 UIKit 0x00000001027f7817 __handleEventQueue + 4879
18 CoreFoundation 0x0000000104582311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
19 CoreFoundation 0x000000010456759c __CFRunLoopDoSources0 + 556
20 CoreFoundation 0x0000000104566a86 __CFRunLoopRun + 918
21 CoreFoundation 0x0000000104566494 CFRunLoopRunSpecific + 420
22 GraphicsServices 0x0000000107910a6f GSEventRunModal + 161
23 UIKit 0x0000000101feef34 UIApplicationMain + 159
24 HyundaiCapital 0x000000010132a67f main + 111
25 libdyld.dylib 0x000000010610268d start + 1
26 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Edit
1.How many subviews at most i can add into delegate of scrollview at a time?
2.I am only getting this crash if i am adding subviews more than 126?
Solution
Updating ILPDFKit worked for me.
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>
I have a view,which consists a UIScrollView on which subviews would added in viewDidLoad after adding all subviews & after the execution of all custom methods it goes to viewWillappear,after that it crashes with the following traces:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString CIImage]: unrecognized selector sent to instance 0x7db5bb80'
*** First throw call stack:
(
0 CoreFoundation 0x04614946 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x0429da97 objc_exception_throw + 44
2 CoreFoundation 0x0461c5c5 -[NSObject(NSObject) doesNotRecognizeSelector:] + 277
3 CoreFoundation 0x045653e7 ___forwarding___ + 1047
4 CoreFoundation 0x04564fae _CF_forwarding_prep_0 + 14
5 UIKit 0x02b589f1 -[UIImageView _shouldDrawImage:] + 33
6 UIKit 0x02b58aa2 -[UIImageView _canDrawContent] + 164
7 UIKit 0x02a2f750 -[UIView(Internal) _shouldInheritScreenScaleAsContentScaleFactor] + 83
8 UIKit 0x02a2f7e9 -[UIView(Internal) _applyScreenScaleToContentScaleFactorIfNotSpecifiedByDeveloper] + 35
9 UIKit 0x02a2f56e -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1628
10 UIKit 0x02b5d762 -[UIImageView _didMoveFromWindow:toWindow:] + 65
11 UIKit 0x02a2f23f -[UIView(Internal) _didMoveFromWindow:toWindow:] + 813
12 UIKit 0x02a423e1 -[UIScrollView _didMoveFromWindow:toWindow:] + 65
13 UIKit 0x02a2f23f -[UIView(Internal) _didMoveFromWindow:toWindow:] + 813
14 UIKit 0x02a2f23f -[UIView(Internal) _didMoveFromWindow:toWindow:] + 813
15 UIKit 0x02a26517 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 154
16 UIKit 0x02a26475 -[UIView(Hierarchy) _postMovedFromSuperview:] + 458
17 UIKit 0x02a31f0d -[UIView(Internal) _addSubview:positioned:relativeTo:] + 2018
18 UIKit 0x02a2486e -[UIView(Hierarchy) addSubview:] + 56
19 UIKit 0x0299d0fa __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke + 1849
20 UIKit 0x02a2b7af +[UIView(Animation) performWithoutAnimation:] + 82
21 UIKit 0x0299c5a6 -[_UINavigationParallaxTransition animateTransition:] + 1204
22 UIKit 0x02b2b64d -[UINavigationController _startCustomTransition:] + 3765
23 UIKit 0x02b38726 -[UINavigationController _startDeferredTransitionIfNeeded:] + 712
24 UIKit 0x02b39372 -[UINavigationController __viewWillLayoutSubviews] + 57
25 UIKit 0x02cad04c -[UILayoutContainerView layoutSubviews] + 213
26 UIKit 0x02a34dd1 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 608
27 libobjc.A.dylib 0x042b3771 -[NSObject performSelector:withObject:] + 70
28 QuartzCore 0x0215928f -[CALayer layoutSublayers] + 152
29 QuartzCore 0x0214d115 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 397
30 QuartzCore 0x0214cf70 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
31 QuartzCore 0x020ab3c6 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 284
32 QuartzCore 0x020ac78c _ZN2CA11Transaction6commitEv + 392
33 QuartzCore 0x020ace58 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
34 CoreFoundation 0x045379de __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
35 CoreFoundation 0x04537920 __CFRunLoopDoObservers + 400
36 CoreFoundation 0x0452d35a __CFRunLoopRun + 1226
37 CoreFoundation 0x0452cbcb CFRunLoopRunSpecific + 443
38 CoreFoundation 0x0452c9fb CFRunLoopRunInMode + 123
39 GraphicsServices 0x05e6b24f GSEventRunModal + 192
40 GraphicsServices 0x05e6b08c GSEventRun + 104
41 UIKit 0x029a98b6 UIApplicationMain + 1526
42 POPCorn 0x000e9472 main + 130
43 libdyld.dylib 0x06193ac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString CIImage]: unrecognized selector sent to instance 0x7db5bb80'
You're accessing the CIImage property of an NSString (perhaps its id and you just accessed this property thinking that the id object was a UIImage). Search for CIImage in your class and make sure the object you're getting the property from is an actual UIImage.
If you want to find out where the actual line of code that is causing i suggest creating an exception breakpoint. You can do this by going to the breakpoints tab and adding one for all exceptions. This along with the log you should see what you are passing an invalid argument to.
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.
I recently upgraded an app I created from iOS 6 to iOS 7 (and Xcode 4 to Xcode 5). I then tried to run the app, and the build said it succeeded, however the app crashed and directed me to this code and the error message:
int retVal = UIApplicationMain(argc, argv, nil, nil);
Thread 1 signal:SIGABRT
The console log is below in case that helps:
2014-01-14 14:30:39.791 Recipes[1808:70b] *** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'A view can only be associated with at most one view controller at a time! View <UIImageView: 0x8ba3e80; frame = (0 0; 320 568); autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0x8ba3f10>> is associated with <UIViewController: 0x8b93c60>. Clear this association before associating this view with <UIViewController: 0x8b95690>.'
*** First throw call stack:
(
0 CoreFoundation 0x01ab45e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x018378b6 objc_exception_throw + 44
2 CoreFoundation 0x01ab43bb +[NSException raise:format:] + 139
3 UIKit 0x00a31c99 -[UIView(Internal) _setViewDelegate:] + 242
4 UIKit 0x00ae3ecc +[UIViewController setViewController:forView:] + 40
5 UIKit 0x00ade921 -[UIViewController setView:] + 511
6 Foundation 0x005e6d28 _NSSetUsingKeyValueSetter + 133
7 Foundation 0x005e6253 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
8 Foundation 0x0064870a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
9 UIKit 0x00c6ca15 -[UIRuntimeOutletConnection connect] + 106
10 libobjc.A.dylib 0x018497d2 -[NSObject performSelector:] + 62
11 CoreFoundation 0x01aafb6a -[NSArray makeObjectsPerformSelector:] + 314
12 UIKit 0x00c6b56e -[UINib instantiateWithOwner:options:] + 1417
13 UIKit 0x00c6d2fb -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 165
14 UIKit 0x009ca3bb -[UIApplication _loadMainNibFileNamed:bundle:] + 58
15 UIKit 0x009ca6e9 -[UIApplication _loadMainInterfaceFile] + 245
16 UIKit 0x009c928f -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 543
17 UIKit 0x009dd87c -[UIApplication handleEvent:withNewEvent:] + 3447
18 UIKit 0x009ddde9 -[UIApplication sendEvent:] + 85
19 UIKit 0x009cb025 _UIApplicationHandleEvent + 736
20 GraphicsServices 0x02ea62f6 _PurpleEventCallback + 776
21 GraphicsServices 0x02ea5e01 PurpleEventCallback + 46
22 CoreFoundation 0x01a2fd65 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
23 CoreFoundation 0x01a2fa9b __CFRunLoopDoSource1 + 523
24 CoreFoundation 0x01a5a77c __CFRunLoopRun + 2156
25 CoreFoundation 0x01a59ac3 CFRunLoopRunSpecific + 467
26 CoreFoundation 0x01a598db CFRunLoopRunInMode + 123
27 UIKit 0x009c8add -[UIApplication _run] + 840
28 UIKit 0x009cad3b UIApplicationMain + 1225
29 Recipes 0x000022cf main + 93
30 libdyld.dylib 0x02b4670d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Any help is greatly appreciated. Thanks!