Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c 在我的事故报告中,这些神奇的地址是什么?_Objective C_Macos_Cocoa_Video_Osx Yosemite - Fatal编程技术网

Objective c 在我的事故报告中,这些神奇的地址是什么?

Objective c 在我的事故报告中,这些神奇的地址是什么?,objective-c,macos,cocoa,video,osx-yosemite,Objective C,Macos,Cocoa,Video,Osx Yosemite,我维护一个开源的OSX项目,拥有大量的用户群。在约塞米蒂,我开始收到零星的崩溃通知(EXC\u BAD\u ACCESS KERN\u INVALID\u ADDRESS),我无法追踪它们,也无法在我的系统上重现它们,也没有人能够在现场可靠地重现它们。尽管有很多报告,但崩溃很少发生,而且主要发生在约塞米蒂(Yosemite)(主要是10.10.2和10.10.3),尽管软件运行在许多其他系统上(回到10.7)。它们出现在所有类型的硬件上(MBPro、iMac的MacMini和其他)。该程序在UI

我维护一个开源的OSX项目,拥有大量的用户群。在约塞米蒂,我开始收到零星的崩溃通知(
EXC\u BAD\u ACCESS KERN\u INVALID\u ADDRESS
),我无法追踪它们,也无法在我的系统上重现它们,也没有人能够在现场可靠地重现它们。尽管有很多报告,但崩溃很少发生,而且主要发生在约塞米蒂(Yosemite)(主要是10.10.2和10.10.3),尽管软件运行在许多其他系统上(回到10.7)。它们出现在所有类型的硬件上(MBPro、iMac的MacMini和其他)。该程序在UI中没有做任何特别有趣的事情,但它确实驱动了许多命令行程序(通过NSTask)来执行视频处理和相关活动

车祸有两个奇怪的地方

首先,它们似乎在我的代码和苹果的例程中随机出现在整个程序中。最常见的(也是没有帮助的)是在主运行循环中(参见下面的第一个stacktrace),其中许多发生在视图显示代码中,例如下面的第二个跟踪。这通常会导致我寻找一个过度释放的对象,但正如我所说的,它似乎发生在程序中的每一种对象上

第二件奇怪的事情是,在仔细查看了数百个这样的地址之后,它们崩溃的无效地址几乎完全分为两类:

0x0000000002798000
0x0000000002998000
0x0000000002A98000
0x0000000002B98000
0x0000000003098000
0x0000000003198000
0x0000000003298000
0x0000000003398000
0x0000000003498000
0x0000000003898000
0x0000000003998000
0x0000000003A98000


0x00000000047ffff8
0x0000000004fffff8
0x00000000057ffff8
0x0000000005fffff8
0x00000000067ffff8
0x0000000006fffff8
0x00000000077ffff8
0x0000000007fffff8
我已经盯着这些地址看了很长时间了,还没弄明白这一组紧密的无效地址可能意味着什么。第一组相距1毫巴,第二组相距8毫巴;好了,我的程序中没有那么大的结构。第二组似乎在频率上正态分布,最常见的是5FFFF8左右。我在第一组中没有看到相同的模式(可能有两个中心,但这可能是数据拟合过度)。在二进制中,它们属于这些模式(尽管第一组中的一些似乎没有出现)

000000 1x XXXX1001 10000000 00000000
000001xx111111111111 11111 000

我应该提到的是,在0x0000000000000000处,我还得到了另一个错误
EXC_算术EXC_I386_DIV,同样是在非常随机的地方,而且似乎没有任何除法

任何关于为什么这些地址会出现在这种模式中的建议,都可能给我们提供一个在哪里查找的线索,这将是非常棒的

这是样本堆栈跟踪

