Closed alastaira closed 4 years ago
Error is quite generic, so the issue can be everywhere. Are you using the Kinect V1 or the newer V2?
The issue might be either the Kinect Plugin, AForge or System.Drawing. Does the "KinectSample" runs fine, or does it crash as well? If it runs fine, remove the AForge.Net References and test again:
If that fails again, test if it is the System.Drawing by commenting out the "FilterImage" call (https://github.com/jloehr/AR-Sandbox/blob/master/Assets/Script/DepthMesh.cs#L64). Or by removing the System.Drawing.dll from the ProjectFolder and removing every reference to it.
Yeah, it is pretty generic I know! I'm using the Kinect v1 (Xbox 360) version. and it seems that it might be a problem with the driver, as several users have reported a similar problem with a different Unity Kinect asset, here: https://forum.unity3d.com/threads/kinect-with-ms-sdk.218033/page-4 . I've tried that asset and get the same result - it works for around 40 seconds and then a "Device Not Initialised" error, which seems like it could be the same as generating the Access Violation here but not being caught.
Unity tech confirmed that it's a problem with the driver but, unfortunately, none of the suggested resolutions (uninstalling/reinstalling all previous NiTE/OpenNI/MS-SDK drivers, or downgrading to Unity 4.x) have worked.
Okay, easy solution would be to use the Kinect V2 with its official Plugin instead. I don't have Kinect V1 right now, so i am unable to reproduce it. Have you tried my other suggestions?
Hi! I can get the depth mesh scene to work correctly for somewhere between 10 seconds - 40 seconds, but then it always completely crashes out Unity. The error log states:
Unity Editor [version: Unity 5.4.3f1_01f4c123905a] Unity.exe caused an Access Violation (0xc0000005) in module Unity.exe at 0033:0000004d.
And the editor log states:
RtlLookupFunctionEntry returned NULL function
Any ideas?