Hi, I tried the new SDK with Kinect 2 and c# but I cant get it to work. The c++ samples work but unity example crashes. In my c# console app, I get System.AccessViolationException: ‘Attempted to read or write protected memory. This is often an indication that other memory is corrupt.’ on DepthSensor.Create().
Please make sure that you’ve updated both Nuitrack Runtime (to v0.24.0) and Nuitrack SDK (to v1.3.6). Please note that besides added Kinect v2 support, the driver for ASUS Xtion2 was also updated in the latest Nuitrack Runtime as the previous version was not compatible with Kinect v2.
Also take a look at 3D Sensor Known Issues for Kinect v2 in our installation instructions.
As a workaround solution, you can move libSenDuck.dll from OpenNI2/Drivers folder to any other folder if you don’t need support for ASUS Xtion2.
I have the latest versions of both SDK and runtime on x64 system. There is no libSenDuck.dll in OpenNI2/Drivers. Maybe you mean SenDuck.dll? I tried moving it but I get the same error.
I believe the problem has to do with the c# version of the SDK since the c++ samples work fine.
Yes, I meant SenDuck.dll, sorry for misleading info,
Please try to run nuitrack_csharp_sample from Nuitrack SDK. Do you encounter the same error with this sample?
If you use Windows 10, please check “Windows 10 camera, microphone, and privacy” settings: Go to “Start”, then select “Settings > Privacy > Camera”, and tick “Allow apps to access your camera”.
Yes I get the same error with nuitrack_csharp_sample. My windows settings are also ok. Actually all the other cameras (Kinect1, Astra, Astra Pro, Asus Xtion 2 and RealSense D435) work fine.
I updated the SDK to the latest version and now it works. I am not sure what was wrong.
The problem now is that the joints positions from Kinect are reversed compared to those of the other cameras (Real Sense, Astra, etc) and since I can’t get from the SDK which camera is used I dont know how to fix it. Is there a configuration or setting to change that?
To mirror the image, you can either modify nuitrack.config (find the section "DepthProvider" and set "Mirror" to true) or use Nuitrack API (use the DepthSensor::setMirror method).
We’ve updated to the last runtime version 0.27 and we’re still getting random crashes.
Usually, when we run NuiTrack + Kinect, it crashes a few seconds after it started up… we do get several depth frames, and it crashes shortly after receiving some skeletons.
When I say “crash” what happens is that the application suddenly exits without any error.
This is probably happening because at some point within the runtime there’s a problem, but instead of propagating the exception or the error to the C# wrapper, the runtime is probably writing the error to the console (which is invisible to c#) and then doing an application exit.