我使用NSOperation子類創建圖像;生成線程以創建在imageView中顯示的圖像。這些圖像被設置爲一個陣列控制器中的一個鍵,該控制器綁定到imageview。NSImage _cacheSnapShotRep崩潰
用戶正在隨機報告應用程序崩潰,並且崩潰日誌在調用選擇器_cacheSnapshotRep()的線程中顯示錯誤;我一直無法重現這一點,並沒有什麼會出現在網絡搜索這個錯誤。
下面是從崩潰日誌的相關章節:
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
Crashed Thread: 5 Dispatch queue: com.apple.root.default-priority
Application Specific Information:
objc_msgSend() selector name: _cacheSnapshotRep:
和:
Thread 5 Crashed: Dispatch queue: com.apple.root.default-priority
0 libobjc.A.dylib 0x90008edb objc_msgSend + 27
1 com.apple.AppKit 0x962abd48 -[NSImage _usingBestRepresentationForRect:context:hints:body:] + 189
2 com.apple.AppKit 0x962ab87e -[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 1939
3 com.apple.AppKit 0x962aa6a0 -[NSImage _drawMappingAlignmentRectToRect:withState:backgroundStyle:operation:fraction:flip:hints:] + 842
4 com.apple.AppKit 0x963bfb95 -[NSImageCell drawInteriorWithFrame:inView:] + 821
5 com.apple.AppKit 0x963bf7f9 -[NSImageCell drawWithFrame:inView:] + 2133
6 com.apple.AppKit 0x9635066a -[NSControl drawRect:] + 589
7 com.apple.AppKit 0x96348a99 -[NSView _drawRect:clip:] + 3510
8 com.apple.AppKit 0x969ae107 -[_NSViewDrawOperation main] + 257
9 com.apple.Foundation 0x9279c33b -[__NSOperationInternal start] + 811
10 com.apple.Foundation 0x9279bf61 ____startOperations_block_invoke_2 + 94
11 libSystem.B.dylib 0x922ac828 _dispatch_call_block_and_release + 16
12 libSystem.B.dylib 0x9229ea5c _dispatch_worker_thread2 + 222
13 libSystem.B.dylib 0x9229e4f1 _pthread_wqthread + 390
14 libSystem.B.dylib 0x9229e336 start_wqthread + 30
我有點迷失在何處與此去從這裏,所以任何的建議是讚賞。
是「_NSViewDrawOperation」你的課程嗎? – 2010-01-13 20:57:45