CoreGraphics PDF backend has a confusing log

Number:rdar://28250871 Date Originated:11-Sep-2016 09:48 PM
Status:Open Resolved:
Product:Documentation Product Version:iOS 10GM
Classification: Reproducible:Always
Peter Steinberger11-Sep-2016 09:48 PM

Something not on this list

When we create a PDF via CoreGraphics, sometimes it emits following log:

<Error>: replacing +/-infinity with 2147483647
<Error>: replacing +/-infinity with -2147483648.

This log is confusing - it took me forever to figure out where it comes from, and in the end Greg Parker helped me figure this out:

Steps to Reproduce:
It's a bit tricky to provide a sample app but doing a full-text search over CoreGraphics will quickly reveal this.

Expected Results:
The log should either be silenced; or at least provide a way to set a breakpoint and write from where it comes from - this will confused many people and without any context chance that anybody figures out what to actually fix will be slim.

Actual Results:
Confusing Log

iOS 10GM

This is a regression; first appeared in iOS 10 betas and is still in the GM.

iPhone 6s Plus


I tracked it down to this line in PDFWriteNumber:

PDFError("replacing +/-infinity with %d.", (unsigned int)(a2 <= 0.0) + 0x7FFFFFFF);

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!