Thread : Crashed: com.apple.main-thread
0  libsystem_kernel.dylib         0x00007fff94a6a4de mach_msg_trap + 10
1  CoreFoundation                 0x00007fff9288eeb4 __CFRunLoopServiceMachPort + 212
2  CoreFoundation                 0x00007fff9288e37b __CFRunLoopRun + 1371
3  CoreFoundation                 0x00007fff9288dbd8 CFRunLoopRunSpecific + 296
4  HIToolbox                      0x00007fff94e3956f RunCurrentEventLoopInMode + 235
5  HIToolbox                      0x00007fff94e392ea ReceiveNextEventCommon + 431
6  HIToolbox                      0x00007fff94e3912b _BlockUntilNextEventMatchingListInModeWithFilter + 71
7  AppKit                         0x00007fff973169bb _DPSNextEvent + 978
8  AppKit                         0x00007fff97315f68 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 346
9  AppKit                         0x00007fff9730bbf3 -[NSApplication run] + 594
10 AppKit                         0x00007fff97288354 NSApplicationMain + 1832
11 cTiVo                          0x000000010871c234 start


Thread : Crashed: com.apple.main-thread
0  libsystem_kernel.dylib         0x00007fff98b054de mach_msg_trap + 10
1  CoreGraphics                   0x00007fff94ccfb41 _CGSAddStructuralRegionOfType + 148
2  CoreGraphics                   0x00007fff94b29901 add_structural_region_of_type + 134
3  AppKit                         0x00007fff90647394 _NXSetCursorRect + 680
4  AppKit                         0x00007fff90646fa2 -[NSWindow _addCursorRect:cursor:forView:] + 889
5  AppKit                         0x00007fff90646c0e -[NSView addCursorRect:cursor:] + 555
6  AppKit                         0x00007fff90b1d517 -[NSTableHeaderView resetCursorRects] + 389
7  AppKit                         0x00007fff905f9ddb -[NSView(NSInternal) _updateTrackingAreas] + 660
8  AppKit                         0x00007fff905fa21b -[NSView(NSInternal) _updateTrackingAreas] + 1748
9  AppKit                         0x00007fff905fa21b -[NSView(NSInternal) _updateTrackingAreas] + 1748
10 AppKit                         0x00007fff905fb13e -[NSScrollView _updateTrackingAreas] + 119
11 AppKit                         0x00007fff905fa21b -[NSView(NSInternal) _updateTrackingAreas] + 1748
12 AppKit                         0x00007fff905fa21b -[NSView(NSInternal) _updateTrackingAreas] + 1748
13 AppKit                         0x00007fff905fa21b -[NSView(NSInternal) _updateTrackingAreas] + 1748
14 AppKit                         0x00007fff905fa21b -[NSView(NSInternal) _updateTrackingAreas] + 1748
15 AppKit                         0x00007fff90645ab9 _handleInvalidCursorRectsNote + 1072
16 AppKit                         0x00007fff90c1bd21 __35-[NSWindow _postInvalidCursorRects]_block_invoke3305 + 46
17 CoreFoundation                 0x00007fff99154da7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
18 CoreFoundation                 0x00007fff99154d00 __CFRunLoopDoObservers + 368
19 CoreFoundation                 0x00007fff99146e08 __CFRunLoopRun + 872
20 CoreFoundation                 0x00007fff99146858 CFRunLoopRunSpecific + 296
21 HIToolbox                      0x00007fff920a5aef RunCurrentEventLoopInMode + 235
22 HIToolbox                      0x00007fff920a586a ReceiveNextEventCommon + 431
23 HIToolbox                      0x00007fff920a56ab _BlockUntilNextEventMatchingListInModeWithFilter + 71
24 AppKit                         0x00007fff904e5f81 _DPSNextEvent + 964
25 AppKit                         0x00007fff904e5730 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
26 AppKit                         0x00007fff904d9593 -[NSApplication run] + 594
27 AppKit                         0x00007fff904c4a14 NSApplicationMain + 1832
28 cTiVo                          0x0000000102a19234 start

