SDWebImage: SIGSEGV Crash, iPhone X/XR, not iPhone 11, Animated Images

New Issue Checklist

Issue Info

Info Value
Platform Name ios
Platform Version 13.3.1
SDWebImage Version 5.6.1
Integration Method Cocoapods
Xcode Version XCode 11.3.1
Repro rate 100%
Repro with our demo prj not attempted, will provide if necessary
Demo project link not attempted, will provide if necessary

Issue Description and Steps

Scrolling in a feed

Crashed: NSOperationQueue 0x147ccfa20 (QOS: UNSPECIFIED)
0  libsystem_platform.dylib       0x18f54b948 _platform_memmove + 72
1  ImageIO                        0x19017bdb8 GIFBufferInfo::GIFBufferInfo(unsigned char*, bool, unsigned int, unsigned int, unsigned int) + 88
2  ImageIO                        0x19018dcf0 GIFReadPlugin::copyImageBlockSet(InfoRec*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 952
3  ImageIO                        0x19002b2a0 IIO_Reader::CopyImageBlockSetProc(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 140
4  ImageIO                        0x190037570 IIOImageProviderInfo::CopyImageBlockSetWithOptions(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 1220
5  CoreGraphics                   0x196875424 imageProvider_retain_data + 88
6  CoreGraphics                   0x196676a88 CGDataProviderRetainData + 84
7  CoreGraphics                   0x1967dfcf4 provider_for_destination_retain_data + 24
8  CoreGraphics                   0x196676a88 CGDataProviderRetainData + 84
9  CoreGraphics                   0x196864e8c CGAccessSessionCreate + 104
10 CoreGraphics                   0x196752a1c img_data_lock + 2476
11 CoreGraphics                   0x196750868 CGSImageDataLock + 1120
12 CoreGraphics                   0x1965819dc ripc_AcquireRIPImageData + 712
13 CoreGraphics                   0x19676b7bc ripc_DrawImage + 1112
14 CoreGraphics                   0x1967574dc CGContextDrawImageWithOptions + 1212
15 Relevnt                        0x102ba5700 +[SDImageCoderHelper CGImageCreateDecoded:orientation:] + 274 (SDImageCoderHelper.m:274)
16 Relevnt                        0x102ba95d4 -[SDImageIOAnimatedCoder animatedImageFrameAtIndex:] + 561 (SDImageIOAnimatedCoder.m:561)
17 Relevnt                        0x102b95640 -[SDAnimatedImage animatedImageFrameAtIndex:] + 263 (SDAnimatedImage.m:263)
18 Relevnt                        0x102b96f54 __43-[SDAnimatedImagePlayer displayDidRefresh:]_block_invoke + 336 (SDAnimatedImagePlayer.m:336)
19 Foundation                     0x18fc033a0 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16
20 Foundation                     0x18fb0d0c8 -[NSBlockOperation main] + 100

image

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 27 (10 by maintainers)

Most upvoted comments

I think we’ve reproduced the similar issue on version 5.10.2. We cannot provide the code reproducing it because of NDA. Thought, here is the stack trace:

Crashed: com.apple.main-thread
0  libsystem_platform.dylib       0x1da083640 _platform_memmove + 64
1  ImageIO                        0x19090d3cc GIFBufferInfo::GIFBufferInfo(unsigned char*, bool, unsigned int, unsigned int, unsigned int) + 100
2  ImageIO                        0x190922e6c std::__1::__shared_ptr_emplace<GIFBufferInfo, std::__1::allocator<GIFBufferInfo> >::__shared_ptr_emplace<unsigned char*&, bool, unsigned int&, unsigned int&, unsigned int>(std::__1::allocator<GIFBufferInfo>, unsigned char*&, bool&&, unsigned int&, unsigned int&, unsigned int&&) + 68
3  ImageIO                        0x190922748 GIFReadPlugin::copyImageBlockSet(InfoRec*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 956
4  ImageIO                        0x19082d3c8 IIO_Reader::CopyImageBlockSetProc(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 152
5  ImageIO                        0x19083b250 IIOImageProviderInfo::copyImageBlockSetWithOptions(CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 756
6  ImageIO                        0x190838bf0 IIOImageProviderInfo::CopyImageBlockSetWithOptions(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 584
7  QuartzCore                     0x192588ef0 CA::Render::copy_image(CGImage*, CGColorSpace*, unsigned int, double, double) + 4480
8  QuartzCore                     0x1925896c8 CA::Render::prepare_image(CGImage*, CGColorSpace*, unsigned int, double) + 24
9  QuartzCore                     0x1926ff87c -[CAKeyframeAnimation CA_prepareRenderValue] + 108
10 QuartzCore                     0x1926cc76c CA::Layer::prepare_commit(CA::Transaction*) + 604
11 QuartzCore                     0x19261164c CA::Context::commit_transaction(CA::Transaction*, double, double*) + 428
12 QuartzCore                     0x19263cb08 CA::Transaction::commit() + 732
13 QuartzCore                     0x19263de98 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 96
14 CoreFoundation                 0x18f215358 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
15 CoreFoundation                 0x18f20f5c4 __CFRunLoopDoObservers + 576
16 CoreFoundation                 0x18f20fb74 __CFRunLoopRun + 1056
17 CoreFoundation                 0x18f20f21c CFRunLoopRunSpecific + 600
18 GraphicsServices               0x1a6ddb784 GSEventRunModal + 164
19 UIKitCore                      0x191c4fee8 -[UIApplication _run] + 1072
20 UIKitCore                      0x191c5575c UIApplicationMain + 168
21 Hypee                          0x104c5b0e8 main + 14 (main.swift:14)
22 libdyld.dylib                  0x18eecf6b0 start + 4