I am getting this assertion causing my app to crash line 479 of Image.swift. In log the following error was also visible before the assertion:
CGBitmapContextCreate: unsupported parameter combination: set CGBITMAP_CONTEXT_LOG_ERRORS environmental variable to see the details
I have deleted the assertion and though I am not getting any blur, at least the app no longer crashes.
Hey.
It might be caused by some strange format of that image. May I know the image url (or the image itself) crashes your app? So I could have a look at what happen indeed.
Thanks.
Sure here is the image url: https://s3.amazonaws.com/winering-production/10906-313f1f875b62f3a-full
Should be fixed in #567.
There are some other work to do before a new version could be released. I will tag it later ASAP.
@onevcat Tomorrow I migrate Kingfisher to 5.0, after I received this bug.
@onevcat Hello, I'm getting this issue on last Kingfisher 5.1.0
Same issue in here , while scrolling it getting crashed
@anhhtbk @salyasev @Eldhopj May I know what image causes this problem? Is there a link or an image I can use to reproduce this issue?
Same crash, but line 505 in ImageDrawing.swift.
It will happen when using DownsamplingImageProcessor while scrolling
Everything time it is crashed by a same png image, but I did not fine any abnormal for this image.

imageView.kf.setImage(
with: viewModel.thumbnailURL,
placeholder: nil,
options: [
.processor(DownsamplingImageProcessor(size: imageView.bounds.size)),
.scaleFactor(UIScreen.main.scale),
.cacheOriginalImage
])
After some investigation, the root cause is that for collectionview, cell can partially show up and actual imageView has not show up yet, but I really do not know why it only crash for the cell with same image.
@onevcat
crash happens when the imageview size is zero also
@seanliu1 Not quite sure about it. The image itself seems fine.
Is there any crash log for it?
@Eldhopj The crash of DownsamplingImageProcessor for zero or negative size should be already fixed in #1074, can you confirm that you are using the latest version?
This problem also occurs when using ResizingImageProcessor with a referenceSize of CGSize.zero
The ResizingImageProcessor should be failing with an assertionFailure, which is intended as a warning of incorrect usage of this API. It behaves as a reminder when developing, and will not crash in a release build.
Most helpful comment
@onevcat
crash happens when the imageview size is zero also