Azure-Samples / azure-ai-vision-sdk

SDK for Microsoft's Azure AI Vision
MIT License
75 stars 46 forks source link

FaceRecoEngineAdapter - MapHResults.h:17 - EXC_BAD_ACCESS - iOS #80

Closed rezamagnet closed 2 months ago

rezamagnet commented 3 months ago

Please provide us with the following information:

Minimal steps to reproduce

I'm adding SPM to my UIKit project and adding LivenessActor.swift file from sample to my project, when I call start(usingSource: visionSource, sessionAuthorizationToken: token) function most of the time I'm facing the issue in image below:

Azure issue

Any log messages given by the failure

5 Microsoft::CognitiveServices::Speech::Impl::FaceRecoEngineAdapter::CSpxFaceRecoEngineAdapter::GentlemenStartYourFaceEngines(Microsoft::CognitiveServices::Speech::Impl::RecoEngineAdapterMode, Microsoft::CognitiveServices::Speech::Impl::Either<Microsoft::CognitiveServices::Speech::Impl::Media::MediaOffset, Microsoft::CognitiveServices::Speech::Impl::Media::LiveMediaPosition>, std::__1::shared_ptr const&) at /Users/runner/work/1/s/source/core/vision_recognizers/face_reco_engine_adapter/source/face_reco_engine_adapter.cpp:1012

4 0x00000001037b5650 in FaceEngine_CreateImageFromBuffer ()

this is my last stack thread issue.

Expected/desired behavior

It's crashed on this state

OS and Version?

iOS 16.7.5

Mention any other details that might be useful

I want to know what would be happens this crash occurred that I can fix that if I'm doing wrong


Thanks! We'll be in touch soon.

dipidoo commented 3 months ago

Thank you for your report. Could you please detail a few more things:

rezamagnet commented 3 months ago

Thanks @dipidoo Sure,

Until now i'm investigating the issue, I found when I add a reference image to LivenessActor this issue occurs, I'll send you briefly of my code:

Screenshot 2024-04-08 at 9 37 17 AM as you can see when I add a reference image here, my crash occured.

for your answer I'm just reading from main branch with commit bf640ff for vision face framework, of course be appreciate if you could give me a link to find latest versions of the frameworks. my testing phone is iPhone X, memory is 187 MB

dipidoo commented 3 months ago

Hi,

As best practice, the VerifyImage should be set during token creation. Please refer to the API Documentation and sample code (iOS) (Android) on how to set it.

rezamagnet commented 2 months ago

Hi, we followed as you told me about best practices and the problem goes. so I close this issue. Thanks