NSKeyedArchiver does not correctly preserve CGPoints with INFINITY values
| Originator: | steipete | ||
| Number: | rdar://20225006 | Date Originated: | 19-Mar-2015 06:10 PM |
| Status: | Open | Resolved: | |
| Product: | iOS | Product Version: | 8.2 |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: Using encodeCGPoint: forKey: and decodeCGPointForKey: to first encode and later decode a CGPoint with the value of CGPointMake(INFINITY, INFINITY) produces a point with the x and y value set to 0, instead of to INFINITY. Steps to Reproduce: Open the attached sample project and run the tests target. Expected Results: The decoded CGPoint would have it’s x and y components set to INFINITY, matching the original. Actual Results: The decoded CGPoint has it’s x and y components set to 0, IN CONTRAST WITH the original. Regression: Tested on iOS 8 and iOS 7 simulator as well as on an iPhone 6 with iOS 8.2. Notes: Encoding a CGFloat with encodeDouble:forKey: and decoding with decodeDoubleForKey: works as expected for INFINITY values. This is a duplicate of rdar://20224363
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!