xcode 有错误线程 1:程序收到信号“SIGABRT”;
我有一段与 MapKit 相关的代码,它在我的 iMac 上运行良好,但在我的 MacBook 日志记录中出错,
Thread 1:Program received signal 'SIGABRT'
这是完整的日志,
GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:52:12 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".Attaching to process 2416.
2011-06-08 09:58:31.312 iCodeBlogMap[2416:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<iCodeBlogMapViewController 0x5b3f830> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key tableview.'
*** Call stack at first throw:
(
0 CoreFoundation 0x00f545a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x010a8313 objc_exception_throw + 44
2 CoreFoundation 0x00f544e1 -[NSException raise] + 17
3 Foundation 0x00798677 _NSSetUsingKeyValueSetter + 135
4 Foundation 0x007985e5 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
5 UIKit 0x0021430c -[UIRuntimeOutletConnection connect] + 112
6 CoreFoundation 0x00eca8cf -[NSArray makeObjectsPerformSelector:] + 239
7 UIKit 0x00212d23 -[UINib instantiateWithOwner:options:] + 1041
8 UIKit 0x00214ab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
9 UIKit 0x000ca628 -[UIViewController _loadViewFromNibNamed:bundle:] + 70
10 UIKit 0x000c8134 -[UIViewController loadView] + 120
11 UIKit 0x000c800e -[UIViewController view] + 56
12 UIKit 0x0003bd42 -[UIWindow addRootViewControllerViewIfPossible] + 51
13 iCodeBlogMap 0x00002057 -[iCodeBlogMapAppDelegate application:didFinishLaunchingWithOptions:] + 135
14 UIKit 0x00018c89 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1163
15 UIKit 0x0001ad88 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 439
16 UIKit 0x00025617 -[UIApplication handleEvent:withNewEvent:] + 1533
17 UIKit 0x0001dabf -[UIApplication sendEvent:] + 71
18 UIKit 0x00022f2e _UIApplicationHandleEvent + 7576
19 GraphicsServices 0x0118d992 PurpleEventCallback + 1550
20 CoreFoundation 0x00f35944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
21 CoreFoundation 0x00e95cf7 __CFRunLoopDoSource1 + 215
22 CoreFoundation 0x00e92f83 __CFRunLoopRun + 979
23 CoreFoundation 0x00e92840 CFRunLoopRunSpecific + 208
24 CoreFoundation 0x00e92761 CFRunLoopRunInMode + 97
25 UIKit 0x0001a7d2 -[UIApplication _run] + 623
26 UIKit 0x00026c93 UIApplicationMain + 1160
27 iCodeBlogMap 0x00001f99 main + 121
28 iCodeBlogMap 0x00001f15 start + 53
)
terminate called after throwing an instance of 'NSException'
sharedlibrary apply-load-rules all
Current language: auto; currently objective-c
(gdb)
如何修复此错误?
I have a piece of code related to MapKit which works fine on my iMac but errors out on my MacBook logging,
Thread 1:Program received signal 'SIGABRT'
and here is the entire log,
GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:52:12 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".Attaching to process 2416.
2011-06-08 09:58:31.312 iCodeBlogMap[2416:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<iCodeBlogMapViewController 0x5b3f830> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key tableview.'
*** Call stack at first throw:
(
0 CoreFoundation 0x00f545a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x010a8313 objc_exception_throw + 44
2 CoreFoundation 0x00f544e1 -[NSException raise] + 17
3 Foundation 0x00798677 _NSSetUsingKeyValueSetter + 135
4 Foundation 0x007985e5 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
5 UIKit 0x0021430c -[UIRuntimeOutletConnection connect] + 112
6 CoreFoundation 0x00eca8cf -[NSArray makeObjectsPerformSelector:] + 239
7 UIKit 0x00212d23 -[UINib instantiateWithOwner:options:] + 1041
8 UIKit 0x00214ab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
9 UIKit 0x000ca628 -[UIViewController _loadViewFromNibNamed:bundle:] + 70
10 UIKit 0x000c8134 -[UIViewController loadView] + 120
11 UIKit 0x000c800e -[UIViewController view] + 56
12 UIKit 0x0003bd42 -[UIWindow addRootViewControllerViewIfPossible] + 51
13 iCodeBlogMap 0x00002057 -[iCodeBlogMapAppDelegate application:didFinishLaunchingWithOptions:] + 135
14 UIKit 0x00018c89 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1163
15 UIKit 0x0001ad88 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 439
16 UIKit 0x00025617 -[UIApplication handleEvent:withNewEvent:] + 1533
17 UIKit 0x0001dabf -[UIApplication sendEvent:] + 71
18 UIKit 0x00022f2e _UIApplicationHandleEvent + 7576
19 GraphicsServices 0x0118d992 PurpleEventCallback + 1550
20 CoreFoundation 0x00f35944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
21 CoreFoundation 0x00e95cf7 __CFRunLoopDoSource1 + 215
22 CoreFoundation 0x00e92f83 __CFRunLoopRun + 979
23 CoreFoundation 0x00e92840 CFRunLoopRunSpecific + 208
24 CoreFoundation 0x00e92761 CFRunLoopRunInMode + 97
25 UIKit 0x0001a7d2 -[UIApplication _run] + 623
26 UIKit 0x00026c93 UIApplicationMain + 1160
27 iCodeBlogMap 0x00001f99 main + 121
28 iCodeBlogMap 0x00001f15 start + 53
)
terminate called after throwing an instance of 'NSException'
sharedlibrary apply-load-rules all
Current language: auto; currently objective-c
(gdb)
How can I fix this error?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来您的代码在加载 iCodeBlogMapViewController nib 文件并尝试连接名为“tableview”的 IBOutlet 时崩溃了。如果您最近修改了源代码或 nib 文件,我会检查以确保它们仍然同步;您的代码可能在 iMac 上编译,因为您编译过一次,更改了源代码或笔尖,并且没有执行“清理”操作来删除旧的目标文件。
It looks like your code is crashing as it loads your iCodeBlogMapViewController nib file and tries to wire up an IBOutlet named "tableview". If you've modified your source code or nib file recently, I'd check to make sure they're still in sync; it may be that your code compiles on the iMac because you compiled it once, changed the source or the nib, and haven't done a "clean" to remove old object files.