You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A memory leak and 100% cpu occurs from a loop caused by using startLoadingBeforeViewAppear() on a KFImage with a nil url.
Each time the view body is called, the "binder.start" is called and fails the initial context.source guard, which then triggers objectWillChange, and then restarts the loop of attempting to re-render the body. This continues to happen since "loadingOrSucceeded" will always return false for nil URLs.
Reproduce
Example code:
let optionalImageURL: URL? = nil
KFImage(optionalImageURL)
.startLoadingBeforeViewAppear()
Call stack:
#0 in closure #1 in KFImage.ImageBinder.start<τ_0_0>(context:) at SwiftUI/ImageBinder.swift:61
#1 in closure #2 in CallbackQueue.execute(_:) at Utility/CallbackQueue.swift:54
#2 in OS_dispatch_queue.safeAsync(_:) at Utility/CallbackQueue.swift:78
#3 in CallbackQueue.execute(_:) at Utility/CallbackQueue.swift:54
#4 in KFImage.ImageBinder.start<τ_0_0>(context:) at SwiftUI/ImageBinder.swift:55
#5 in closure #1 in KFImageRenderer.body.getter at SwiftUI/KFImageRenderer.swift:41
Other Comment
Kingfisher version: 7.5.0
iOS version: 16.X
The text was updated successfully, but these errors were encountered:
Check List
Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.
Issue Description
What
A memory leak and 100% cpu occurs from a loop caused by using startLoadingBeforeViewAppear() on a KFImage with a nil url.
Each time the view body is called, the "binder.start" is called and fails the initial context.source guard, which then triggers objectWillChange, and then restarts the loop of attempting to re-render the body. This continues to happen since "loadingOrSucceeded" will always return false for nil URLs.
Reproduce
Example code:
Call stack:
Other Comment
Kingfisher version: 7.5.0
iOS version: 16.X
The text was updated successfully, but these errors were encountered: