2014-03-29 4 views
0

내 응용 프로그램을 실행 한 후 내 AppDelegate.h에이 오류 메시지가 나타납니다. "스레드 1 : signal SIGABRT"오류가 발생한 곳을 내 코드 측면에 주석으로 표시했습니다. 아무도 제발 도와 줄 수 없어. 감사.실 1 : 신호 SIGABRT 누군가 나를 도울 수 있습니까?

2014-03-29 17:27:56.440 Game[3599:70b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x109c28520> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.' 
*** First throw call stack: 
(
    0 CoreFoundation      0x0000000101c1b795 __exceptionPreprocess + 165 
    1 libobjc.A.dylib      0x0000000101725991 objc_exception_throw + 43 
    2 CoreFoundation      0x0000000101c9fe69 -[NSException raise] + 9 
    3 Foundation       0x000000010130703a -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259 
    4 CoreFoundation      0x0000000101c17700 -[NSArray makeObjectsPerformSelector:] + 224 
    5 UIKit        0x00000001005d11b8 -[UINib instantiateWithOwner:options:] + 1131 
    6 UIKit        0x00000001005d2bb2 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 138 
    7 UIKit        0x000000010038781d -[UIApplication _loadMainNibFileNamed:bundle:] + 42 
    8 UIKit        0x0000000100386b1a -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 454 
    9 UIKit        0x0000000100397aab -[UIApplication handleEvent:withNewEvent:] + 3092 
    10 UIKit        0x0000000100397f1e -[UIApplication sendEvent:] + 79 
    11 UIKit        0x00000001003882be _UIApplicationHandleEvent + 618 
    12 GraphicsServices     0x0000000104977bb6 _PurpleEventCallback + 762 
    13 GraphicsServices     0x000000010497767d PurpleEventCallback + 35 
    14 CoreFoundation      0x0000000101b9d819 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41 
    15 CoreFoundation      0x0000000101b9d5ee __CFRunLoopDoSource1 + 478 
    16 CoreFoundation      0x0000000101bc6ab3 __CFRunLoopRun + 1939 
    17 CoreFoundation      0x0000000101bc5f33 CFRunLoopRunSpecific + 467 
    18 UIKit        0x00000001003864bd -[UIApplication _run] + 609 
    19 UIKit        0x0000000100388043 UIApplicationMain + 1010 
    20 Game        0x0000000100000f33 main + 115 
    21 libdyld.dylib      0x00000001032755fd start + 1 
) 
libc++abi.dylib: terminating with uncaught exception of type NSException 
+0

예외 중단 점을 추가하면 오류가 실제로 어디에서 발생했는지 표시 할 수 있습니다. xcode 화면의 왼쪽에있는 호출 스택을 보면보다 나은 표시가됩니다. – Pruthvikar

+0

이것은 이것에 대한 후속 질문 [여기] (http://stackoverflow.com/questions/22737673/missing-at-start-of-message-send-expression)입니까? 그렇다면 여기에 게시 한 스택 추적을 게시 할 수 있습니까? – Alfonso

+0

스택 추적이 무엇인지 알지 못합니다. 예, 후속 조치입니다. 죄송합니다. xcode를 처음 사용하면서 모든 것을 연구했지만 아직 해결책을 찾지 못했습니다. – user3466875

답변

0
Game[3599:70b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x109c28520> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.' 

위의 라인은 당신이 재산이라고보기에 액세스하려고하는 것을 의미하지만 클래스는 없습니다 : 여기

#import <UIKit/UIKit.h> 

#import "AppDelegate.h" 

int main(int argc, char * argv[]) 
{ 
    @autoreleasepool { 
     return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); //Thread 1: signal SIGABRT 
    } 
} 

내가지고있어 스택 추적입니다 그 이름의 속성. 실제로보기가없는 객체에서 view 속성을 호출하는 경우 (컴파일러에서 더 많이 잡힐 가능성이 있음) 또는 Interface Builder에서보기 콘트롤러의보기 콘센트를 설정하지 않았습니다.

App Delegate에서로드중인 뷰 컨트롤러에 뷰 콘센트가 IB로 연결되어 있는지 확인하십시오.

+1

실제로 게임의 클래스가 아닌 오류 메시지를 기반으로합니다. 그러나 클래스'UIApplication'. 게임이 응용 프로그램 이름 인 것 같습니다. – Alfonso

+0

네, 맞습니다. 내 답변을 수정했습니다. – jancakes