CoreGraphics PDF backend has a confusing log
Originator: | steipete | ||
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 Area: Something not on this list Summary: When we create a PDF via CoreGraphics, sometimes it emits following log: <Error>: replacing +/-infinity with 2147483647 or <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: https://twitter.com/steipete/status/764446752472698880 https://twitter.com/gparker/status/764543800496627712 https://twitter.com/gparker/status/764543990892867584 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 Version: iOS 10GM Notes: This is a regression; first appeared in iOS 10 betas and is still in the GM. Configuration: iPhone 6s Plus
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com 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!
I tracked it down to this line in PDFWriteNumber:
PDFError("replacing +/-infinity with %d.", (unsigned int)(a2 <= 0.0) + 0x7FFFFFFF);