bibigone / k4a.net

K4A.Net - Three-in-one .NET library to work with Azure Kinect devices (also known as Kinect for Azure, K4A, Kinect v4). It includes sensor API, recording and playback API, body tracking API. Samples for WPF, .NET Core and Unity are included.
MIT License
165 stars 39 forks source link

Unity crashes on exit standalone app #29

Closed STak4 closed 3 years ago

STak4 commented 4 years ago

hi, thank you for the awesome library. I'm faced with a problem that crash (freeze) on Unity standalone app. It seems to be related body tracking.

How to reproduce

  1. Make new scene on Unity
  2. Create a game object for K4A
  3. Attach "CaptureManager" and "SkeletonProvider" to the object
  4. Save and Build scene (Standalone, Windows x86_64)
  5. Open build folder and check DLLs (I placed on same directory of .exe)
  6. Open the application and wait few seconds (Because it takes time to use body tracking)
  7. Press Alt+F4 (I tried quit by coding but same result)

How can I safely quit?

bibigone commented 4 years ago

Hello @ShogoTakagi, Thank you for reporting and sorry for delayed reply. I cannot reproduce such crashing, but I've addressed minor improvements in the latest version that can help. Could you please give it a try.

mhaenke commented 3 years ago

experiencing a similar issue. in the editor the program exits successfully. once compiled the program becomes non-responsive on exit.

it seems to be a azure kinect problem https://github.com/microsoft/Azure-Kinect-Sensor-SDK/issues/1257

*i should point out am not using the latest release. just wanted to identify its not a unique issue

mhaenke commented 3 years ago

@ShogoTakagi the latest version fixes this issue. The k4a.dll, onnxruntime.dll ... files need to be left in the .\Plugins folder (previously I had to move them to the .\build folder for the body tracking to work).

thank you @bibigone