Swift   发布时间:2022-03-31  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了cocoa – 什么是CGSUpdateManager,为什么抱怨?大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

我正在使用我的用户界面,尝试通过一大堆嵌套的NSSplitViewControllers,NSTabViewControllers等来导航我的数据. 在某些时候,我得到这些错误警告.我不知道他们来自哪里,甚至在哪里看.该应用程序似乎工作正常. 什么是CGSupdateManager,为什么抱怨? void CGSupdateManager::log() const: conn 0xdbbb tok
我正在使用我的用户界面,尝试通过一大堆嵌套的NSSplitViewControllers,NSTabViewControllers等来导航我的数据.

在某些时候,我得到这些错误警告.我不知道他们来自哪里,甚至在哪里看.该应用程序似乎工作正常.

什么是CGSupdateManager,为什么抱怨?

void CGSupdateManager::log() const: conn 0xdbbb token 0x2ffffffffffdc78 BACktrace (at 5543.57):
void CGSupdateManager::log() const:  0   CoreGraphics                        0x00007fff85db9215 CGSBACktraceCreate + 59
void CGSupdateManager::log() const:  1   CoreGraphics                        0x00007fff85dd8688 _ZN16CGSupdateManager14disable_updateEv + 84
void CGSupdateManager::log() const:  2   AppKit                              0x00007fff897f3de5 -[NSWindow disableScreenupdatesUntilFlush] + 127
void CGSupdateManager::log() const:  3   AppKit                              0x00007fff897b3250 -[NSView _gainedLayerTreeHostAncestor] + 385
void CGSupdateManager::log() const:  4   AppKit                              0x00007fff897b30ae -[NSView _recursiveGainedLayerTreeHostAncestor] + 27
void CGSupdateManager::log() const:  5   AppKit                              0x00007fff897b767a -[NSScroller _recursiveGainedLayerTreeHostAncestor] + 103
void CGSupdateManager::log() const:  6   AppKit                              0x00007fff89a1ea56 -[NSScroller _setSurfaceBACked:] + 213
void CGSupdateManager::log() const:  7   AppKit                              0x00007fff8998424f -[NSScrollView setScrollerStyle:] + 304
void CGSupdateManager::log() const:  8   AppKit                              0x00007fff8a01bf27 +[NSScrollerImpPair _updateAllScrollerImpPairsForNewRecommendedScrollerStyle:] + 426
void CGSupdateManager::log() const:  9   CoreFoundation                         0x00007fff914b5cbc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
void CGSupdateManager::log() const:  10  CoreFoundation                      0x00007fff913a71b4 _CFXNotificationPost + 3140
void CGSupdateManager::log() const:  11  Foundation                          0x00007fff917feea1 -[NsnotificationCenter postNotificationName:object:userInfo:] + 66
void CGSupdateManager::log() const:  12  CoreFoundation                      0x00007fff9141754c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
void CGSupdateManager::log() const:  13  CoreFoundation                      0x00007fff91409655 __CFRunLoopDoBlocks + 341
void CGSupdateManager::log() const:  14  CoreFoundation                      0x00007fff91409196 __CFRunLoopRun + 1814
void CGSupdateManager::log() const:  15  CoreFoundation                      0x00007fff91408838 CFRunLoopRunSpecific + 296
void CGSupdateManager::log() const:  16  HIToolBox                           0x00007fff8f30743f RunCurrentEventLoopInMode + 235
void CGSupdateManager::log() const:  17  HIToolBox                             0x00007fff8f3071ba ReceiveNextEventCommon + 431
void CGSupdateManager::log() const:  18  HIToolBox                           0x00007fff8f306ffb _BlockUntilNextEventMatchingLisTinR_593_11845@odeWithFilter + 71
void CGSupdateManager::log() const:  19  AppKit                              0x00007fff897376d1 _DPSNextEvent + 964
void CGSupdateManager::log() const:  20  AppKit                              0x00007fff89736e80 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
void CGSupdateManager::log() const:  21  AppKit                              0x00007fff8972ae23 -[NSApplication run] + 594
void CGSupdateManager::log() const:  22  AppKit                              0x00007fff897162d4 NSApplicationMain + 1832
void CGSupdateManager::log() const:  23  Well                                0x0000000100019422 top_level_code + 34
void CGSupdateManager::log() const:  24  Well                                0x000000010001945a main + 42
void CGSupdateManager::log() const:  25  libdyld.dylib                       0x00007fff85b7b5c9 start + 1
当我升级到El Capitan时,我开始看到同样的问题.

我最终将它追溯到我的代码库中的某个深层,之前没有引起任何问题……我有一个流浪的电话:

[NSGraphicsContext restoreCurrentContext];

这之前一直是个问题…确保平衡这些调用…特别是在早期返回的函数中!

[NSGraphicsContext saveCurrentContext];
[NSGraphicsContext restoreCurrentContext];

类似的CGContextSaveGState(ctX); CGContextRestoreGState()

大佬总结

以上是大佬教程为你收集整理的cocoa – 什么是CGSUpdateManager,为什么抱怨?全部内容,希望文章能够帮你解决cocoa – 什么是CGSUpdateManager,为什么抱怨?所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。