Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash at ImageContext.swift line 84. EXC_BAD_ACCESS (SIGSEGV) #2230

Open
3 tasks done
MartinZary opened this issue Apr 13, 2024 · 1 comment
Open
3 tasks done

Crash at ImageContext.swift line 84. EXC_BAD_ACCESS (SIGSEGV) #2230

MartinZary opened this issue Apr 13, 2024 · 1 comment

Comments

@MartinZary
Copy link

Check List

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

Issue Description

EXC_BAD_ACCESS (SIGSEGV) crash at ImageContext.swift line 84

What

Shortly after app launch we are presenting an image in a SwiftUI view using KFImage. Crash is occurring intermittently.
In all cases the url of the image is the same and is retrieved from a CDN. The KFImage is backed by a placeholder which is loaded from an image included in the app asset catalog.
Crash is not specific to a device type nor iOS version.
Kingfisher version 7.6.1

Reproduce

We have yet to be able to reliably reproduce this issue, but it is occurring for ~3% of our user base.

Other Comment

Excerpt of code:

struct SomeView: View {
    @ObservedObject var viewModel: SomeViewModel
    
    var body: some View {
        ZStack {
            VStack {
                Spacer()
                Text("Hello World")
                Spacer()
            }
            someImage
        }
        .frame(maxWidth: .infinity, maxHeight: .infinity)
    }
    
    private var someImage: some View {
        KFImage(viewModel.imageUrl)
            .placeholder {
                somePlaceholder
            }
            .resizable()
            .aspectRatio(contentMode: .fill)
    }
    
    private var somePlaceholder: some View {
        Image(viewModel.placeholder)
            .resizable()
            .aspectRatio(contentMode: .fill)
    }
}

Crash Report
KF_ImageContext_Crash.txt

@vapor-pawelw
Copy link

vapor-pawelw commented Apr 30, 2024

Having the same issue - crash on the same line, on app launch. Using Kingfisher 7.10.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants