Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS17 decode Crash #3606

Open
3 tasks done
magicfengg opened this issue Sep 20, 2023 · 5 comments
Open
3 tasks done

iOS17 decode Crash #3606

magicfengg opened this issue Sep 20, 2023 · 5 comments
Labels
apple bug apple's bug cause our framework author's pain

Comments

@magicfengg
Copy link

New Issue Checklist

Issue Info

Info Value
Platform Name iOS
Platform Version 17.0
SDWebImage Version 5.14.2
Integration Method cocoapods
Xcode Version Xcode 15
Repro rate sometimes 0.1%
Repro with our demo prj NO
Demo project link link to a demo project that highlights the issue

Issue Description and Steps

Please fill in the detailed description of the issue (full output of any stack trace, compiler error, ...) and the steps to reproduce the issue.

when the sdwebimage decode HEIF or JPEG format image, the crash "[UIImage imageByPreparingForDisplay]" occur sometimes.

0 VideoToolbox __VTDecompressionSessionRemote_DecodeTile_block_invoke_2 + 60
1 libdispatch.dylib _dispatch_client_callout + 20
2 libdispatch.dylib _dispatch_client_callout + 20
3 libdispatch.dylib _dispatch_lane_barrier_sync_invoke_and_complete + 56
4 VideoToolbox VTDecompressionSessionRemote_DecodeTile + 696
5 CMPhoto VTTileDecompressionPluginClass_decode + 376
6 CMPhoto _decodeItem + 6008
7 CMPhoto _applyDecodeStrategy + 396
8 CMPhoto _decodeImage + 452
9 CMPhoto _decodeAuxiliaryImage + 1444
10 CMPhoto _createAuxiliaryImageForIndex + 404
11 CMPhoto _createImageForIndex + 432
12 CMPhoto CMPhotoDecompressionContainerCreateImageForIndex + 280
13 ImageIO HEIFReadPlugin::copyImageBlockSetImp(InfoRec*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 2208
14 ImageIO HEIFReadPlugin::decodeImageImp(IIODecodeParameter*, IIOImageType, __IOSurface**, __CVBuffer**, CGImageBlockSet**) + 616
15 ImageIO IIOReadPlugin::callDecodeImage(IIODecodeParameter*, IIOImageType, __IOSurface**, __CVBuffer**, CGImageBlockSet**) + 800
16 ImageIO IIO_Reader::CopyImageBlockSetProc(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 688
17 ImageIO IIOImageProviderInfo::copyImageBlockSetWithOptions(CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 744
18 ImageIO IIOImageProviderInfo::CopyImageBlockSetWithOptions(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 804
19 CoreGraphics imageProvider_retain_data + 92
20 CoreGraphics CGDataProviderRetainData + 80
21 CoreGraphics provider_for_destination_retain_data + 28
22 CoreGraphics CGDataProviderRetainData + 80
23 CoreGraphics CGAccessSessionCreate + 124
24 CoreGraphics img_data_lock + 2400
25 CoreGraphics CGSImageDataLock + 1324
26 CoreGraphics ripc_AcquireRIPImageData + 848
27 CoreGraphics ripc_DrawImage + 832
28 CoreGraphics CGContextDrawImageWithOptions + 1120
29 QuartzCore CA::Render::(anonymous namespace)::create_image_by_rendering(CGImage*, CGColorSpace*, unsigned int, double, CA::Render::ImageCopyType) + 872
30 QuartzCore CA::Render::copy_image(CGImage*, CGColorSpace*, unsigned int, double, double) + 4544
31 UIKitCore -[_UIImageCGImageContent _contentWithCARenderRef] + 96
32 UIKitCore -[_UIImageCGImageContent contentPreparedForDisplay] + 156
33 UIKitCore -[UIImage imageByPreparingForDisplay] + 28
34 imeituan +[SDImageCoderHelper decodedImageWithImage:] (SDImageCoderHelper.m:42)

@magicfengg
Copy link
Author

OS Version: iOS 17.0 (21A329)
There was crash since iOS17 beta7,There was no crash before iOS17 beta6.

@dreampiggy
Copy link
Contributor

dreampiggy commented Sep 20, 2023

Apple's Bug on HEIF decoder, seems similar to #3604

You can use SDWebImageHEIF for quick workaround ?
https://github.com/SDWebImage/SDWebImageHEIFCoder

This is always open-sourced and you can fix and find bugs controlled by you, not Apple.

@dreampiggy dreampiggy added the apple bug apple's bug cause our framework author's pain label Sep 20, 2023
@dreampiggy
Copy link
Contributor

You guy seems hit this crash on decodeSolutionUIKit (which means, using API imageByPreparingForDisplay)

Another guy hit this crash on decodeSolutionCoreGraphics (which means, using API CGContextDrawImage)

Both of these two failed, so maybe we can not fix this easily :(

@xunan623
Copy link

xunan623 commented Oct 8, 2023

那我们要等到什么时候才能解决呢

@dreampiggy
Copy link
Contributor

@xunan623 Ask Apple, not me. https://feedbackassistant.apple.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apple bug apple's bug cause our framework author's pain
Projects
None yet
Development

No branches or pull requests

3 participants