FIXED: Kinect Azure CHOP Console Errors

Whenever I run the Azure CHOP, the text console constantly spits out this:

[2021-01-15 00:28:09.257] [error] [t=4380] [K4ABT] Invalid k4abt_frame_t 0000000000000000
[2021-01-15 00:28:09.257] [error] [t=4380] [K4ABT] D:\a\1\s\src\sdk\k4abt.cpp (198): Invalid argument to k4abt_frame_get_capture(). body_frame_handle (0000000000000000) is not a valid handle of type k4abt_frame_t

I noticed this because when I was using Da’s OpenCV Custom OP it would crash TD. If I created the Kinect Azure TOP + CHOP first and then the OpenCV TOP, no crash. But if I created the Azure CHOP after the OpenCV TOP, it would result in a crash.

I’m using the latest SDK (1.4.1) and Firmware (1.6.110079014) from here:

Should I roll back to an earlier version?

I rolled back to SDK v1.2 and it works. I still gives that error, but at least TD doesn’t crash. Any idea why the newer SDKs cause it to crash?

Having fun tonight!

So I updated back to SDK v1.4.1 and TD experimental build 2020.45520 doesn’t crash! HOWEVER, the OpenCV TOP gives this error

C++ Exception thrown during execute(): OpenCV(4.5.0) ..\modules\objdetect\src\cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function 'cv::CascadeClassifier::detectMultiScale' 1012    281 abort   TOP

If I delete the TOP and add one back in, it then works fine.

And then if I delete the Azure CHOP and then add it back, that error pops up again.

Thanks for the report. I can see the error message in my console and will take a further look into it.

Even if I toggle off and then on the Active parameter on the Azure CHOP, it will cause the OpenCV TOP to error.

I’ve got an update now that stops the error message in the console window. The error was occurring on frames that didn’t have a body tracking update ready. I did try installing the opencv facedetect top as well, but unfortunately I was never able to produce a crash with it (although I’m not sure the face detection was working correctly anyways).

If you want to try the update, you can download it here:

Hopefully this fixes the crashes for you, but let me know if you’re still having problems.

Thanks for the update, I can check it out in a few hours.

I should’ve been more clear about the crashes, they were happening in the official builds. I think I was using 2019.25xxx but it might’ve also been happening in the most recent one.

Experimental just threw up that error on the OpenCV TOP, so as a quick fix I just made a script to delete and create a new top if there’s a error detected.

If your update fixes the issue, do you know how long it’d be until it made it into an official build? I got an upcoming installation and I’m a little concerned running it off an experimental build (although so far it’s been stable)

Thank you!

Thanks for the clarification. I should have checked the official series as well.

I can reproduce the crash in 2020.27390, but it seems to be inside the opencv library so I can’t really tell how the kinect might be affecting it.

I’m not sure what the schedule is for further 20000 series releases is at the moment, but I should be able to move the kinect patch over to the official series and get you a custom build.

I’ll let you know how it goes.

Hey Rob,

I still get the error referenced in the 3rd post in the 45940 build (and it also crashes in the recent official build 28110, there should be a .dmp file in the attached file). I put together a quick project that should exemplify the issue, the OpenCV TOP should work correctly in this. Just activate the Azure CHOP, in the 45xxx builds, you’ll get an error on the TOP, in the official builds you’ll get a crash. But ya, not sure if this is an issue with the OpenCV TOP code (it’s pretty basic boilerplate stuff) but I can ping Da, the creator of the TOP, if you think it is.

A quick google search of the opencv error says that it’s not loading the cascade file properly. I’m not sure why activating the Azure CHOP would mess with the OpenCV TOP’s ability to locate the cascade even after it had already successfully located it.

Thanks for the extra information. I’ll take a look at your project in the morning, but based on the comment about the cascade file, I think it might be an issue with the current working directory.

There was an issue with the Kinect Azure CHOP when I first added it last year related to finding the AI model file which turned out to be caused by another system changing what directory it was looking in. I added a patch to fix this for the Kinect, but I suspect this is interfering somehow with opencv loading its files.

I’ll let you know what I find

I have confirmed that it is the process of changing the working directory when loading the kinect ai models that is interfering with the opencv module somehow. If I remove that code, I no longer get the crash in opencv.

I’m just investigating now what the best fix is that will keep both systems working.

1 Like

Sorry for the delay. I’ve attached the most recent version of our 20k series that should fix both the tracking error in the console and the conflict with opencv. Let me know if you’re still having problems.

Yup that seems to do it, thanks for the quick fix!

1 Like