I have very large graphic Mac app and now I receive a lot of the following messages in Console on 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.
I noticed that these messages appear in debugger after calling [NSApp nextEventMatchingMask: untilDate inMode: dequeue] but I think the reasons are in some other places. But I have too many places where I use Cocoa Graphics. I didn't receive this kind of message before 10.9.
How to detect where NaN is passing to CoreGraphics API?
Core Graphics is Apple’s 2D drawing engine for OS X. Discover how to build a great disc info app for OS X using Core Graphics to draw charts in this Core Graphics on OS X tutorial. Update 9/22/16: This tutorial has been updated for Xcode 8 and Swift 3. You’ve seen a lot of apps that depict beautiful graphics and stylish custom views.
Handle path-based drawing, antialiased rendering, gradients, images, color management, PDF documents, and more. The Core Graphics framework is based on the Quartz advanced drawing engine. It provides low-level, lightweight 2D rendering with unmatched output fidelity.
The Core Graphics framework is based on the Quartz advanced drawing engine. It provides low-level, lightweight 2D rendering with unmatched output fidelity.
It has capacity to draw anything you can imagine, from simple shapes and text to more complex visual effects that include shadows and gradients. In this Core Graphics on macOS tutorial, you’ll build up an app named DiskInfo to create a custom view that displays the available space and file distribution of a hard drive.
After much digging around, I've found you can set a symbolic breakpoint on "CGPostError" in Xcode, and that will give you a stack trace.
I was getting this error when I was foolishly retaining an NSPopover for future use.
It seems popover.showRelativeToRect(_:)
is all you need to do, and then you can forget about it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With