[iOS 11] PHCachingImageManager provides image with wrong size

Originator:smsxeon
Number:rdar://33876543 Date Originated:14/08/2017
Status:Open Resolved:
Product:Photos Framework Product Version:11.0 (15A5341f)
Classification: Reproducible:
 
Area:
Photos Framework

Summary:
There seems to be a concurrency issue in PHCachingImageManager by which it can return an image with a size of a previous request even when using options.isSynchronous = true  and  options.resizeMode = .exact

Steps to Reproduce:
1. Take a picture
2. Clone https://github.com/diegosanchezr/PHCachingImageManager-iOS11-issue/
3. Launch app on device
4. Accept photo permissions
5. Tap "Test me!" button

Expected Results:
No assert is hit. Images should have expected dimensions

Observed Results:
Assert is hit. Second image has same dimensions as the first one

Version:
11.0 (15A5341f)

Notes:


Configuration:
iPhone 7
Comments

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!