cocoa - 如何在 Mac OS X 10.9 上检测 NaN 传递给 CoreGraphics API 的位置

标签 cocoa core-graphics osx-mavericks

我有非常大的图形 Mac 应用程序,现在我在 10.9 GM 的控制台中收到很多以下消息。

<Error>: Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API. This is a serious error and contributes to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.

我注意到在调用 [NSApp nextEventMatchingMask:untilDate inMode:dequeue] 后这些消息出现在调试器中,但我认为原因在其他一些地方。但我使用 Cocoa Graphics 的地方太多了。 10.9之前我没有收到过这样的消息。

如何检测 NaN 传递给 CoreGraphics API 的位置?

Screenshot for this error on console

最佳答案

经过深入研究,我发现您可以在 Xcode 中的“CGPostError”上设置符号断点,这将为您提供堆栈跟踪。

关于cocoa - 如何在 Mac OS X 10.9 上检测 NaN 传递给 CoreGraphics API 的位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19187344/

相关文章:

ios - 条纹线突然出现

ruby-on-rails - Rails Bundle 安装在 bootstrap-sass 上失败

macos - Mac OS X Mavericks 上的 tsung_stats.pl 遇到 "Can' t 定位 Template.pm"错误

objective-c - NSInteger 设置为 0 但返回 nil

macos - 该应用程序已损坏,无法打开。删除该应用程序并从 App Store 重新下载

objective-c - 如何摆脱 objective c typedef 中的可空性警告?

iphone - 使用核心图形绘制浮雕弧

ios - 从 UIView 截取屏幕截图 (UIImage) 需要太长时间

macos - migratePersistentStore : to another URL on OS X 10. 9 Mavericks 后访问 NSManagedObject 属性时发生崩溃

objective-c - CGContextRef 作为 OpenGL 上下文