Azure-Kinect-Sensor-SDK icon indicating copy to clipboard operation
Azure-Kinect-Sensor-SDK copied to clipboard

K4AViewer doesn't have a clear error when Depth Engine is missing

Open DerekMa-WP opened this issue 7 years ago • 6 comments

If the Depth Engine DLL is missing and you try to start streaming, the error message is a generic "Failed to start device!" error. Ideally K4AViewer would let you know that the Depth Engine DLL is missing. This would require adding a function call to check for the Depth Engine or adding error codes to indicate such a thing.

DerekMa-WP avatar Mar 28 '19 00:03 DerekMa-WP

The only signal the API provides to the viewer to indicate what went wrong is the return code for k4a_device_start_cameras (it's K4A_RESULT_FAILED instead of K4A_RESULT_SUCCEEDED). This doesn't really provide clients of the API a way to differentiate between "the firmware on your camera crashed" and "you don't have the depth engine installed", so I think for this to happen we'd need to add more detailed status codes.

Alternatively, there's ongoing work (#169 ) to add an API to allow client apps to capture trace messages. If one of those says "depth engine not found" and we're willing to take a dependency on the text of that message (we might not be, I don't love the idea of having a hard dependency on what is essentially debug output), we could have something listen for that message when starting the device and surface it that way

williampMSFT avatar Mar 28 '19 01:03 williampMSFT

now when the trace panel is visible this gets mitigated. Here's some error spew that gets out

[ error ] : dynlib_create(). Failed to load DLL depthengine_1_0 with error code: 126 [ error ] : load_depth_engine(). Failed to Load Depth Engine Plugin (depthengine). Depth functionality will not work [ error ] : load_depth_engine(). Make sure the depth engine plugin is in your loaders path

joylital avatar Apr 16 '19 15:04 joylital

Since this is mitigated by the trace messages, I'm closing the issue.

Brent-A avatar May 07 '19 21:05 Brent-A

latest version can't open device , trace just like above , 0.8 worked

wangniancai avatar Jun 19 '19 12:06 wangniancai

@wangniancai the Windows MSI for 1.1.0 is working as expected. Feel free to open a new issue that captures details about your specific issue, and we will work through it.

wes-b avatar Jun 19 '19 16:06 wes-b

@wangniancai if you're seeing the same trace as above, it means the depth engine wasn't found. Please ensure depthengine_1_0.dll is present and adjacent to k4aviewer.exe. You can get the depth engine for Windows from the public Windows MSI.

williampMSFT avatar Jun 19 '19 16:06 williampMSFT