I get this error if I'll run my App in the iOS Simulator (iPhone 4-inch 32-bit iOS 7.1):
Thread 1: signal SIGABRT
Error:
int main(int argc, char * argv[])
{
#autoreleasepool
{
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
I hope someone can help me.
Console Report:
2014-04-26 14:09:24.039 Picxxr[2184:60b] -[ViewController filter1:]: unrecognized selector sent to instance 0x964d580
2014-04-26 14:09:24.041 Picxxr[2184:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ViewController filter1:]: unrecognized selector sent to instance 0x964d580'
*** First throw call stack:
(
0 CoreFoundation 0x01d651e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x01ae48e5 objc_exception_throw + 44
2 CoreFoundation 0x01e02243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x01d5550b ___forwarding___ + 1019
4 CoreFoundation 0x01d550ee _CF_forwarding_prep_0 + 14
5 libobjc.A.dylib 0x01af6880 -[NSObject performSelector:withObject:withObject:] + 77
6 UIKit 0x007a63b9 -[UIApplication sendAction:to:from:forEvent:] + 108
7 UIKit 0x007a6345 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
8 UIKit 0x008a7bd1 -[UIControl sendAction:to:forEvent:] + 66
9 UIKit 0x008a7fc6 -[UIControl _sendActionsForEvents:withEvent:] + 577
10 UIKit 0x008a7243 -[UIControl touchesEnded:withEvent:] + 641
11 UIKit 0x00b3c2e3 _UIGestureRecognizerUpdate + 7166
12 UIKit 0x007e5a5a -[UIWindow _sendGesturesForEvent:] + 1291
13 UIKit 0x007e6971 -[UIWindow sendEvent:] + 1021
14 UIKit 0x007b85f2 -[UIApplication sendEvent:] + 242
15 UIKit 0x007a2353 _UIApplicationHandleEventQueue + 11455
16 CoreFoundation 0x01cee77f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
17 CoreFoundation 0x01cee10b __CFRunLoopDoSources0 + 235
18 CoreFoundation 0x01d0b1ae __CFRunLoopRun + 910
19 CoreFoundation 0x01d0a9d3 CFRunLoopRunSpecific + 467
20 CoreFoundation 0x01d0a7eb CFRunLoopRunInMode + 123
21 GraphicsServices 0x032155ee GSEventRunModal + 192
22 GraphicsServices 0x0321542b GSEventRun + 104
23 UIKit 0x007a4f9b UIApplicationMain + 1225
24 Picxxr 0x0000cd7d main + 141
25 libdyld.dylib 0x03e0c701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Filter1 in a class called ViewController doesn't exist. You may have deleted an outlet or something from the code, but forgot to delete the link from the actual object in the storyboard. Right click on what was linked to Filter1 and see if it has the old (deleted) connection still.
It looks like you setup a button with an action of filter1: but you never added the filter1: method to your ViewController class.
Perhaps you defined the method as filter1 instead of filter1:. The colon makes a huge difference.
If your method is really:
- (IBAction)filter1 {
}
Then you need to change the button to use the selector filter1 instead of filter1:. Or change the method to:
- (IBAction)filter1:(id)sender {
}
Related
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
The first view controller of my project crashed when segue'd to from another view controller - but not when it loads. I get this error message:
2016-01-05 20:06:33.836 collaboration[48812:1788623] -[collaboration.createAccountViewController loginExisting:]: unrecognized selector sent to instance 0x796cc950
2016-01-05 20:06:33.849 collaboration[48812:1788623] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[collaboration.createAccountViewController loginExisting:]: unrecognized selector sent to instance 0x796cc950'
*** First throw call stack:
(
0 CoreFoundation 0x00396a14 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x022c5e02 objc_exception_throw + 50
2 CoreFoundation 0x0039fd63 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x002dd6bd ___forwarding___ + 1037
4 CoreFoundation 0x002dd28e _CF_forwarding_prep_0 + 14
5 libobjc.A.dylib 0x022da0b5 -[NSObject performSelector:withObject:withObject:] + 84
6 UIKit 0x00df7b79 -[UIApplication sendAction:to:from:forEvent:] + 118
7 UIKit 0x00df7af8 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64
8 UIKit 0x00f978f8 -[UIControl sendAction:to:forEvent:] + 79
9 UIKit 0x00f97c78 -[UIControl _sendActionsForEvents:withEvent:] + 408
10 UIKit 0x00f96c7e -[UIControl touchesEnded:withEvent:] + 714
11 UIKit 0x00e74182 -[UIWindow _sendTouchesForEvent:] + 1095
12 UIKit 0x00e75220 -[UIWindow sendEvent:] + 1159
13 UIKit 0x00e19f93 -[UIApplication sendEvent:] + 266
14 UIKit 0x00def668 _UIApplicationHandleEventQueue + 7802
15 CoreFoundation 0x002b06ff __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
16 CoreFoundation 0x002a638b __CFRunLoopDoSources0 + 523
17 CoreFoundation 0x002a57a8 __CFRunLoopRun + 1032
18 CoreFoundation 0x002a50e6 CFRunLoopRunSpecific + 470
19 CoreFoundation 0x002a4efb CFRunLoopRunInMode + 123
20 GraphicsServices 0x07075664 GSEventRunModal + 192
21 GraphicsServices 0x070754a1 GSEventRun + 104
22 UIKit 0x00df5bfa UIApplicationMain + 160
23 collaboration 0x00085a3c main + 140
24 libdyld.dylib 0x039bca21 start + 1
25 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
As you can see, it cites the variable 'loginExisting' as the issue, however loginExisting is not a variable on in any of my scripts (it was before but has since been removes). How can I 'refresh' XCode so that it forgets about the absent variable? I have tried restarting my machine and cleaning XCode but have had not success.
Thank you for your help.
Go to your storyboard that's crashing and right click the yellow icon at the top of the ViewController.
After right clicking, look towards the bottom where it says "Received actions" and delete all of the actions pertaining to the loginExisting method.
This is one of many possible culprits, but this tends to be the most common.
EDIT: It's also possible that you have a property (IBOutlet) connected to the storyboard that no longer exists which will throw an error.
i have a segmented control which, depending on what is selected, is meant to allocate a value to a NS string, as follows:
-(IBAction)driverKnownIndexChanged{
switch (self.driverKnown.selectedSegmentIndex) {
case 0:
driverKnownResponse = #"Yes";
break;
case 1:
driverKnownResponse = #"No";
break;
default:
break;
}
}
however, it is throwing a SIGABRT at the following line:
#import "RoadSafetyAppAppDelegate.h"
int main(int argc, char * argv[])
{
#autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([RoadSafetyAppAppDelegate class]));
}
}
and here is the console output:
2014-01-30 13:32:16.403 Road Safety App V2[3873:70b] -[DobInAHoonViewController driverKnown:]: unrecognized selector sent to instance 0xcd23440
2014-01-30 13:32:16.409 Road Safety App V2[3873:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[DobInAHoonViewController driverKnown:]: unrecognized selector sent to instance 0xcd23440'
*** First throw call stack:
(
0 CoreFoundation 0x01d8f7e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x01b0f8e5 objc_exception_throw + 44
2 CoreFoundation 0x01e2c843 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x01d7fb0b ___forwarding___ + 1019
4 CoreFoundation 0x01d7f6ee _CF_forwarding_prep_0 + 14
5 libobjc.A.dylib 0x01b2182b -[NSObject performSelector:withObject:] + 70
6 UIKit 0x007d8309 -[UIApplication sendAction:to:from:forEvent:] + 108
7 UIKit 0x007d8295 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
8 UIKit 0x008d90a1 -[UIControl sendAction:to:forEvent:] + 66
9 UIKit 0x008d9496 -[UIControl _sendActionsForEvents:withEvent:] + 577
10 UIKit 0x008d90d6 -[UIControl sendActionsForControlEvents:] + 48
11 UIKit 0x00947572 -[UISegmentedControl _setSelectedSegmentIndex:notify:animate:] + 598
12 UIKit 0x009498c3 -[UISegmentedControl touchesEnded:withEvent:] + 175
13 UIKit 0x00b6ccc3 _UIGestureRecognizerUpdate + 7166
14 UIKit 0x008177ca -[UIWindow _sendGesturesForEvent:] + 1291
15 UIKit 0x008186e1 -[UIWindow sendEvent:] + 1021
16 UIKit 0x007ea542 -[UIApplication sendEvent:] + 242
17 UIKit 0x007d42f3 _UIApplicationHandleEventQueue + 11455
18 CoreFoundation 0x01d18d7f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
19 CoreFoundation 0x01d1870b __CFRunLoopDoSources0 + 235
20 CoreFoundation 0x01d357ae __CFRunLoopRun + 910
21 CoreFoundation 0x01d34fd3 CFRunLoopRunSpecific + 467
22 CoreFoundation 0x01d34deb CFRunLoopRunInMode + 123
23 GraphicsServices 0x0344f4ed GSEventRunModal + 192
24 GraphicsServices 0x0344f32a GSEventRun + 104
25 UIKit 0x007d6eeb UIApplicationMain + 1225
26 Road Safety App V2 0x00002f9d main + 141
27 libdyld.dylib 0x0308470d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
and Ideas as to why i am having this problem? and a solution would also be appreciated.
This line switch (self.driverKnown.selectedSegmentIndex) { is accessing a property named driverKnown but that driver is unknown. The stack trace and exception are telling you that driverKnown is an undeclared or unknock getter method for the property.
The exception calls out DobInAHoonViewController which in that line of code would be the self. Is driverKnown suppose to be the name of your UISegmentedControl? Can we see the creation of said UISegmentedControl?
your method doesn't know selectedSegmentIndex . because you not value of segment value changed
UISegmentControl *mySegmentedControl = [[UISegmentControl alloc]init];
[mySegmentedControl addTarget:self action:#selector(segmentValueChanged:) forControlEvents:UIControlEventValueChanged];
- (IBAction)segmentValueChanged:(id)sender {
UISegmentedControl *driverKnown = (UISegmentedControl *)sender;
switch (driverKnown.selectedSegmentIndex) {
case 0:
driverKnownResponse = #"Yes";
break;
case 1:
driverKnownResponse = #"No";
break;
default:
break;
}
}
I was messing with my storyboard with no code involved and got this error after I connected "Terms of use" button to a view controller. It was working fine before this action.
-I created and connected a class to Terms of Use View Controller
-I used action push segue to connect
2014-01-22 17:26:45.434 Project[1162:a0b] -[AboutViewController termsOfUseButton:]: unrecognized selector sent to instance 0x8c89d40
2014-01-22 17:26:45.437 Project[1162:a0b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AboutViewController termsOfUseButton:]: unrecognized selector sent to instance 0x8c89d40'
*** First throw call stack:
(
0 CoreFoundation 0x0173b5e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x014be8b6 objc_exception_throw + 44
2 CoreFoundation 0x017d8903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x0172b90b ___forwarding___ + 1019
4 CoreFoundation 0x0172b4ee _CF_forwarding_prep_0 + 14
5 libobjc.A.dylib 0x014d0874 -[NSObject performSelector:withObject:withObject:] + 77
6 UIKit 0x0022e0c2 -[UIApplication sendAction:to:from:forEvent:] + 108
7 UIKit 0x0022e04e -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
8 UIKit 0x003260c1 -[UIControl sendAction:to:forEvent:] + 66
9 UIKit 0x00326484 -[UIControl _sendActionsForEvents:withEvent:] + 577
10 UIKit 0x00325733 -[UIControl touchesEnded:withEvent:] + 641
11 UIKit 0x0026b51d -[UIWindow _sendTouchesForEvent:] + 852
12 UIKit 0x0026c184 -[UIWindow sendEvent:] + 1232
13 UIKit 0x0023fe86 -[UIApplication sendEvent:] + 242
14 UIKit 0x0022a18f _UIApplicationHandleEventQueue + 11421
15 CoreFoundation 0x016c483f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
16 CoreFoundation 0x016c41cb __CFRunLoopDoSources0 + 235
17 CoreFoundation 0x016e129e __CFRunLoopRun + 910
18 CoreFoundation 0x016e0ac3 CFRunLoopRunSpecific + 467
19 CoreFoundation 0x016e08db CFRunLoopRunInMode + 123
20 GraphicsServices 0x036909e2 GSEventRunModal + 192
21 GraphicsServices 0x03690809 GSEventRun + 104
22 UIKit 0x0022cd3b UIApplicationMain + 1225
23 Project 0x00003a9d main + 141
24 libdyld.dylib 0x01d77725 start + 0
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
(Lame but I found the solution after I finished writing the question)
The reason for this error is I created an IBAction-UIButton method on touch up inside.
I deleted that code and hoped the traces were deleted.
It seems it wasnt, I had to unconnect the touch up inside by clicking the X in red squared spot.
I would try recreating the button and the segue, maybe you changed the IBOutlet name by accident or any other thing.
GL HF