Kingfisher icon indicating copy to clipboard operation
Kingfisher copied to clipboard

Crash when loading gif (Use the specified commit: 229f637beeb7b4ef81006e951a17a7cf2c52ccf0)

Open Goodman333 opened this issue 2 years ago • 7 comments

Check List

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

Issue Description

What

Crash when loading gif, use the specified commit: 229f637beeb7b4ef81006e951a17a7cf2c52ccf0 (A rare crash from _UIImageCGImageContent when loading GIF files on iOS 15 or later. https://github.com/onevcat/Kingfisher/pull/2004)

Reproduce

Hard to reproduce. I reproduced it on the first installation.

Other Comment

Here is the crash log: Thread 2 name: Dispatch queue: com.onevcat.Kingfisher.Animator.preloadQueue Thread 2 Crashed: 0 libsystem_platform.dylib 0x1e2524a74 _platform_memmove + 420 1 CoreFoundation 0x195d66b74 CFDataGetBytes + 380 2 ImageIO 0x19ae2f888 CGImageGetImageSource + 156 3 UIKitCore 0x197fd9dc4 -[_UIImageCGImageContent initWithCGImage:scale:] + 40 4 UIKitCore 0x197fd9d5c -[UIImage initWithCGImage:scale:orientation:] + 68 5 Rolls-Royce Whispers Live 0x10331a3a0 AnimatedImageView.Animator.loadFrame(at:) + 7316384 (AnimatedImageView.swift:558) 6 Rolls-Royce Whispers Live 0x10331a75c AnimatedImageView.Animator.updatePreloadedFrames() + 7317340 (AnimatedImageView.swift:591) 7 Rolls-Royce Whispers Live 0x102f9fbb8 thunk for @escaping @callee_guaranteed () -> () + 3668920 (:0) 8 libdispatch.dylib 0x19d1144b4 _dispatch_call_block_and_release + 32 9 libdispatch.dylib 0x19d115fdc _dispatch_client_callout + 20 10 libdispatch.dylib 0x19d11d694 _dispatch_lane_serial_drain + 672 11 libdispatch.dylib 0x19d11e1e0 _dispatch_lane_invoke + 384 12 libdispatch.dylib 0x19d128e10 _dispatch_workloop_worker_thread + 652 13 libsystem_pthread.dylib 0x1e25b8df8 _pthread_wqthread + 288 14 libsystem_pthread.dylib 0x1e25b8b98 start_wqthread + 8

Goodman333 avatar Nov 04 '22 02:11 Goodman333

I got similar crash: 20221115172749

xinyzhao avatar Nov 15 '22 09:11 xinyzhao

@xinyzhao

It seems that you are using an older version. Can you verify and get the same with the latest Kingfisher version 7.4.1?

onevcat avatar Nov 15 '22 09:11 onevcat

@onevcat Sorry, I can't reproduce this problem on the new version.

xinyzhao avatar Nov 16 '22 07:11 xinyzhao

We reproduced the problem:

Thread 14 name:   Dispatch queue: com.onevcat.Kingfisher.Animator.preloadQueue
Thread 14 Crashed:
0   CoreFoundation                           0x18ef16a8c CFDataGetBytes + 148
1   ImageIO                                  0x193fbf964 CGImageGetImageSource + 156
2   ImageIO                                  0x193fbf964 CGImageGetImageSource + 156
3   UIKitCore                                0x19118acec -[_UIImageCGImageContent initWithCGImage:scale:] + 40
4   UIKitCore                                0x19118ac84 -[UIImage initWithCGImage:scale:orientation:] + 68
5   Rolls-Royce Whispers Stage               0x102a103ac AnimatedImageView.Animator.loadFrame(at:) + 6931372 (AnimatedImageView.swift:558)
6   Rolls-Royce Whispers Stage               0x102a10770 AnimatedImageView.Animator.updatePreloadedFrames() + 6932336 (AnimatedImageView.swift:591)
7   Rolls-Royce Whispers Stage               0x1023f00f8 thunk for @escaping @callee_guaranteed () -> () + 508152 (<compiler-generated>:0)
8   libdispatch.dylib                        0x1962904b4 _dispatch_call_block_and_release + 32
9   libdispatch.dylib                        0x196291fdc _dispatch_client_callout + 20
10  libdispatch.dylib                        0x196299694 _dispatch_lane_serial_drain + 672
11  libdispatch.dylib                        0x19629a1e0 _dispatch_lane_invoke + 384
12  libdispatch.dylib                        0x1962a4e10 _dispatch_workloop_worker_thread + 652
13  libsystem_pthread.dylib                  0x1db489df8 _pthread_wqthread + 288
14  libsystem_pthread.dylib                  0x1db489b98 start_wqthread + 8

Goodman333 avatar Dec 30 '22 10:12 Goodman333

Hi, @onevcat ,We reproduced the problem again MicrosoftTeams-image (2)

MicrosoftTeams-image (3)

Goodman333 avatar Jan 19 '23 10:01 Goodman333

same problem version: 7.4.1 any ideas?

HIIgor avatar Feb 15 '23 12:02 HIIgor

Xnip2023-05-06_15-33-56 image

same error
version: 7.6.1

LionWY avatar May 06 '23 07:05 LionWY