iOS线程1信号SIGABRT错误

iOS线程1信号SIGABRT错误,ios,xcode8,sigabrt,Ios,Xcode8,Sigabrt,我的代码中出现了“线程1:信号SIGABRT错误”。我尝试将代码重新加载到不同的XCode项目中,将类似的代码插入try/catch块中,清理并重建项目,尝试在脚本上检查一些连接,我仍然可以在这里解决任何问题 以下是main.m文件的源代码: #import <UIKit/UIKit.h> #import "SFAppDelegate.h" int main(int argc, char * argv[]) { @autoreleasepool { @try { retur

我的代码中出现了“线程1:信号SIGABRT错误”。我尝试将代码重新加载到不同的XCode项目中,将类似的代码插入try/catch块中,清理并重建项目,尝试在脚本上检查一些连接,我仍然可以在这里解决任何问题

以下是main.m文件的源代码:

#import <UIKit/UIKit.h>
#import "SFAppDelegate.h"

int main(int argc, char * argv[]) {
@autoreleasepool {
@try {
    return UIApplicationMain(argc, argv, nil, NSStringFromClass([SFAppDelegate class]));
} 
@catch (NSException *e) {
    NSLog(@"CRASH: %@", e);
    NSLog(@"Stack Trace: %@", [e callStackSymbols]);
}
}
}
XCode控制台显示以下错误:

*** First throw call stack:

(

0   CoreFoundation   0x000000010a032d4b __exceptionPreprocess + 171

1   libobjc.A.dylib   0x000000010967321e objc_exception_throw + 48

2   CoreFoundation   0x000000010a0a2f04 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132

3   CoreFoundation   0x0000000109fb8005 ___forwarding___ + 1013

4   CoreFoundation   0x0000000109fb7b88 _CF_forwarding_prep_0 + 120

5   ExApp   0x00000001060f954b -[Exercise getQuizResponseUrl] + 43

6   ExApp   0x0000000106117550 -[SFPreviewVideoView configureWithThumbnailProvider:duration:videoURLString:] + 816

7   ExApp   0x00000001061171bd -[SFPreviewVideoView configureWithThumbnailProvider:videoURLString:duration:delegate:] + 157

8   ExApp   0x00000001060cab6d -[SFQuestionsViewController tableView:cellForRowAtIndexPath:] + 1869

9   UIKit   0x0000000107a7e584 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 757

10  UIKit   0x0000000107a7e7e2 -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 74

11  UIKit   0x0000000107a522b0 -[UITableView _updateVisibleCellsNow:isRecursive:] + 3295

12  UIKit   0x0000000107a87b64 -[UITableView _performWithCachedTraitCollection:] + 110

13  UIKit   0x0000000107a6e3be -[UITableView layoutSubviews] + 222

14  UIKit   0x00000001079d5ab8 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1237

15  QuartzCore   0x0000000107602bf8 -[CALayer layoutSublayers] + 146

16  QuartzCore   0x00000001075f6440 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366

17  UIKit   0x00000001079c3928 -[UIView(Hierarchy) layoutBelowIfNeeded] + 1509

18  ExApp   0x00000001060dd0b3 -[SFBrandingTableFooterView updateBrandingView:forTableView:updatelayout:] + 147

19  ExApp   0x00000001060dcd5e -[SFBrandingTableFooterView showBrandingFooterViewAndUpdateLayout:animated:] + 446

20  ExApp   0x00000001060ca0a4 __46-[SFQuestionsViewController refreshDataSource]_block_invoke.147 + 964

21  ExApp   0x00000001060d3c79 __41-[SFBrain requestObject:completionBlock:]_block_invoke_3 + 105

22  libdispatch.dylib   0x000000010b508978 _dispatch_call_block_and_release + 12

23  libdispatch.dylib   0x000000010b5320cd _dispatch_client_callout + 8

24  libdispatch.dylib   0x000000010b5128a4 _dispatch_main_queue_callback_4CF + 406

25  CoreFoundation   0x0000000109ff6e49 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9

26  CoreFoundation   0x0000000109fbc37d __CFRunLoopRun + 2205

27  CoreFoundation   0x0000000109fbb884 CFRunLoopRunSpecific + 420

28  GraphicsServices   0x000000010dfbfa6f GSEventRunModal + 161

29  UIKit   0x0000000107910c68 UIApplicationMain + 159

30  ExApp   0x00000001060c532e main + 142

31  libdyld.dylib   0x000000010b57e68d start + 1

32  ???   0x0000000000000001 0x0 + 1
)

