Hello, I have a problem when I launch my iOS program.
I’m new to swift programming, sorry if my question seems simple but I can’t find anything to solve this problem.
When I try to execute the processFrame function after DeepAr initialization, I get this error:
Thread 1: EXC_BAD_ACCESS (code=1, address=0x17d)
To initialize DeepAR, I first generate a new instance of DeepAR. Then I define my license key, add the delegate and run the initialize function.
The frame that I launch to process frame exist (not nil) and I DeepAr is in isVisionOnly and the visionInitialized return true.
The error is not triggered when I use DeepAR in OffScreen. I guess I’m missing something?
@objc public func initDeepAR(imageWidth :Int, imageHeight :Int)
{
deepARInstance.setLicenseKey("***")
deepARInstance.delegate = deeparDelegate
deepARInstance.initialize()
}
@objc public func proccesFrame(pointer:UnsafeMutableRawPointer,cameraFrontal:Bool)
{
let buffer = createPixelBufferFromTexturePointer(texturePointer: pointer )
print("is vision only : " , deepARInstance.isVisionOnly(), " | ",deepARInstance.visionInitialized)
print("Buffer exist : ",buffer != nil)
deepARInstance.processFrame(buffer, mirror: true)
}
Thanks