xcode有错误线程1:编程接收信号'SIGABRT'

时间:2011-06-08 15:55:25

标签: objective-c ios xcode4 mapkit

我有一段与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) 

如何解决此错误?

1 个答案:

答案 0 :(得分:1)

看起来您的代码崩溃了,因为它加载了您的iCodeBlogMapViewController nib文件,并尝试连接名为“tableview”的IBOutlet。如果您最近修改了源代码或nib文件,我会检查以确保它们仍处于同步状态;可能是您的代码在iMac上编译,因为您编译了一次,更改了源或nib,并且还没有“干净”来删除旧的目标文件。