6

所以我从我的应用程序中获得了这个崩溃日志。我在阅读此类日志方面没有太多经验:(有人可以帮助我吗?

感谢


崩溃日志:

Process:         SoundCloud Downloader [15495]
Path:            /Applications/SoundCloud Downloader.app/Contents/MacOS/SoundCloud Downloader
Identifier:      com.BirdiCode.SoundCloud_Downloader
Version:         2.1.1 (b7)
Code Type:       X86-64 (Native)
Parent Process:  launchd [227]

Date/Time:       2012-01-08 15:16:21.614 +0100
OS Version:      Mac OS X 10.7.2 (11C74)
Report Version:  9

Crashed Thread:  7

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: 0x000000000000000d, 0x0000000000000000

VM Regions Near 0:
--> 
    __TEXT                 0000000100000000-0000000100053000 [  332K] r-x/rwx SM=COW  /Applications/SoundCloud Downloader.app/Contents/MacOS/SoundCloud Downloader

Application Specific Information:
objc_msgSend() selector name: _cfTypeID
objc[15495]: garbage collection is OFF

Thread 0:: Dispatch queue: com.apple.main-thread
0   libunwind.dylib                 0x00007fff8bf97239 libunwind::CompactUnwinder_x86_64<libunwind::LocalAddressSpace>::stepWithCompactEncodingRBPFrame(unsigned int, unsigned long long, libunwind::LocalAddressSpace&, libunwind::Registers_x86_64&) + 1
1   libunwind.dylib                 0x00007fff8bf971fd libunwind::CompactUnwinder_x86_64<libunwind::LocalAddressSpace>::stepWithCompactEncoding(unsigned int, unsigned long long, libunwind::LocalAddressSpace&, libunwind::Registers_x86_64&) + 37
2   libunwind.dylib                 0x00007fff8bf97171 libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::step() + 69
3   libobjc.A.dylib                 0x00007fff91442294 objc_addExceptionHandler + 82
4   com.apple.CoreFoundation        0x00007fff94d27d44 _CFDoExceptionOperation + 308
5   com.apple.AppKit                0x00007fff8ffd3309 _NSAppKitLock + 73
6   com.apple.AppKit                0x00007fff9009acb2 -[NSCGSContext _invalidate] + 57
7   com.apple.AppKit                0x00007fff9009ac53 -[NSCGSContext dealloc] + 27
8   com.apple.AppKit                0x00007fff9009ac31 -[NSWindowGraphicsContext dealloc] + 67
9   com.apple.AppKit                0x00007fff9009abe5 -[NSBitmapGraphicsContext dealloc] + 92
10  libobjc.A.dylib                 0x00007fff9144003c (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 434
11  com.apple.CoreFoundation        0x00007fff94cc5f75 _CFAutoreleasePoolPop + 37
12  com.apple.Foundation            0x00007fff8a83c2a6 __NSFireDelayedPerform + 468
13  com.apple.CoreFoundation        0x00007fff94cecf84 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
14  com.apple.CoreFoundation        0x00007fff94cecad6 __CFRunLoopDoTimer + 534
15  com.apple.CoreFoundation        0x00007fff94ccd471 __CFRunLoopRun + 1617
16  com.apple.CoreFoundation        0x00007fff94cccae6 CFRunLoopRunSpecific + 230
17  com.apple.HIToolbox             0x00007fff8c02a3d3 RunCurrentEventLoopInMode + 277
18  com.apple.HIToolbox             0x00007fff8c03163d ReceiveNextEventCommon + 355
19  com.apple.HIToolbox             0x00007fff8c0314ca BlockUntilNextEventMatchingListInMode + 62
20  com.apple.AppKit                0x00007fff8ffd83f1 _DPSNextEvent + 659
21  com.apple.AppKit                0x00007fff8ffd7cf5 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135
22  com.apple.AppKit                0x00007fff8ffd462d -[NSApplication run] + 470
23  com.apple.AppKit                0x00007fff9025380c NSApplicationMain + 867
24  com.BirdiCode.SoundCloud_Downloader 0x0000000100001e50 start + 52

Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0   libsystem_kernel.dylib          0x00007fff8c7c97e6 kevent + 10
1   libdispatch.dylib               0x00007fff8f5cb5be _dispatch_mgr_invoke + 923
2   libdispatch.dylib               0x00007fff8f5ca14e _dispatch_mgr_thread + 54

Thread 2:: com.apple.NSURLConnectionLoader
0   libsystem_kernel.dylib          0x00007fff8c7c767a mach_msg_trap + 10
1   libsystem_kernel.dylib          0x00007fff8c7c6d71 mach_msg + 73
2   com.apple.CoreFoundation        0x00007fff94cc4b6c __CFRunLoopServiceMachPort + 188
3   com.apple.CoreFoundation        0x00007fff94ccd2d4 __CFRunLoopRun + 1204
4   com.apple.CoreFoundation        0x00007fff94cccae6 CFRunLoopRunSpecific + 230
5   com.apple.Foundation            0x00007fff8a8960ab +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 335
6   com.apple.Foundation            0x00007fff8a88a7fe -[NSThread main] + 68
7   com.apple.Foundation            0x00007fff8a88a776 __NSThread__main__ + 1575
8   libsystem_c.dylib               0x00007fff8a60e8bf _pthread_start + 335
9   libsystem_c.dylib               0x00007fff8a611b75 thread_start + 13

Thread 3:: com.apple.CFSocket.private
0   libsystem_kernel.dylib          0x00007fff8c7c8df2 __select + 10
1   com.apple.CoreFoundation        0x00007fff94d15f9b __CFSocketManager + 1355
2   libsystem_c.dylib               0x00007fff8a60e8bf _pthread_start + 335
3   libsystem_c.dylib               0x00007fff8a611b75 thread_start + 13

Thread 4:
0   libsystem_kernel.dylib          0x00007fff8c7c9192 __workq_kernreturn + 10
1   libsystem_c.dylib               0x00007fff8a610594 _pthread_wqthread + 758
2   libsystem_c.dylib               0x00007fff8a611b85 start_wqthread + 13

Thread 5:
0   libsystem_kernel.dylib          0x00007fff8c7c9192 __workq_kernreturn + 10
1   libsystem_c.dylib               0x00007fff8a610594 _pthread_wqthread + 758
2   libsystem_c.dylib               0x00007fff8a611b85 start_wqthread + 13

Thread 6:
0   libsystem_kernel.dylib          0x00007fff8c7c9192 __workq_kernreturn + 10
1   libsystem_c.dylib               0x00007fff8a610594 _pthread_wqthread + 758
2   libsystem_c.dylib               0x00007fff8a611b85 start_wqthread + 13

Thread 7 Crashed:
0   libobjc.A.dylib                 0x00007fff9143ae90 objc_msgSend + 16
1   com.apple.CoreFoundation        0x00007fff94ca6ae0 CFGetTypeID + 240
2   com.apple.CoreGraphics          0x00007fff8b1a31f0 CGSReleaseRegion + 23
3   com.apple.AppKit                0x00007fff9001ac0d -[NSRegion dealloc] + 33
4   com.apple.AppKit                0x00007fff900a23fc +[_NSAutomaticFocusRing showForView:] + 2655
5   com.apple.AppKit                0x00007fff9001acbe -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 136
6   com.apple.AppKit                0x00007fff9001493e -[NSView displayIfNeeded] + 1676
7   com.apple.AppKit                0x00007fff9016ca18 -[NSWindow setFrame:display:animate:] + 1320
8   com.BirdiCode.SoundCloud_Downloader 0x0000000100015682 -[SoundCloud_DownloaderAppDelegate expandTheWindowForDownload] + 654
9   com.BirdiCode.SoundCloud_Downloader 0x0000000100016374 -[SoundCloud_DownloaderAppDelegate addToDownloadsQue:title:artist:buy:] + 2900
10  com.BirdiCode.SoundCloud_Downloader 0x00000001000126f9 -[SoundCloud_DownloaderAppDelegate prepareForDownloadThread:] + 727
11  com.BirdiCode.SoundCloud_Downloader 0x00000001000129c6 -[SoundCloud_DownloaderAppDelegate prepareThread1] + 70
12  com.apple.Foundation            0x00007fff8a88a7fe -[NSThread main] + 68
13  com.apple.Foundation            0x00007fff8a88a776 __NSThread__main__ + 1575
14  libsystem_c.dylib               0x00007fff8a60e8bf _pthread_start + 335
15  libsystem_c.dylib               0x00007fff8a611b75 thread_start + 13

Thread 8:
0   libsystem_kernel.dylib          0x00007fff8c7c9192 __workq_kernreturn + 10
1   libsystem_c.dylib               0x00007fff8a610594 _pthread_wqthread + 758
2   libsystem_c.dylib               0x00007fff8a611b85 start_wqthread + 13

Thread 9:
0   libsystem_kernel.dylib          0x00007fff8c7c767a mach_msg_trap + 10
1   libsystem_kernel.dylib          0x00007fff8c7c6d71 mach_msg + 73
2   com.apple.CoreFoundation        0x00007fff94cc4b6c __CFRunLoopServiceMachPort + 188
3   com.apple.CoreFoundation        0x00007fff94ccd2d4 __CFRunLoopRun + 1204
4   com.apple.CoreFoundation        0x00007fff94cccae6 CFRunLoopRunSpecific + 230
5   com.apple.Foundation            0x00007fff8a83c04f -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 267
6   com.BirdiCode.SoundCloud_Downloader 0x0000000100029601 -[ASIHTTPRequest startSynchronous] + 229
7   com.BirdiCode.SoundCloud_Downloader 0x0000000100013849 -[SoundCloud_DownloaderAppDelegate downloadThisFromThread:] + 952
8   com.BirdiCode.SoundCloud_Downloader 0x0000000100014db2 -[SoundCloud_DownloaderAppDelegate downloadT1] + 70
9   com.apple.Foundation            0x00007fff8a88a7fe -[NSThread main] + 68
10  com.apple.Foundation            0x00007fff8a88a776 __NSThread__main__ + 1575
11  libsystem_c.dylib               0x00007fff8a60e8bf _pthread_start + 335
12  libsystem_c.dylib               0x00007fff8a611b75 thread_start + 13

Thread 10:
0   libsystem_kernel.dylib          0x00007fff8c7c767a mach_msg_trap + 10
1   libsystem_kernel.dylib          0x00007fff8c7c6d71 mach_msg + 73
2   com.apple.CoreFoundation        0x00007fff94cc4b6c __CFRunLoopServiceMachPort + 188
3   com.apple.CoreFoundation        0x00007fff94ccd2d4 __CFRunLoopRun + 1204
4   com.apple.CoreFoundation        0x00007fff94cccae6 CFRunLoopRunSpecific + 230
5   com.apple.Foundation            0x00007fff8a83c04f -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 267
6   com.BirdiCode.SoundCloud_Downloader 0x0000000100029601 -[ASIHTTPRequest startSynchronous] + 229
7   com.BirdiCode.SoundCloud_Downloader 0x00000001000139c3 -[SoundCloud_DownloaderAppDelegate downloadThisFromThread:] + 1330
8   com.BirdiCode.SoundCloud_Downloader 0x0000000100014ccb -[SoundCloud_DownloaderAppDelegate downloadT2] + 70
9   com.apple.Foundation            0x00007fff8a88a7fe -[NSThread main] + 68
10  com.apple.Foundation            0x00007fff8a88a776 __NSThread__main__ + 1575
11  libsystem_c.dylib               0x00007fff8a60e8bf _pthread_start + 335
12  libsystem_c.dylib               0x00007fff8a611b75 thread_start + 13

Thread 11:
0   libsystem_kernel.dylib          0x00007fff8c7c767a mach_msg_trap + 10
1   libsystem_kernel.dylib          0x00007fff8c7c6d71 mach_msg + 73
2   com.apple.CoreFoundation        0x00007fff94cc4b6c __CFRunLoopServiceMachPort + 188
3   com.apple.CoreFoundation        0x00007fff94ccd2d4 __CFRunLoopRun + 1204
4   com.apple.CoreFoundation        0x00007fff94cccae6 CFRunLoopRunSpecific + 230
5   com.apple.Foundation            0x00007fff8a83c04f -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 267
6   com.BirdiCode.SoundCloud_Downloader 0x0000000100029601 -[ASIHTTPRequest startSynchronous] + 229
7   com.BirdiCode.SoundCloud_Downloader 0x0000000100013b3d -[SoundCloud_DownloaderAppDelegate downloadThisFromThread:] + 1708
8   com.BirdiCode.SoundCloud_Downloader 0x0000000100014be4 -[SoundCloud_DownloaderAppDelegate downloadT3] + 70
9   com.apple.Foundation            0x00007fff8a88a7fe -[NSThread main] + 68
10  com.apple.Foundation            0x00007fff8a88a776 __NSThread__main__ + 1575
11  libsystem_c.dylib               0x00007fff8a60e8bf _pthread_start + 335
12  libsystem_c.dylib               0x00007fff8a611b75 thread_start + 13

Thread 7 crashed with X86 Thread State (64-bit):
  rax: 0x00007fff7a7a5b00  rbx: 0x0000000101aad400  rcx: 0xf000000000000000  rdx: 0x00007fff7a7d56c0
  rdi: 0x0000000101aad400  rsi: 0x00007fff9089fb17  rbp: 0x000000010a1da1d0  rsp: 0x000000010a1da1b0
   r8: 0x0000000000000080   r9: 0x0000000000000180  r10: 0x000000010035ec80  r11: 0xf000000000000000
  r12: 0x000000010a5263b0  r13: 0x00000000000000e0  r14: 0x000000010a527250  r15: 0x000000010a526500
  rip: 0x00007fff9143ae90  rfl: 0x0000000000010246  cr2: 0x000000010a527000
Logical CPU: 0

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 7
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 167922
    thread_create: 2
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=162.9M resident=115.1M(71%) swapped_out_or_unallocated=47.8M(29%)
Writable regions: Total=122.9M written=12.7M(10%) resident=21.4M(17%) swapped_out=860K(1%) unallocated=101.4M(83%)

REGION TYPE                      VIRTUAL
===========                      =======
CG backing stores                  1496K
CG image                           1872K
CG raster data                     1988K
CG shared images                   3512K
CoreGraphics                         16K
CoreImage                             4K
CoreServices                       2888K
MALLOC                             86.6M
MALLOC guard page                    32K
Memory tag=240                        4K
Memory tag=242                       12K
Memory tag=243                       12K
Memory tag=251                        8K
OpenCL                                8K
STACK GUARD                        56.0M
Stack                              13.1M
VM_ALLOCATE                        16.2M
__CI_BITMAP                          80K
__DATA                             15.3M
__IMAGE                            1256K
__LINKEDIT                         48.2M
__RC_CAMERAS                        236K
__TEXT                            114.7M
__UNICODE                           544K
mapped file                        45.3M
shared memory                      17.7M
===========                      =======
TOTAL                             426.9M

另外,有没有一本书或一些网站可以让我学习如何阅读崩溃日志?



更新: 这是代码expandWindowForDownload

- (void)expandTheWindowForDownload
{
    // Get the window size
    NSRect frame = [window frame];
    frame.origin.y += frame.size.height - 201;
    frame.size.height = 201;

    // Apply it
    [window setFrame:frame display:YES animate:YES];
}
4

2 回答 2

16

以下是我通常寻找的东西:

异常类型

这通常可以帮助您了解基本问题是什么。在您的情况下,异常类型是 EXC_BAD_ACCESS:

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)

正如 Google、Stack Overflow 或 Apple 会告诉您的那样,当您在释放对象后尝试访问它时,就会发生此类错误。(造成这种情况的一个常见根本原因是,如果您“过度释放”一个对象 - 即您对一个对象调用 release 方法的次数比它被保留的次数要多。)

当您从产品菜单运行“分析”时,Xcode 经常可以找到此类错误的来源。(如果我没记错的话,在 Xcode 3 中,它是 Build 菜单中的“Build and Analyze”。)所以试一试,它可能会节省一些时间。否则...

崩溃的线程

你会在崩溃日志的顶部找到它,就在异常类型的正上方。在你的情况下,你有:

Crashed Thread:  7

这允许您丢弃崩溃日志的大部分内容,而只专注于导致崩溃的线程。所以你感兴趣的是这个:

Thread 7 Crashed:
0   libobjc.A.dylib                 0x00007fff9143ae90 objc_msgSend + 16
1   com.apple.CoreFoundation        0x00007fff94ca6ae0 CFGetTypeID + 240
2   com.apple.CoreGraphics          0x00007fff8b1a31f0 CGSReleaseRegion + 23
3   com.apple.AppKit                0x00007fff9001ac0d -[NSRegion dealloc] + 33
4   com.apple.AppKit                0x00007fff900a23fc +[_NSAutomaticFocusRing showForView:] + 2655
5   com.apple.AppKit                0x00007fff9001acbe -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 136
6   com.apple.AppKit                0x00007fff9001493e -[NSView displayIfNeeded] + 1676
7   com.apple.AppKit                0x00007fff9016ca18 -[NSWindow setFrame:display:animate:] + 1320
8   com.BirdiCode.SoundCloud_Downloader 0x0000000100015682 -[SoundCloud_DownloaderAppDelegate expandTheWindowForDownload] + 654
9   com.BirdiCode.SoundCloud_Downloader 0x0000000100016374 -[SoundCloud_DownloaderAppDelegate addToDownloadsQue:title:artist:buy:] + 2900
10  com.BirdiCode.SoundCloud_Downloader 0x00000001000126f9 -[SoundCloud_DownloaderAppDelegate prepareForDownloadThread:] + 727
11  com.BirdiCode.SoundCloud_Downloader 0x00000001000129c6 -[SoundCloud_DownloaderAppDelegate prepareThread1] + 70
12  com.apple.Foundation            0x00007fff8a88a7fe -[NSThread main] + 68
13  com.apple.Foundation            0x00007fff8a88a776 __NSThread__main__ + 1575
14  libsystem_c.dylib               0x00007fff8a60e8bf _pthread_start + 335
15  libsystem_c.dylib               0x00007fff8a611b75 thread_start + 13

现在,您可以从上到下处理此堆栈跟踪,直到您从自己的代码中进行第一次调用。(理论上,崩溃可能是由 Apple 代码中的错误引起的,但实际上它几乎总是我们的代码,而不是他们的。)

所以对你来说,事情开始出错的代码行是:

8   com.BirdiCode.SoundCloud_Downloader 0x0000000100015682 -[SoundCloud_DownloaderAppDelegate expandTheWindowForDownload] + 654

查看该expandTheWindowForDownload方法,看看您是否可以发现您正在访问已发布对象的位置。如果您无法发现,请在此处发布该方法的代码,我们应该能够找到答案并帮助您了解问题所在。

于 2012-01-08T16:13:44.803 回答
4

好的,因此对于查看此内容的任何人,我都找到了问题的解决方案。

似乎如果您调整窗口大小并且用户在窗口调整大小时“聚焦”在 NSTextField 上,则可能会导致崩溃。这发生在除 NSForm 之外的所有文本输入上。

此问题发生在 10.7.2 和 10.7.3 上。我还没有在任何其他版本的 mac os x 上尝试过。

为了解决这个问题,我刚刚在窗口调整大小调用[textField setEditable:NO];之前和之后调用。[textField setEditable:YES];

无论如何,感谢您的帮助!

于 2012-02-09T19:14:21.123 回答