iPhone App在主要版本中崩溃

时间:2011-02-26 01:16:34

标签: iphone objective-c crash main

它在主要功能处崩溃:

int retVal = UIApplicationMain(argc, argv, nil, nil);

这是调试输出:

#0  0x33bd52d4 in __kill
#1  0x33bd52ca in kill
#2  0x33bd52bc in raise
#3  0x33be9d78 in abort
#4  0x31bdba26 in __gnu_cxx::__verbose_terminate_handler
#5  0x3347c59a in _objc_terminate
#6  0x31bd9df8 in __cxxabiv1::__terminate
#7  0x31bd9e4c in std::terminate
#8  0x31bd9f1c in __cxa_throw
#9  0x3347b4ca in objc_exception_throw
#10 0x33ac0704 in -[NSException raise]
#11 0x3367db4e in -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:]
#12 0x3367d03a in _NSSetUsingKeyValueSetter
#13 0x3367eda2 in -[NSObject(NSKeyValueCoding) setValue:forKey:]
#14 0x33630b16 in -[NSObject(NSKeyValueCoding) setValue:forKeyPath:]
#15 0x3224c60e in -[UIRuntimeOutletConnection connect]
#16 0x33a63fc6 in -[NSObject(NSObject) performSelector:]
#17 0x33a6cd50 in -[NSArray makeObjectsPerformSelector:]
#18 0x3224b576 in -[UINib instantiateWithOwner:options:]
#19 0x3224cb38 in -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:]
#20 0x3209e870 in -[UIApplication _loadMainNibFile]
#21 0x3209a1fc in -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:]
#22 0x3206648a in -[UIApplication handleEvent:withNewEvent:]
#23 0x32065ec8 in -[UIApplication sendEvent:]
#24 0x32065906 in _UIApplicationHandleEvent
#25 0x33b0ef02 in PurpleEventCallback
#26 0x33a556fe in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__
#27 0x33a556c2 in __CFRunLoopDoSource1
#28 0x33a47f7c in __CFRunLoopRun
#29 0x33a47c86 in CFRunLoopRunSpecific
#30 0x33a47b8e in CFRunLoopRunInMode
#31 0x32099308 in -[UIApplication _run]
#32 0x32096e92 in UIApplicationMain
#33 0x0000288a in main at main.m:14

有人能指出我正确的方向吗?

1 个答案:

答案 0 :(得分:1)

查看堆栈跟踪,似乎应用程序在加载主NIB文件时失败。

在这种情况下,完整的异常消息可能也会在控制台中结束。这应该会给你一个错误的线索。如果您需要帮助,请在此处发布。