Alamofire / AlamofireImage

AlamofireImage is an image component library for Alamofire
MIT License
3.99k stars 523 forks source link

CGDataProviderCopyData crash in production #439

Closed alexge closed 3 years ago

alexge commented 3 years ago

What did you do?

We use SPM to add AlamoFireImage as a dependency to download, cache, and show images across numerous collection views in the app. We are using the given af.setImage(withURL....) function on our UIImageViews.

What did you expect to happen?

Images to download and show as expected

What happened instead?

Overall this works great. I've never seen an issue, but I have received 2 crash reports from Apple of the same crash on CGDataProviderCopyData. The first was on an iPhone 8 Plus and the second was on an iPhone SE, both running iOS 14.4.

image

Looking at the stack trace, it seems to come from ImageResponseSerializer which is in the library, so I don't have much more information to go on. Any thoughts you might have to fixing this or ideas for further investigation would be greatly appreciated.

Alamofire Environment

Alamofire version: 4.1 Xcode version: 12.4 Swift version: 5 Platform(s) running AlamofireImage: iOS 12-14 macOS version running Xcode: 10.15.6

jshier commented 3 years ago

This is likely a duplicate of #332, caused by downloading images which are too large to inflate into memory. There's a workaround in that thread.