videokit-ai / videokit

Low-code, cross-platform media SDK for Unity Engine. Register at https://videokit.ai
https://videokit.ai
Apache License 2.0
107 stars 14 forks source link

Failed to create MLModel from graph data - with VideoKit 0.0.17 - crash or no image from camera. #97

Closed LoopIssuer closed 5 months ago

LoopIssuer commented 10 months ago

Hi With the new VideoKit we use HumanTexture. There is an issue - the application crashes after the start or sometimes after the camera start or sometimes there is no crash, but the camera cannot be started after one successful start. We get 2 kinds of exceptions. Also please take a look into the attached logs:

IOException: Sharing violation on path /var/mobile/Containers/Data/Application/C84AD848-7FCB-4493-8F64-1ABA9BABE661/Documents/natml/ecb071a5a8b17481b15a91b5de309920.nml
NatML.MLEdgeModel.CacheSession (NatML.API.Types.PredictorSession session, System.Byte[] graph) (at <00000000000000000000000000000000>:0)
ArgumentException: Failed to create MLModel from graph data
NatML.MLEdgeModel.Create (System.String tagOrPath, NatML.MLEdgeModel+Configuration configuration, NatML.API.NatMLClient client) (at <00000000000000000000000000000000>:0)

videokitCameraIssue2.txt

videokitCameraIssue.txt

I would like to add, that we already cleared the cache with NatML and Function menu toolbar options - it didn't help. Tested on: iPhone13,4 OS version: iOS 17.2.1

olokobayusuf commented 10 months ago

Will get back to you on this, thanks for reporting it.

LoopIssuer commented 9 months ago

Hi @olokobayusuf How is it going with fix for this issue? Currently, we found that it may be connected with changing camera (Camera.Discover()) or camera initialization because we crash when we load a scene with Videokit, unload, load again, etc. and after 5-6 times we have crash. Only on iOS. So maybe it some kind of memory leak or sth - maybe there is workaround for that?

olokobayusuf commented 5 months ago

Fixed in VideoKit 0.0.18. Feel free to confirm with the latest VideoKit alpha.