Im doing an iOS app(actually just copying code) from this tutorial http://hubpages.com/hub/Tutorial-on-Creating-an-IOS-5-SQLite-Database-Application-IOS-5-SQLite
and I can't run my app. Build succeds and then I get signal SIGABRT in my XCode.
2014-08-28 09:04:40.105 Whine2[526:60b] Problem with prepare statement
2014-08-28 09:04:40.109 Whine2[526:60b] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(
0 CoreFoundation 0x018d81e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x016578e5 objc_exception_throw + 44
2 CoreFoundation 0x018793f6 -[__NSArrayM objectAtIndex:] + 246
3 Whine2 0x000029bd -[kcbViewController viewDidLoad] + 269
4 UIKit 0x0043633d -[UIViewController loadViewIfRequired] + 696
5 UIKit 0x004365d9 -[UIViewController view] + 35
6 UIKit 0x00356267 -[UIWindow addRootViewControllerViewIfPossible] + 66
7 UIKit 0x003565ef -[UIWindow _setHidden:forced:] + 312
8 UIKit 0x0035686b -[UIWindow _orderFrontWithoutMakingKey] + 49
9 UIKit 0x003613c8 -[UIWindow makeKeyAndVisible] + 65
10 UIKit 0x00311bc0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 2097
11 UIKit 0x00316667 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
12 UIKit 0x0032af92 -[UIApplication handleEvent:withNewEvent:] + 3517
13 UIKit 0x0032b555 -[UIApplication sendEvent:] + 85
14 UIKit 0x00318250 _UIApplicationHandleEvent + 683
15 GraphicsServices 0x038cdf02 _PurpleEventCallback + 776
16 GraphicsServices 0x038cda0d PurpleEventCallback + 46
17 CoreFoundation 0x01853ca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
18 CoreFoundation 0x018539db __CFRunLoopDoSource1 + 523
19 CoreFoundation 0x0187e68c __CFRunLoopRun + 2156
20 CoreFoundation 0x0187d9d3 CFRunLoopRunSpecific + 467
21 CoreFoundation 0x0187d7eb CFRunLoopRunInMode + 123
22 UIKit 0x00315d9c -[UIApplication _run] + 840
23 UIKit 0x00317f9b UIApplicationMain + 1225
24 Whine2 0x0000282d main + 141
25 libdyld.dylib 0x01e21701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
I understand there is some problem with array, right?
As your error message and code in the link says, there is one array named wines in viewDidLoad of kcbViewController and it is empty. aJust log the array wines before accessing it . If you need to check whether an array is empty, you can check if self.wines.count is 0.
Related
I am following an Apple tutorial on creating an iOS Application using Swift [Developing iOS Apps (Swift)], and I have followed each step exactly as it is. This app has been running flawlessly in the Simulator, but suddenlly it started throwing a SIGABRT error (I made a short research to understand what a SIGABRT (Signal Abort) error is, and I've even found some other answers, but no one seems to fix my problem).
Console Output:
2017-10-25 02:00:23.553 myApplication[1358:48276] -[SWRevealViewController revealToggel:]: unrecognized selector sent to instance 0x7ff74c813400
2017-10-25 02:00:23.824 myApplication[1358:48276] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SWRevealViewController revealToggel:]: unrecognized selector sent to instance 0x7ff74c813400'
*** First throw call stack:
(
0 CoreFoundation 0x000000010a39ae65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000109e11deb objc_exception_throw + 48
2 CoreFoundation 0x000000010a3a348d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x000000010a2f090a ___forwarding___ + 970
4 CoreFoundation 0x000000010a2f04b8 _CF_forwarding_prep_0 + 120
5 UIKit 0x000000010a973194 -[UIApplication sendAction:to:from:forEvent:] + 92
6 UIKit 0x000000010ad747b7 -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 152
7 UIKit 0x000000010a973194 -[UIApplication sendAction:to:from:forEvent:] + 92
8 UIKit 0x000000010aae26fc -[UIControl sendAction:to:forEvent:] + 67
9 UIKit 0x000000010aae29c8 -[UIControl _sendActionsForEvents:withEvent:] + 311
10 UIKit 0x000000010aae2b43 -[UIControl _sendActionsForEvents:withEvent:] + 690
11 UIKit 0x000000010aae1af8 -[UIControl touchesEnded:withEvent:] + 601
12 UIKit 0x000000010a9e249b -[UIWindow _sendTouchesForEvent:] + 835
13 UIKit 0x000000010a9e31d0 -[UIWindow sendEvent:] + 865
14 UIKit 0x000000010a991b66 -[UIApplication sendEvent:] + 263
15 UIKit 0x000000010a96bd97 _UIApplicationHandleEventQueue + 6844
16 CoreFoundation 0x000000010a2c6a31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
17 CoreFoundation 0x000000010a2bc95c __CFRunLoopDoSources0 + 556
18 CoreFoundation 0x000000010a2bbe13 __CFRunLoopRun + 867
19 CoreFoundation 0x000000010a2bb828 CFRunLoopRunSpecific + 488
20 GraphicsServices 0x000000010f092ad2 GSEventRunModal + 161
21 UIKit 0x000000010a971610 UIApplicationMain + 171
22 myApplication 0x00000001098f224d main + 109
23 libdyld.dylib 0x000000010d2c392d start + 1
24 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Typo? Should be revealToggle...
I think you misspelled revealToggel:. It should be revealToggle:.
Here's what I did: I control dragged from the button to the viewController and starting the app is fine. However, when I click the "let's get started" button, which should segue into the next part of the app, I just get an error. What am I doing wrong?
Latest version of xcode (not beta) and code I wrote (I didn't write any code for the segue though) was in swift.
Also, the error message I'm getting
Registration for remote notification failed with error: REMOTE_NOTIFICATION_SIMULATOR_NOT_SUPPORTED_NSERROR_DESCRIPTION
2016-07-28 14:20:53.108 TouchLogin[6368:503476] -[TouchLogin.BWWalkthroughPageViewController GetStarted:]: unrecognized selector sent to instance 0x7f8cc351b360
2016-07-28 14:20:53.111 TouchLogin[6368:503476] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[TouchLogin.BWWalkthroughPageViewController GetStarted:]: unrecognized selector sent to instance 0x7f8cc351b360'
*** First throw call stack:
(
0 CoreFoundation 0x000000010132bd85 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000103310deb objc_exception_throw + 48
2 CoreFoundation 0x0000000101334d3d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x000000010127acfa ___forwarding___ + 970
4 CoreFoundation 0x000000010127a8a8 _CF_forwarding_prep_0 + 120
5 UIKit 0x0000000101d96a8d -[UIApplication sendAction:to:from:forEvent:] + 92
6 UIKit 0x0000000101f09e67 -[UIControl sendAction:to:forEvent:] + 67
7 UIKit 0x0000000101f0a143 -[UIControl _sendActionsForEvents:withEvent:] + 327
8 UIKit 0x0000000101f09263 -[UIControl touchesEnded:withEvent:] + 601
9 UIKit 0x000000010227ec52 _UIGestureRecognizerUpdate + 10279
10 UIKit 0x0000000101e0948e -[UIWindow _sendGesturesForEvent:] + 1137
11 UIKit 0x0000000101e0a6c4 -[UIWindow sendEvent:] + 849
12 UIKit 0x0000000101db5dc6 -[UIApplication sendEvent:] + 263
13 UIKit 0x0000000101d8f553 _UIApplicationHandleEventQueue + 6660
14 CoreFoundation 0x0000000101251301 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
15 CoreFoundation 0x000000010124722c __CFRunLoopDoSources0 + 556
16 CoreFoundation 0x00000001012466e3 __CFRunLoopRun + 867
17 CoreFoundation 0x00000001012460f8 CFRunLoopRunSpecific + 488
18 GraphicsServices 0x000000010496dad2 GSEventRunModal + 161
19 UIKit 0x0000000101d94f09 UIApplicationMain + 171
20 TouchLogin 0x0000000100fa6cc2 main + 114
21 libdyld.dylib 0x000000010437192d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Working on implementing NSUndoManager within an iOS9 app. Current undo code looks like this:
func setActiveColorData(colorData: ColorData) {
if colorData != activeColorData {
print(self)
undoManager?.registerUndoWithTarget(self, selector: "setActiveColorData:", object: activeColorData!)
undoManager?.setActionName("Change color")
print("Set undo action")
activeColorData = colorData
}
}
ColorData is just a simple class with three floats inside of it (hue, saturation, brightness) and some utility methods.
Everything works fine, including the shake gesture which brings up the undo prompt. But once you click undo, the app crashes and the following error:
2016-02-25 16:26:58.225 Color[89399:5503615] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Color.PickerViewController setActiveColorData:]: unrecognized selector sent to instance 0x7fa080776820'
*** First throw call stack:
(
0 CoreFoundation 0x0000000105b75e65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000108159deb objc_exception_throw + 48
2 CoreFoundation 0x0000000105b7e48d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x0000000105acb90a ___forwarding___ + 970
4 CoreFoundation 0x0000000105acb4b8 _CF_forwarding_prep_0 + 120
5 Foundation 0x00000001066b2feb -[_NSUndoStack popAndInvoke] + 261
6 Foundation 0x00000001066b2162 -[NSUndoManager undoNestedGroup] + 424
7 UIKit 0x0000000106c46813 -[UIApplication alertView:clickedButtonAtIndex:] + 151
8 UIKit 0x0000000106f63589 -[UIAlertView _prepareToDismissForTappedIndex:] + 136
9 UIKit 0x0000000106f62fc7 __35-[UIAlertView _prepareAlertActions]_block_invoke50 + 53
10 UIKit 0x0000000106f54572 -[UIAlertController _dismissAnimated:triggeringAction:triggeredByPopoverDimmingView:] + 133
11 UIKit 0x0000000107604eb6 -[_UIAlertControllerView _handleActionSelectionGestureRecognizer:] + 694
12 UIKit 0x000000010711ee73 _UIGestureRecognizerSendTargetActions + 153
13 UIKit 0x000000010711b4e5 _UIGestureRecognizerSendActions + 162
14 UIKit 0x00000001071194e2 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 843
15 UIKit 0x00000001071219a0 ___UIGestureRecognizerUpdate_block_invoke904 + 79
16 UIKit 0x000000010712183e _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 342
17 UIKit 0x000000010710f101 _UIGestureRecognizerUpdate + 2634
18 UIKit 0x0000000106ca6f8a -[UIWindow _sendGesturesForEvent:] + 1137
19 UIKit 0x0000000106ca81c0 -[UIWindow sendEvent:] + 849
20 UIKit 0x0000000106c56b66 -[UIApplication sendEvent:] + 263
21 UIKit 0x0000000106c30d97 _UIApplicationHandleEventQueue + 6844
22 CoreFoundation 0x0000000105aa1a31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
23 CoreFoundation 0x0000000105a9795c __CFRunLoopDoSources0 + 556
24 CoreFoundation 0x0000000105a96e13 __CFRunLoopRun + 867
25 CoreFoundation 0x0000000105a96828 CFRunLoopRunSpecific + 488
26 GraphicsServices 0x000000010a416ad2 GSEventRunModal + 161
27 UIKit 0x0000000106c36610 UIApplicationMain + 171
28 Color 0x00000001052a2a7d main + 109
29 libdyld.dylib 0x0000000108c9992d start + 1
30 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I've check the PickerViewController instance and the memory locations match up (from the print(self) line, in this case 0x7fa080776820). Any idea why it can't invoke this selector? Or is it something else? Thanks!
I'm seeing this same kind of crash in a photo editing app when memory is running low. When I get a memory warning, I clear the undo manager but in my case I believe this crash happens because the memory is getting deleted out from under the undo manager.
In case it's related: https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/UndoArchitecture/Articles/CleaningUndoStack.html
when i run my app, i received this error :
2014-11-10 06:14:05.581 Yoga[4032:110484] user is registered
2014-11-10 06:14:30.552 Yoga[4032:110484] * Terminating app due to uncaught exception 'NSGenericException', reason: 'Push segues can only be used when the source controller is managed by an instance of UINavigationController.'
* First throw call stack:
(
0 CoreFoundation 0x000000010c999f35 exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010c632bb7 objc_exception_throw + 45
2 UIKit 0x000000010b43e16a -[UIStoryboardPushSegue destinationContainmentContext] + 0
3 UIKit 0x000000010aedc8be -[UIApplication sendAction:to:from:forEvent:] + 75
4 UIKit 0x000000010afe3410 -[UIControl _sendActionsForEvents:withEvent:] + 467
5 UIKit 0x000000010afe27df -[UIControl touchesEnded:withEvent:] + 522
6 UIKit 0x000000010af22308 -[UIWindow _sendTouchesForEvent:] + 735
7 UIKit 0x000000010af22c33 -[UIWindow sendEvent:] + 683
8 UIKit 0x000000010aeef9b1 -[UIApplication sendEvent:] + 246
9 UIKit 0x000000010aefca7d _UIApplicationHandleEventFromQueueEvent + 17370
10 UIKit 0x000000010aed8103 _UIApplicationHandleEventQueue + 1961
11 CoreFoundation 0x000000010c8cf551 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
12 CoreFoundation 0x000000010c8c541d __CFRunLoopDoSources0 + 269
13 CoreFoundation 0x000000010c8c4a54 __CFRunLoopRun + 868
14 CoreFoundation 0x000000010c8c4486 CFRunLoopRunSpecific + 470
15 GraphicsServices 0x000000010d3329f0 GSEventRunModal + 161
16 UIKit 0x000000010aedb420 UIApplicationMain + 1282
17 Yoga 0x000000010a840b53 main + 115
18 libdyld.dylib 0x000000010f69b145 start + 1
19 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
somebody can help me pls
add Navigation Controller to your initial view
Select the initial view
Go To Editor--> Embed In --> Navigation Controller.
I just got started with obj-c Xcode and iPhone development...
I have read that the SIGABRT error is a crash, an uncaught expectation and I need to look trough the log to correct it but I don't know how to do it
Log:
2014-05-28 14:25:55.492 ctpp[558:60b] Cannot find executable for CFBundle 0xaa8b870 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/ SDKs/iPhoneSimulator7.1.sdk/System/Library/AccessibilityBundles/CertUIFramework.axbundle> (not loaded)
2014-05-28 14:25:55.550 ctpp[558:60b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<ViewController 0x8cbc260> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key elso.'
*** First throw call stack:
(
0 CoreFoundation 0x017f31e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x015728e5 objc_exception_throw + 44
2 CoreFoundation 0x01882fe1 -[NSException raise] + 17
3 Foundation 0x01232d9e -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4 Foundation 0x0119f1d7 _NSSetUsingKeyValueSetter + 88
5 Foundation 0x0119e731 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6 Foundation 0x01200b0a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
7 UIKit 0x004e91f4 -[UIRuntimeOutletConnection connect] + 106
8 libobjc.A.dylib 0x015847de -[NSObject performSelector:] + 62
9 CoreFoundation 0x017ee76a -[NSArray makeObjectsPerformSelector:] + 314
10 UIKit 0x004e7d4d -[UINib instantiateWithOwner:options:] + 1417
11 UIKit 0x003506f5 -[UIViewController _loadViewFromNibNamed:bundle:] + 280
12 UIKit 0x00350e9d -[UIViewController loadView] + 302
13 UIKit 0x003510d3 -[UIViewController loadViewIfRequired] + 78
14 UIKit 0x003515d9 -[UIViewController view] + 35
15 UIKit 0x00271267 -[UIWindow addRootViewControllerViewIfPossible] + 66
16 UIKit 0x002715ef -[UIWindow _setHidden:forced:] + 312
17 UIKit 0x0027186b -[UIWindow _orderFrontWithoutMakingKey] + 49
18 UIKit 0x0dc6a587 - [UIWindowAccessibility(SafeCategory) _orderFrontWithoutMakingKey] + 77
19 UIKit 0x0027c3c8 -[UIWindow makeKeyAndVisible] + 65
20 UIKit 0x0022cbc0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 2097
21 UIKit 0x00231667 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
22 UIKit 0x00245f92 -[UIApplication handleEvent:withNewEvent:] + 3517
23 UIKit 0x00246555 -[UIApplication sendEvent:] + 85
24 UIKit 0x00233250 _UIApplicationHandleEvent + 683
25 GraphicsServices 0x037e8f02 _PurpleEventCallback + 776
26 GraphicsServices 0x037e8a0d PurpleEventCallback + 46
27 CoreFoundation 0x0176eca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
28 CoreFoundation 0x0176e9db __CFRunLoopDoSource1 + 523
29 CoreFoundation 0x0179968c __CFRunLoopRun + 2156
30 CoreFoundation 0x017989d3 CFRunLoopRunSpecific + 467
31 CoreFoundation 0x017987eb CFRunLoopRunInMode + 123
32 UIKit 0x00230d9c -[UIApplication _run] + 840
33 UIKit 0x00232f9b UIApplicationMain + 1225
34 ctpp 0x00005bcd main + 141
35 libdyld.dylib 0x01e3a701 start + 1
36 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Look at this part closely:
reason: '[<ViewController 0x8cbc260> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key elso.'
Somewhere you are using the key 'elso'. Is this the right key or a typo? Looks like a weird key to me, it doesn't tell me anything about the value it points to.