Summary:
Using PHImageManaged.requestImageForAsset() fails for certain repeated assets in a photo library. No image or error is returned.
Steps to Reproduce:
Attempt to execute PHImageManaged.requestImageForAsset() for a reasonably large photo library. It is possible that less than 100% will return a UIImage instance from the library. The assets that fail are always the same. No useful error is returned in the callback, just nil image. info dictionary is returned, but no clear way to detect that there has been a supposedly permanent error.
Expected Results:
The library can return an image for 100% of the library's assets, or a clear error is returned that the asset or its image data is somehow corrupt.
Actual Results:
In a library of ~8000 images, 4 images do not return results. These images cannot be viewed in the Photos app either, they appear at empty squares.
Version:
iOS 9.3.1
Notes:
Occurs on many libraries, but not all
Configuration:
iPhone 6
Attachments:
'failures.txt' was successfully uploaded.
Description
Summary: Using PHImageManaged.requestImageForAsset() fails for certain repeated assets in a photo library. No image or error is returned.
Steps to Reproduce: Attempt to execute PHImageManaged.requestImageForAsset() for a reasonably large photo library. It is possible that less than 100% will return a UIImage instance from the library. The assets that fail are always the same. No useful error is returned in the callback, just nil image. info dictionary is returned, but no clear way to detect that there has been a supposedly permanent error.
Expected Results: The library can return an image for 100% of the library's assets, or a clear error is returned that the asset or its image data is somehow corrupt.
Actual Results: In a library of ~8000 images, 4 images do not return results. These images cannot be viewed in the Photos app either, they appear at empty squares.
Version: iOS 9.3.1
Notes: Occurs on many libraries, but not all
Configuration: iPhone 6
Attachments: 'failures.txt' was successfully uploaded.
Info dictionary responses for failures:
[PHImageFileUTIKey: public.jpeg, PHImageResultDeliveredImageFormatKey: 9999, PHImageResultIsDegradedKey: 0, PHImageFileSandboxExtensionTokenKey: 58174dc20d0830a0385e191391e307c22ead9b09;00000000;00000000;000000000000001a;com.apple.app-sandbox.read;00000001;01000003;00000000022f7e61;/private/var/mobile/Media/PhotoData/CPLAssets/group91/9E09885D-2137-4371-8A06-2D906DF6EF2F.JPG, PHImageResultOptimizedForSharing: 0, PHImageResultIsInCloudKey: 0, PHImageResultIsPlaceholderKey: 0, PHImageFileURLKey: file:///var/mobile/Media/PhotoData/CPLAssets/group91/9E09885D-2137-4371-8A06-2D906DF6EF2F.JPG, PHImageResultWantedImageFormatKey: 4035]
[PHImageFileUTIKey: public.jpeg, PHImageResultDeliveredImageFormatKey: 9999, PHImageResultIsDegradedKey: 0, PHImageFileSandboxExtensionTokenKey: a4d47746de9b6824551da0d59646b7fb158e9a8e;00000000;00000000;000000000000001a;com.apple.app-sandbox.read;00000001;01000003;000000000235fbb6;/private/var/mobile/Media/PhotoData/CPLAssets/group316/B18E24CB-D56B-43D7-8E47-1251822F1AED.JPG, PHImageResultOptimizedForSharing: 0, PHImageResultIsInCloudKey: 0, PHImageResultIsPlaceholderKey: 0, PHImageFileURLKey: file:///var/mobile/Media/PhotoData/CPLAssets/group316/B18E24CB-D56B-43D7-8E47-1251822F1AED.JPG, PHImageResultWantedImageFormatKey: 9998]
[PHImageFileUTIKey: public.jpeg, PHImageResultDeliveredImageFormatKey: 9999, PHImageResultIsDegradedKey: 0, PHImageFileSandboxExtensionTokenKey: c203f163093a7f4f6392c7a19e673a435080a2fe;00000000;00000000;000000000000001a;com.apple.app-sandbox.read;00000001;01000003;000000000235fbb3;/private/var/mobile/Media/PhotoData/CPLAssets/group410/B056B586-B9C6-4C55-B43B-CA5FC59168F7.JPG, PHImageResultOptimizedForSharing: 0, PHImageResultIsInCloudKey: 0, PHImageResultIsPlaceholderKey: 0, PHImageFileURLKey: file:///var/mobile/Media/PhotoData/CPLAssets/group410/B056B586-B9C6-4C55-B43B-CA5FC59168F7.JPG, PHImageResultWantedImageFormatKey: 9998]
[PHImageFileUTIKey: public.jpeg, PHImageResultDeliveredImageFormatKey: 9999, PHImageResultIsDegradedKey: 0, PHImageFileSandboxExtensionTokenKey: 18fb76fd3e9bce34b12f4738335ccf994b15610c;00000000;00000000;000000000000001a;com.apple.app-sandbox.read;00000001;01000003;000000000235fbb5;/private/var/mobile/Media/PhotoData/CPLAssets/group418/AB1FB1AC-C18E-4C39-8FEC-904AB3394A96.JPG, PHImageResultOptimizedForSharing: 0, PHImageResultIsInCloudKey: 0, PHImageResultIsPlaceholderKey: 0, PHImageFileURLKey: file:///var/mobile/Media/PhotoData/CPLAssets/group418/AB1FB1AC-C18E-4C39-8FEC-904AB3394A96.JPG, PHImageResultWantedImageFormatKey: 9998]
Product Version: 9.3.1 Created: 2016-04-22T10:19:41.937510 Originated: 2016-04-22T00:00:00 Open Radar Link: http://www.openradar.me/25874586