libc++abi.dylib: terminating with uncaught exception of type NSException

(lldb) 

非常感谢您提供的任何帮助。

您的代码未实现
[Exercise viewQuizResponseUrl]
[Exercise getQuizResponseUrl]
。。只需检查Exercise object是否有效初始化或以上方法是否有效拼写。

您显示的代码没有问题,控制台错误也不匹配。您是否看到
第一次抛出调用堆栈上的任何其他行
?是的,它们是:2016-12-31 18:34:22.797 ExApp[26503:1590552]品牌页脚Y偏移量=243.333332 2016-12-31 18:34:23.005 ExApp[26503:1590552]-[exerce viewQuizResponseUrl]:发送到实例0x6080029bc10 2016-12-31 18:34:23.016 ExApp[26503:1590552]***由于未捕获的异常“NSInvalidArgumentException”终止应用程序,原因:'-[exerce viewQuizResponseUrl]:未识别的选择器发送到实例0x6080029BC10'还有很多,但这是我可以发布的内容。
*** First throw call stack:

(

0   CoreFoundation   0x000000010a032d4b __exceptionPreprocess + 171

1   libobjc.A.dylib   0x000000010967321e objc_exception_throw + 48

2   CoreFoundation   0x000000010a0a2f04 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132

3   CoreFoundation   0x0000000109fb8005 ___forwarding___ + 1013

4   CoreFoundation   0x0000000109fb7b88 _CF_forwarding_prep_0 + 120

5   ExApp   0x00000001060f954b -[Exercise getQuizResponseUrl] + 43

6   ExApp   0x0000000106117550 -[SFPreviewVideoView configureWithThumbnailProvider:duration:videoURLString:] + 816

7   ExApp   0x00000001061171bd -[SFPreviewVideoView configureWithThumbnailProvider:videoURLString:duration:delegate:] + 157

8   ExApp   0x00000001060cab6d -[SFQuestionsViewController tableView:cellForRowAtIndexPath:] + 1869

9   UIKit   0x0000000107a7e584 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 757

10  UIKit   0x0000000107a7e7e2 -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 74

11  UIKit   0x0000000107a522b0 -[UITableView _updateVisibleCellsNow:isRecursive:] + 3295

12  UIKit   0x0000000107a87b64 -[UITableView _performWithCachedTraitCollection:] + 110

13  UIKit   0x0000000107a6e3be -[UITableView layoutSubviews] + 222

14  UIKit   0x00000001079d5ab8 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1237

15  QuartzCore   0x0000000107602bf8 -[CALayer layoutSublayers] + 146

16  QuartzCore   0x00000001075f6440 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366

17  UIKit   0x00000001079c3928 -[UIView(Hierarchy) layoutBelowIfNeeded] + 1509

18  ExApp   0x00000001060dd0b3 -[SFBrandingTableFooterView updateBrandingView:forTableView:updatelayout:] + 147

19  ExApp   0x00000001060dcd5e -[SFBrandingTableFooterView showBrandingFooterViewAndUpdateLayout:animated:] + 446

20  ExApp   0x00000001060ca0a4 __46-[SFQuestionsViewController refreshDataSource]_block_invoke.147 + 964

21  ExApp   0x00000001060d3c79 __41-[SFBrain requestObject:completionBlock:]_block_invoke_3 + 105

22  libdispatch.dylib   0x000000010b508978 _dispatch_call_block_and_release + 12

23  libdispatch.dylib   0x000000010b5320cd _dispatch_client_callout + 8

24  libdispatch.dylib   0x000000010b5128a4 _dispatch_main_queue_callback_4CF + 406

25  CoreFoundation   0x0000000109ff6e49 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9

26  CoreFoundation   0x0000000109fbc37d __CFRunLoopRun + 2205

27  CoreFoundation   0x0000000109fbb884 CFRunLoopRunSpecific + 420

28  GraphicsServices   0x000000010dfbfa6f GSEventRunModal + 161

29  UIKit   0x0000000107910c68 UIApplicationMain + 159

30  ExApp   0x00000001060c532e main + 142

31  libdyld.dylib   0x000000010b57e68d start + 1

32  ???   0x0000000000000001 0x0 + 1
)

libc++abi.dylib: terminating with uncaught exception of type NSException

(lldb)