Rendering a PDF locks up the render operation, never returning. Regression because of AppleJPEG.

Number:rdar://19865091 Date Originated:17-Feb-2015 10:36 PM
Status:Open Resolved:
Product:iOS SDK Product Version:8.1.3
Classification:Crash/Hang/Data Loss Reproducible:Always
Rendering a PDF locks up the render operation, never returning.

Steps to Reproduce:
Open attached example.
Observe that it is looping after rendering the first image successfully.

There is no crash, but the renderer is never finishing (thus, I can’t provide a crash log since it’s a hang)

Expected Results:
Should render as expected.

Actual Results:
Freezes/Loops somewhere in CGImageReadGetCachedImageBlockData

Seems to be related to AppleJPEG. Works fine in iOS 7.

Removing CGContextSetInterpolationQuality fixes the issue. kCGInterpolationHigh or kCGInterpolationMedium cause a freeze. This took a crazy long time to find out… appreciate any feedback on this.


Still happening with iOS 10.0.1 GM.

Reproduce on an iPad on real hardware. Does work in Simulator or on iPhone 6 Plus.

Can't provide example publicly, contains proprietary data.

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!