I compress and convert format for picture,but a crash occurs sometimes Only on IOS 15.2.
CFMutableDataRef destinationData = CFDataCreateMutable(kCFAllocatorDefault, 0);
CGImageDestinationRef destinationRef = CGImageDestinationCreateWithData(destinationData, kUTTypeJPEG, 1, NULL);
NSDictionary *options = nil;
options = @{
(NSString *)kCGImageDestinationDateTime : createDate,
(NSString *)kCGImageDestinationLossyCompressionQuality : @(compressQuality)
};
UIImage *tempImageWithData = [UIImage imageWithData:sourceImageData];
CGImageDestinationAddImageAndMetadata(destinationRef,
tempImageWithData.CGImage,
imageMetadataRef,
(__bridge CFDictionaryRef)options);
if (CGImageDestinationFinalize(destinationRef)) {
// code
}
crash
0 ImageIO 0x0000000182c6bb38 IIODictionary::containsKey(__CFString const*) + 8
1 ImageIO 0x0000000182debe84 _IIOGetExifOrientation + 44
2 ImageIO 0x0000000182e17174 AppleJPEGReadPlugin::IIORecodeAppleJPEG_to_JPEG(IIOImageDestination*, IIOImageSource*) + 652
3 ImageIO 0x0000000182df283c IIOImageDestination::finalizeUsingAppleJPEGRecode() + 40
4 ImageIO 0x0000000182c9b948 IIOImageDestination::finalizeDestination() + 416
5 ImageIO 0x0000000182c73234 _CGImageDestinationFinalize + 128
I think CGImageDestinationFinalize is a problem, but What are the reasons?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I see a lot of questions about CFAssertMismatchedTypeID. Is this a system bug now ?