信号SIGABRT错误

时间:2014-04-26 17:33:15

标签: ios objective-c sigabrt

如果我在iOS模拟器(iPhone 4英寸32位iOS 7.1)中运行我的应用程序,我会收到此错误:

线程1:信号SIGABRT

错误:

int main(int argc, char * argv[])
{
   @autoreleasepool 
   {
       return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
   }
}

我希望有人可以帮助我。

控制台报告:

   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)

2 个答案:

答案 0 :(得分:0)

名为ViewController的类中的Filter1不存在。您可能已从代码中删除了插座或某些内容,但忘记从故事板中的实际对象中删除该链接。右键单击链接到Filter1的内容,看看它是否还有旧的(已删除的)连接。

答案 1 :(得分:0)

您似乎设置了一个动作为filter1:的按钮,但您从未将filter1:方法添加到ViewController课程。

也许您将方法定义为filter1而不是filter1:。冒号有很大的不同。

如果您的方法确实如此:

- (IBAction)filter1 {
}

然后,您需要更改按钮以使用选择器filter1而不是filter1:。或者将方法更改为:

- (IBAction)filter1:(id)sender {
}