Crash when loading PDFDocument into PDFView

Originator:clint.stephens
Number:rdar://49780971 Date Originated:April 10 2019
Status: Resolved:
Product: Product Version:
Classification: Reproducible:Yes
 
Area:
PDFKit

Summary:

Since upgrading to XCode 10.2, assigning  'pdfView.document = PDFDocument' in viewDidLoad() will crash with error:
"Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]"

This occurs in provided XCode sample project as well as example code from Apple.

Steps to Reproduce:
Run attached XCode project. 

Expected Results:
Should be able to assign PDFDocument in viewDidLoad(), as per documentation and example code in:
https://developer.apple.com/videos/play/wwdc2017/241/


Actual Results:
Crashes.

Version/Build:
XCode Version 10.2 (10E125)
Simulator iPad Air 2 with iOS 12.2 (16E226)

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!