Nuke
Nuke copied to clipboard
Crash in ImagePipeline
Im using a LazyImage with a ImagePipeline. It is crashing consistently when the image is being fetched. Im using the latest Nuke release 12.1.6. (crashes as well on 12.0.0)
Here is the code. Below you can find the stacktrace.
@MainActor
public struct MyView: View {
static let imagePipeline = ImagePipeline(configuration: .withDataCache(sizeLimit: 10 * 1024 * 1024))
...
public var body: some View {
...
LazyImage(url: url) { state in
if let image = state.image {
image.resizable().aspectRatio(contentMode: .fill)
} else if state.error != nil {
Color.clear // indicates an error
} else {
Color.clear // acts as a placeholder
}
}.pipeline(Self.imagePipeline)
...
}
}
Stacktrace:
Thread 11 Crashed:: Dispatch queue: com.github.kean.Nuke.ImagePipeline
0
The crash does not happen always but quite often.
Hey, thanks for the report. From the top of my head, I'm not sure what might might be causing the crash.
I see in the report that the Nuke APIs are reported as part of the DesignSystemFramework
. Is it a custom framework? Was the code from the framework modified?
DesignSystemFramework
is a dynamic library inside a local Swift package. Nuke(UI)
was not modified in any way.
We found out in the meantime that if we remove .pipeline(Self.imagePipeline)
then there is no crash.
Hi, are you still able to reproduce this crash? Is it OK to close the issue?
I will check and let you know. Just give me some time. BTW, did you apply any fix?
niedz., 18 lut 2024 o 18:57 Alex Grebenyuk @.***> napisał(a):
Hi, are you still able to reproduce this crash? Is it OK to close the issue?
— Reply to this email directly, view it on GitHub https://github.com/kean/Nuke/issues/731#issuecomment-1951399052, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEUHNYV4LVBHMK76QOIOEOLYUI6HTAVCNFSM6AAAAAA6FHBQ3GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJRGM4TSMBVGI . You are receiving this because you authored the thread.Message ID: @.***>
No, I don't think I've made any changes that could affect this part of the framework.