, 콘솔에 나는NSStatusItem "KCG ..."오류 몇 가지 이유를 들어
...납니다 잘못된 창
: kCGErrorFailure는 : CGErrorBreakpoint @ 2 중단 점을 설정()에서 으로 기록됩니다. 이 코드 (내 생각)와
- (void)applicationDidResignActive:(NSNotification*)aNotification
{
statusItem = [[NSStatusBar systemStatusBar]
statusItemWithLength:NSVariableStatusItemLength];
[statusItem setHighlightMode:YES];
[statusItem setEnabled:YES];
//Set menubar item's tooltip
[statusItem setToolTip:@"Nucleus"];
[statusItem setMenu:theMenu];
//Set the menubar item's title
[statusItem setTitle:[NSString stringWithString:@"N"]];
[statusItem retain];
}
- (void)applicationDidBecomeActive:(NSNotification*)aNotification
{
[[NSStatusBar systemStatusBar] removeStatusItem:statusItem];
}
나는이 스택 추적 믿습니다 (?) :
0x00007fff8667349b < 0000> 푸시 %의 RBP
0x00007fff8667349c < +0001> mov % rsp, % rbp
0x00007fff8667349f < +0004> mov % edi, % eax
0x00007fff866734a1 < 0006> leaveq
0x00007fff866734a2 < 0007> retq
0x00007fff866734a3 < 0008> NOP
이유는 무엇입니까? 이 문제를 어떻게 해결할 수 있습니까?
Mac에서 Cocoa를 사용하고 있습니까?
스택 추적을 게시 할 수 있습니까? 프로그램이 충돌 할 때 프로그램이 무엇을하는지 정확히 알 수 있습니다. – ughoavgfhw
죄송합니다.하지만 "스택 추적"은 정확히 어떻게 찾습니까? –
추가 한 항목은 현재 함수 (첫 번째 인수를 반환 함)의 어셈블리입니다. 스택 트레이스는 호출 된 함수 목록입니다. 어셈블리가 있기 때문에 Xcode가 예외를 잡았고 프로그램이 실제로 중단되는 것을 막았 기 때문에 Xcode의 디버거 창에서 스택 추적을 얻어야합니다. 기본보기에서는 왼쪽 상단 구석에 있습니다. 그것은 당신이 현재 최상위에있는 기능과 아래에 그것을 호출 한 기능을 가지고 있습니다. – ughoavgfhw