2011-02-26 234 views
-1

它在該行崩潰的主要功能:iPhone應用程序崩潰的主要

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

(幾乎)每次崩潰都會發生在調用堆棧底部的'UIApplicationMain',因爲您的主線程將其所有時間花費在該方法或其後代中。但那不是你要找的。加載應用程序的主要NIB文件(注意'_loadMainNibFile')時,您的應用程序崩潰,可能是因爲您在Interface Builder中製作了錯誤的連接。你在控制檯中得到什麼異常/錯誤信息? – 2011-02-26 01:20:53

回答

1

看着堆棧跟蹤,似乎應用程序加載它的主要NIB文件時失敗。

在這種情況下,完整的異常消息可能也會在控制檯中結束。這應該讓你知道什麼地方出了問題。在這裏發佈,如果你需要幫助。

+0

這只是因爲我在Xcode中刪除了一個IBOutlet,並忘記刪除IB中的連接..多麼愚蠢。不會再犯這個錯誤..謝謝你的答案,歡呼 – 2011-02-26 07:15:15