我的代码中出现“Thread 1:Signal SIGABRT Error”。我试图将我的代码重新加载到一个不同的XCode项目中,将代码插入到try / catch块中,清理和重建项目,尝试检查故事板上的一些连接,我仍然可以在这里解决任何问题。 / p>
以下是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]);
}
}
}
错误显示在这行代码中:
return UIApplicationMain(argc, argv, nil, NSStringFromClass([SFAppDelegate class]));
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)
非常感谢任何帮助。
答案 0 :(得分:0)
您的代码未实现[Exercise viewQuizResponseUrl]
或[Exercise getQuizResponseUrl]
..只需检查练习对象是否有效初始化或上述方法是有效拼写。