A very serious issue has occurred. I urgently request a prompt response. "initializeOffscreen dosent work with new version of deepAR"

"I’m using an older version of DeepAR, probably around version 4. In that version, I’m using initializeOffscreen and a custom camera to capture frames. After receiving the frame buffer, I render it in DeepAR using the deepAR.enqueueCameraFrame(sampleBuffer, mirror: self.mirrorCamera) function. Then, I display the rendered filter on the screen using frameAvailable. However, I’m facing several issues.

Here is the code I use when starting DeepAR:


    public func initializeWithFrameSize(frameWidth: Int, frameHeight: Int, metalView: MetalView) {
        self.metalView = metalView
        self.deepAR = DeepAR()
        self.deepAR.delegate = self
        // 이거 안하면 안나옴;
//        let arView = self.deepAR.createARView(withFrame: self.view.bounds)
//        self.deepArView = arView
        deepAR.initializeOffscreen(withWidth: Int(frameWidth), height: Int(frameHeight))
        self.setDeepAREffectByPath(slot: .face, path: DeepAREffects.makeup_kim.rawValue.path)


  1. When I switch to a new version, even if I use initializeOffscreen, the frameAvailable callback doesn’t seem to be triggered. I previously asked a question about this issue, and the suggested solution was to use startCapture, but that also doesn’t work. I tried placing startCapture inside didInitialize, but it still doesn’t work. However, it works in the older version, so I feel like there’s no explanation for what changed in this new version 5.5.2. We’ve been using this SDK for almost two years as a company, and I find this situation quite problematic. Please note that this topic is from my personal account.
  2. I’m currently using version 4.x, and I’m using filters that rely on face tracking. The problem is that when the face is not detected, the frames become choppy. Even when testing with filters provided by deepAR as free assets, the same issue occurs. How can I resolve this problem?"

“I’ve noticed a few things: When I execute self.deepAR.changeLiveMode(false) , didInitialize doesn’t run at all. Moreover, if I set it to true or don’t use it, didInitialize runs normally, but it doesn’t reach frameAvailable . Lastly, if self.deepAR.changeLiveMode(false) is executed after didInitialize has run, then at deepAR.processFrame(pixelBuffer, mirror: self.mirrorCamera) or deepAR.enqueueCameraFrame(sampleBuffer, mirror: self.mirrorCamera) , I encounter a ‘Thread 7: EXC_BAD_ACCESS (code=1, address=0x0)’ error and the app crashes.”

1 Like

Thanks for the report, we’re looking into it.

how can i get a lower version of deepAR SDK for ios?

What method did you use for adding the SDK?
If it’s added as a package dependency, the version can be specified in the project setting under “Package Dependencies” or if you’re using CocoaPods it can be specified in the Podfile.

"This is what I found when I tried to receive all versions through CocoaPods and checked:

  1. When I update by specifying a specific version like this: pod 'DeepAR', '5.4.1', it seems that versions earlier than 5.3.0 do not exist. Here is the error log:
[!] CocoaPods could not find compatible versions for pod "DeepAR":
  In Podfile:
    DeepAR (= 5.2.0)

None of your spec sources contain a spec satisfying the dependency: `DeepAR (= 5.2.0)`.

You have either:
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

  1. Starting from version 5.4.2, the mentioned initializeOffscreen bug is present. While thread priority issues seem to have been resolved, from version 5.4.2 to the latest version, didInitialize does not execute when initializeOffscreen is called.

Please be aware of this bug and if it gets resolved, kindly reply to this topic. Currently, I’ll continue using version 5.4.1."

If you have any further questions or need assistance with resolving the issues you mentioned, please feel free to ask.

1 Like

I also need a solution here ASAP. Either a fix or a way to download an older SDK release that works. Quick assistance would be much appreciated!

I’ve sent you 5.5.1 to test with

1 Like

latest version 5.5.2 still has bug.