onevcat / Kingfisher

A lightweight, pure-Swift library for downloading and caching images from the web.
MIT License
23.41k stars 2.66k forks source link

App crashed for GIF images #2203

Open vje1998 opened 9 months ago

vje1998 commented 9 months ago

Check List

Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.

Issue Description

App Crashes while trying to show carousel of gif images on real device. Working perfectly on simulator. Below are the list of urls https://blogmedia.testbook.com/blog/wp-content/uploads/2024/01/exam-notifications-banners-31fa430c.gif https://blogmedia.testbook.com/blog/wp-content/uploads/2024/01/exam-notifications-banners-24-2cfd5cbb.gif https://blogmedia.testbook.com/blog/wp-content/uploads/2024/01/exam-notifications-banners-29-304d3b48.gif https://blogmedia.testbook.com/blog/wp-content/uploads/2024/01/exam-notifications-banners-20-29fddb6c.gif https://blogmedia.testbook.com/blog/wp-content/uploads/2024/01/exam-notifications-banners-14-4eea21f0.gif

What

Below is the reported error on Crashlytics GIFBufferInfo::GIFBufferInfo(unsigned char*, bool, unsigned int, unsigned int, unsigned int) + 116

lixiang1994 commented 1 month ago

我也遇到了, 来自firebase的crash收集. 我目前使用的版本是7.12.0版本

Crashed: com.apple.main-thread
0  libsystem_platform.dylib       0x91c _platform_memmove + 76
1  ImageIO                        0x1e9634 GIFBufferInfo::GIFBufferInfo(unsigned char*, bool, unsigned int, unsigned int, unsigned int) + 108
2  ImageIO                        0x1fb464 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&&) + 76
3  ImageIO                        0x1fb3e4 std::__1::shared_ptr<GIFBufferInfo> std::__1::allocate_shared<GIFBufferInfo, std::__1::allocator<GIFBufferInfo>, unsigned char*&, bool, unsigned int&, unsigned int&, unsigned int, void>(std::__1::allocator<GIFBufferInfo> const&, unsigned char*&, bool&&, unsigned int&, unsigned int&, unsigned int&&) + 88
4  ImageIO                        0x1facd4 GIFReadPlugin::copyImageBlockSet(InfoRec*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 800
5  ImageIO                        0x1a8a0 IIO_Reader::CopyImageBlockSetProc(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 280
6  ImageIO                        0x16370 IIOImageProviderInfo::copyImageBlockSetWithOptions(CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 744
7  ImageIO                        0x1e480 IIOImageProviderInfo::CopyImageBlockSetWithOptions(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 836
8  QuartzCore                     0xa4200 CA::Render::copy_image(CGImage*, CGColorSpace*, unsigned int, double, double) + 2944
9  QuartzCore                     0x1430c -[CAKeyframeAnimation _setCARenderAnimation:layer:] + 468
10 QuartzCore                     0x140cc -[CAKeyframeAnimation _copyRenderAnimationForLayer:] + 172
11 QuartzCore                     0x13908 CA::Layer::commit_animations(CA::Transaction*, double (*)(CA::Layer*, double, void*), void (*)(CA::Layer*, CA::Render::Animation*, void*), void (*)(CA::Layer*, __CFString const*, void*), CA::Render::TimingList* (*)(CA::Layer*, void*), void*) + 780
12 QuartzCore                     0x2620 invocation function for block in CA::Context::commit_transaction(CA::Transaction*, double, double*) + 220
13 QuartzCore                     0x50388 CA::Layer::commit_if_needed(CA::Transaction*, void (CA::Layer*, unsigned int, unsigned int) block_pointer) + 368
14 QuartzCore                     0x50314 CA::Layer::commit_if_needed(CA::Transaction*, void (CA::Layer*, unsigned int, unsigned int) block_pointer) + 252
15 QuartzCore                     0x50314 CA::Layer::commit_if_needed(CA::Transaction*, void (CA::Layer*, unsigned int, unsigned int) block_pointer) + 252
16 QuartzCore                     0x50314 CA::Layer::commit_if_needed(CA::Transaction*, void (CA::Layer*, unsigned int, unsigned int) block_pointer) + 252
17 QuartzCore                     0x50314 CA::Layer::commit_if_needed(CA::Transaction*, void (CA::Layer*, unsigned int, unsigned int) block_pointer) + 252
18 QuartzCore                     0x50314 CA::Layer::commit_if_needed(CA::Transaction*, void (CA::Layer*, unsigned int, unsigned int) block_pointer) + 252
19 QuartzCore                     0x50314 CA::Layer::commit_if_needed(CA::Transaction*, void (CA::Layer*, unsigned int, unsigned int) block_pointer) + 252
20 QuartzCore                     0x50314 CA::Layer::commit_if_needed(CA::Transaction*, void (CA::Layer*, unsigned int, unsigned int) block_pointer) + 252
21 QuartzCore                     0x50314 CA::Layer::commit_if_needed(CA::Transaction*, void (CA::Layer*, unsigned int, unsigned int) block_pointer) + 252
22 QuartzCore                     0x50314 CA::Layer::commit_if_needed(CA::Transaction*, void (CA::Layer*, unsigned int, unsigned int) block_pointer) + 252
23 QuartzCore                     0x50314 CA::Layer::commit_if_needed(CA::Transaction*, void (CA::Layer*, unsigned int, unsigned int) block_pointer) + 252
24 QuartzCore                     0x2f928 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 6320
25 QuartzCore                     0x63630 CA::Transaction::commit() + 652
26 QuartzCore                     0x4c8b4 CA::Transaction::flush_as_runloop_observer(bool) + 88
27 CoreFoundation                 0x91d30 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
28 CoreFoundation                 0x1a280 __CFRunLoopDoObservers + 532
29 CoreFoundation                 0x7bc50 __CFRunLoopRun + 1048
30 CoreFoundation                 0x80eb0 CFRunLoopRunSpecific + 612
31 GraphicsServices               0x1368 GSEventRunModal + 164
32 UIKitCore                      0x3a1668 -[UIApplication _run] + 888
33 UIKitCore                      0x3a12cc UIApplicationMain + 340
34 AmongChat                      0x9944 main + 12 (main.swift:12)
35 ???                            0x1c37d0960 (Missing)
lixiang1994 commented 1 month ago

SDWebImage 似乎也有类似问题https://github.com/SDWebImage/SDWebImage/issues/3515