Sdwebimage: CFDictionaryGetValue EXC_BAD_ACCESS KERN_INVALID_ADDRESS

Created on 4 Nov 2020  路  6Comments  路  Source: SDWebImage/SDWebImage

New Issue Checklist

Issue Info

Info | Value |
-------------------------|-------------------------------------|
Platform Name | iOS
Platform Version | 13.5.0 to 14.1.0
SDWebImage Version | 5.9.4
Integration Method | cocoapods
Xcode Version | Xcode 12.1
Repro rate | 70%
Repro with our demo prj | ?
Demo project link | ?

Issue Description and Steps

Hello,
we recently released new version of our application and suddenly new crash began to appear. Our crash-free users dropped to 75% because of this problem and I don't know what to do. Log from Firebase was not very helpful at first. Then I was able to reproduce issue in Xcode which leads me to SDWebImage. Please see attached screenshots.

firebase

xcode

In our application we display many images in galleries using SDWebImage or pre-download images for offline use.
I can reproduce this crash almost consistently when downloading lots of images using SDWebImage, e.g. like this:

SDWebImageManager.shared.loadImage(with: url, options: SDWebImageOptions(), progress: nil) { (image, data, error, cacheType, finished, imageUrl) in
    #if DEBUG
    print("Downloaded image: \(finished) - \(url)")
    #endif
}

Bellow is attached crash log.

crashlog.crash.zip

Any help is appreciated.
Thanks in advance!

Most helpful comment

Alright, application update was released and issue has gone. It was caused by FirebasePerformance, as stated above. I'm closing this issue. Thanks and sorry for misunderstanding.

All 6 comments

Don't mind.
I found problem was caused by FirebasePerformance at first place, which later caused crash while downloading images using SDWebImage. More informations about this issue is here:

https://github.com/firebase/firebase-ios-sdk/issues/6734

You can close this issue. Thank you.

馃槩 Sorry for delay reply. I'm working on daily job and forgot this issue.

Does that FirebasePerformance the root case cause this ? Upgrade to new version solve this issue ?

Yes. Problem is in library FirebasePerformance 7.0.0. I upgraded to version 7.0.1, which fixed the issue. I wasn't able to reproduce the crash no longer. I uploaded application update and waiting for Apple review at the moment. Once the update is released, I can confirm issue is fixed for real.

Alright, application update was released and issue has gone. It was caused by FirebasePerformance, as stated above. I'm closing this issue. Thanks and sorry for misunderstanding.

I'm updating Firebase/Performance Pod by specifying version 7.0.1 it gives me this,
$ pod install --repo-update

[!] CocoaPods could not find compatible versions for pod "Firebase/Performance":
In Podfile:
Firebase/Performance (= 7.0.1)

None of your spec sources contain a spec satisfying the dependency: Firebase/Performance (= 7.0.1).

You have either:

  • mistyped the name or version.
  • not added the source repo that hosts the Podspec to your Podfile.

And when I do pod update it installs 6.34.0 version. So how to update to 7.0.1 ?
I also tried by removing / (Slash) it also installs 6.34.0 version but it updates FirebasePerformance (3.3.1) to FirebasePerformance (3.3.2), does it fix crash ?

They already released version 7.1.0: https://firebase.google.com/support/release-notes/ios
If you use version 6.34.0, then you are fine, because crash appeared in version 7.0.0 only. They did many changes in 7.0.0, according to changelog.

Was this page helpful?
0 / 5 - 0 ratings