firebase-ios-sdk: SDK 7.5.0 crash when client calls iOS Vision framework

Step 1: Describe your environment

  • Xcode version: 12.4
  • Firebase SDK version: 7.5.0
  • Installation method: CocoaPods
  • Firebase Component: Crashlytics

Step 2: Describe the problem

SDK crashes when attempting to calculate saliency using iOS Vision framework calling VNGenerateAttentionBasedSaliencyImageRequest(). The issue is not present in Firebase SDK 7.4.0.

Screen Shot 2021-01-28 at 2 22 53 PM Screen Shot 2021-01-28 at 2 12 25 PM Screen Shot 2021-01-28 at 2 17 42 PM

Steps to reproduce:

The crash happens whenever the client tries to calculate saliency. It happens on any image 100% of the time. Removing the call to VNGenerateAttentionBasedSaliencyImageRequest() or switching to Firebase SDK 7.4.0 avoids the issue and Firebase SDK no longer crashes.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 17 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Thank you @chrisvasselli for the repro case 👍 and everyone for the info. Somehow it still doesn’t crash for me, but I believe we know what the bug is. Going to update to the newest macOS to see if that’s the issue because I believe everything else with my environment matches reports here. It’s likely a race condition based on the code.

We’re going to post a change later today that should fix this issue, while still keeping the startup performance zippy (which was the initial reason for the change in 7.5.0 that caused this bug).

Could folks try out the change once it comes out?

I should be clear the only framework we’re using in our application is Crashlytics (and any dependencies it may be using.)

The same happens since 7.5.0 on my M1 machine, also only in simulator. Using Xcode Version 12.4 (12D4e)

image

Hey @hingarn, apologies for this. We’re looking into the issue but for now please downgrade to 7.4.0.