CGImageCreateWithImageInRect() crashes on iPhone 6

Originator:matthiasplappert
Number:rdar://18426305 Date Originated:23-Sep-2014
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 8
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
I'm using CGImageCreateWithImageInRect() to tile a massive image (e.g. 16,000x9,000px). This has worked nicely in the past, since this function hasn't attempted to decode the entire image.

However, on an iPhone 6 the device now runs out of memory when using this approach. Please note that the exact same code, on an iPhone 5 or iPad mini (1st gen), both running iOS 8, works flawlessly. This is especially interesting since the iPad mini has only half the RAM.

Steps to Reproduce:
1. Open the attached example project
2. Run the example on an iPhone 5 or iPad mini running iOS 8
3. Keep an eye on the memory gauge

Expected Results:
1. The output "Tiling..." appears in the console
2. The output "Tiling complete. Data length: 72806" (data length may vary)

Actual Results:
1. The output "Tiling..." appears in the console
2. The device hangs and/or crashes, presumably because the device runs out of memory

Version:
iOS 8 (12A365)

Notes:
Devices that passed the test: iPhone 5, iOS 8 (12A365), 16GB and iPad mini, iOS 8 (12A365), 16GB

Configuration:
iPhone 6, 64GB

Attachments:
'ImageTiling.zip' was successfully uploaded. (http://cl.ly/3i2d3A2t2x2E)

Comments

Duped as rdar://problem/18708068


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!