Thread : Crashed: com.apple.main-thread
0  libobjc.A.dylib                0x00007fff878ff0ee objc_msgSend + 46
1  AppKit                         0x00007fff8e5519a1 -[CALayer(NSContentsAligning) NS_shouldUseContentsAligning] + 32
2  AppKit                         0x00007fff8dca1ee9 _NSBackingLayerSetNeedsDisplayInRect + 178
3  QuartzCore                     0x00007fff88e849f7 -[CALayer setNeedsDisplay] + 62
4  AppKit                         0x00007fff8dca1e10 -[NSView(NSInternal) _setLayerNeedsDisplayInViewRect:] + 648
5  AppKit                         0x00007fff8e33a1bb NSViewSetNeedsDisplayInRect + 1077
6  WebKitLegacy                   0x00007fff89344b7e setNeedsDisplayInRect(NSView*, objc_selector*, CGRect) + 238
7  AppKit                         0x00007fff8dc36772 -[NSView setNeedsDisplay:] + 81
8  AppKit                         0x00007fff8dc6244f -[NSTextFieldCell setObjectValue:] + 88
9  AppKit                         0x00007fff8dc61fc4 -[NSCell setStringValue:] + 111
10 AppKit                         0x00007fff8dccd250 -[NSControl setStringValue:] + 138
11 cTiVo                          0x00000001090cf92f -[MTDownloadTableView updateProgressInCell:forDL:] (MTDownloadTableView.m:158)
12 cTiVo                          0x00000001090cfc6a -[MTDownloadTableView updateProgress:] (MTDownloadTableView.m:188)
13 CoreFoundation                 0x00007fff8650bcdc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
14 CoreFoundation                 0x00007fff863fd244 _CFXNotificationPost + 3140
15 Foundation                     0x00007fff91d55c31 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
16 cTiVo                          0x000000010911cecc __93+[NSNotificationCenter(Threads) postNotificationNameOnMainThread:object:userInfo:afterDelay:]_block_invoke     (NSNotificationCenter+Threads.m:44)
17 libdispatch.dylib              0x00007fff8a374323 _dispatch_call_block_and_release + 12
18 libdispatch.dylib              0x00007fff8a36fc13 _dispatch_client_callout + 8
19 libdispatch.dylib              0x00007fff8a37bcbf _dispatch_main_queue_callback_4CF + 861
20 CoreFoundation                 0x00007fff864a2c79 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
21 CoreFoundation                 0x00007fff8645f30f __CFRunLoopRun + 2159
22 CoreFoundation                 0x00007fff8645e858 CFRunLoopRunSpecific + 296
23 HIToolbox                      0x00007fff926c4aef RunCurrentEventLoopInMode + 235
24 HIToolbox                      0x00007fff926c486a ReceiveNextEventCommon + 431
25 HIToolbox                      0x00007fff926c46ab _BlockUntilNextEventMatchingListInModeWithFilter + 71
26 AppKit                         0x00007fff8dc26f81 _DPSNextEvent + 964
27 AppKit                         0x00007fff8dc26730 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
28 AppKit                         0x00007fff8dc1a593 -[NSApplication run] + 594
29 AppKit                         0x00007fff8dc05a14 NSApplicationMain + 1832
30 cTiVo                          0x00000001090b5714 start    

你能把整个事故报告都寄出去吗。它说哪个线程崩溃了,不是吗?好吧,有数百份报告,这些只是一个有希望的代表性样本。他们每个人都说“Thread:crash:com.apple.main Thread”(我在上面的第三个线程中添加了一个),这可能是一个愚蠢的问题:你确定所有的UI方法都是从主线程调用的吗?(因为您使用了许多NSTASK)我曾经有一个奇怪的错误,它是由这样一个错误引起的。崩溃报告似乎与图形有关。顺便说一句,程序在处理过程中确实有很多后台活动,但这些问题似乎与图形无关;我花了相当长的时间沿着这条路走下去,确保那些从后台启动的UI更改(大部分是进度更新)确实在前台线程上处理。这仍然是可能的,但我想我已经检查了所有的路径。