【发布时间】:2011-11-13 14:38:01
【问题描述】:
我最近更新了 Xcode 以使用 iOS5 SDK。由于更新我的应用程序在启动屏幕上崩溃。以前该应用程序可在 4.3 和 iPhone(iOS5 之前)上运行。
错误指向:int retVal = UIApplicationMain(argc, argv, nil, nil);
在main.m中
控制台返回以下内容:
GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 8 20:32:45 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 3903.
2011-11-13 22:11:05.421 BlastCalc[3903:10d03] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x5c1b600> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key averageChargeLengthLabel.'
*** Call stack at first throw:
(
0 CoreFoundation 0x00e7b5a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00fcf313 objc_exception_throw + 44
2 CoreFoundation 0x00e7b4e1 -[NSException raise] + 17
3 Foundation 0x0084d677 _NSSetUsingKeyValueSetter + 135
4 Foundation 0x0084d5e5 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
5 UIKit 0x002c930c -[UIRuntimeOutletConnection connect] + 112
6 CoreFoundation 0x00df18cf -[NSArray makeObjectsPerformSelector:] + 239
7 UIKit 0x002c7d23 -[UINib instantiateWithOwner:options:] + 1041
8 UIKit 0x002c9ab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
9 UIKit 0x000cf17a -[UIApplication _loadMainNibFile] + 172
10 UIKit 0x000cfcf4 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 291
11 UIKit 0x000da617 -[UIApplication handleEvent:withNewEvent:] + 1533
12 UIKit 0x000d2abf -[UIApplication sendEvent:] + 71
13 UIKit 0x000d7f2e _UIApplicationHandleEvent + 7576
14 GraphicsServices 0x0132f992 PurpleEventCallback + 1550
15 CoreFoundation 0x00e5c944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
16 CoreFoundation 0x00dbccf7 __CFRunLoopDoSource1 + 215
17 CoreFoundation 0x00db9f83 __CFRunLoopRun + 979
18 CoreFoundation 0x00db9840 CFRunLoopRunSpecific + 208
19 CoreFoundation 0x00db9761 CFRunLoopRunInMode + 97
20 UIKit 0x000cf7d2 -[UIApplication _run] + 623
21 UIKit 0x000dbc93 UIApplicationMain + 1160
22 BlastCalc 0x00002979 main + 121
23 BlastCalc 0x000028f5 start + 53
24 ??? 0x00000001 0x0 + 1
)
terminate called throwing an exceptionsharedlibrary apply-load-rules all
(gdb)
我在旧 Xcode 版本和 SDK 中阅读了很多与此相关的修复程序,但是,我无法找到解决我的问题的方法。我对 iOS 不是很精通,对 5 的更改让我很吃惊。
如果有人能指出我将不胜感激的答案的方向。提前谢谢大家。
目前,我正在将我的应用程序杀死,几乎已经决定从头开始重新编码。我曾经尝试过一次,但是整个故事板的事情使它变得困难。
【问题讨论】:
-
此外,该应用程序根本无法运行。即使从已知有效的快照恢复。干杯