2013-03-21 44 views
0

我的一些用戶報告說他們有時會收到上述錯誤。不幸的是,我不能告訴日誌文件中的任何內容。代碼中的某個對象可能被過度釋放。我能以某種方式捕捉並記錄它嗎?未捕獲到的系統異常:信號11

通常情況下,我會與儀器和NSZobieEnabled去,但不幸的是,它不會發生在我的機器上。有沒有機會記錄對象?

1 ExceptionHandling     0x00000001000879e2 -[NSExceptionHandler _handleException:mask:] + 168 
    2 ExceptionHandling     0x00000001000877ba NSExceptionHandlerUncaughtSignalHandler + 35 
    3 libsystem_c.dylib     0x00007fff9836d8ea _sigtramp + 26 
    4 ???         0x0000000001440013 0x0 + 21233683 
    5 CoreFoundation      0x00007fff985b525f -[NSArray initWithArray:range:copyItems:] + 591 
    6 AppKit        0x00007fff94a193f3 recursivelyEncodeInvalidPersistentState + 1118 
    7 AppKit        0x00007fff94a194a6 recursivelyEncodeInvalidPersistentState + 1297 
    8 AppKit        0x00007fff94a194a6 recursivelyEncodeInvalidPersistentState + 1297 
    9 AppKit        0x00007fff94a194a6 recursivelyEncodeInvalidPersistentState + 1297 
    10 AppKit        0x00007fff94a194a6 recursivelyEncodeInvalidPersistentState + 1297 
    11 AppKit        0x00007fff94a178aa -[NSPersistentUIManager flushAllChangesOptionallyWaitingUntilDone:updatingSnapshots:] + 1037 
    12 AppKit        0x00007fff94a17467 -[NSPersistentUIManager flushPersistentStateAndClose:waitingUntilDone:] + 180 
    13 AppKit        0x00007fff94a7eba5 -[NSApplication terminate:] + 1701 
    14 AppKit        0x00007fff94aa357e -[NSApplication _terminateFromSender:askIfShouldTerminate:saveWindows:] + 280 
    15 AppKit        0x00007fff94aad4a2 __52-[NSApplication(NSAppleEventHandling) _handleAEQuit]_block_invoke_0 + 46 
    16 libdispatch.dylib     0x00007fff8bd9af01 _dispatch_call_block_and_release + 15 
    17 libdispatch.dylib     0x00007fff8bd970b6 _dispatch_client_callout + 8 
    18 libdispatch.dylib     0x00007fff8bd9c0c8 _dispatch_main_queue_callback_4CF + 275 
    19 CoreFoundation      0x00007fff985a20fe __CFRunLoopRun + 1614 
    20 CoreFoundation      0x00007fff985a16b2 CFRunLoopRunSpecific + 290 
    21 HIToolbox       0x00007fff93fbf0a4 RunCurrentEventLoopInMode + 209 
    22 HIToolbox       0x00007fff93fbed84 ReceiveNextEventCommon + 166 
    23 HIToolbox       0x00007fff93fbecd3 BlockUntilNextEventMatchingListInMode + 62 
    24 AppKit        0x00007fff94858613 _DPSNextEvent + 685 
    25 AppKit        0x00007fff94857ed2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128 
    26 AppKit        0x00007fff9484f283 -[NSApplication run] + 517 
    27 AppKit        0x00007fff947f3cb6 NSApplicationMain + 869 

回答

2

信號11意味着你有地方分段錯誤... 所以它可能是與不是一個Objective-C的對象別的東西,因爲在這種情況下,你更可能有一個例外(即使段錯誤也可能發生)。

所以NSZombieEnabled在這裏沒有幫助。

嘗試瞭解信號處理C.您可以爲信號11定義一個處理程序(SIGSEGV),這樣您就可以記錄幾件事情。

(非常)基本上是:

​​
+0

什麼信息能準確地我調試和日誌在這裏? – Thunder 2013-03-21 11:48:55

+1

並不多,但至少可以在信號處理程序上放置一個斷點,並從那裏進行調試。 – Macmade 2013-03-21 12:24:08