TD crashing when using HandTracking in OAKExamples.toe

I am trying to use my OAK-1 camera for hand tracking. I am working on Windows 11 and attempted to use the OAK examples provided in TD, located at:
C:\Program Files\Derivative\TouchDesigner\Samples\OAK\OAKExamples.toe.

After disabling the “Use3D” button in the “handTracking” container and initializing the camera, everything appears to work fine. However, as soon as I place my hand in front of the camera, TouchDesigner freezes and crashes. I noticed that the “oakselect_joints” CHOP is receiving data right before TouchDesigner freezes.
The same crash also occurs when using the OAK-D S2 camera.

I am currently using TouchDesigner version 2023.12120.

Thanks in advance.
-Bene

Hey @BenFri

Thanks for the report.

I was able to reproduce and this is logged for a dev to look into it.

Best,
Michel

Thank you for looking into it!
Will I receive a notification here as soon as the bug is fixed?
Best,
Bene

Hi @BenFri,

we do post an update here when a fixed version is available.

cheers
Markus

Hi snaut,

could you roughly estimate how long this might take? We are currently working on a project that needs to be completed by the end of February, and we have already purchased the OAK hardware.

Apologies for the curious questions.
Thank you,
Bene

Hi @BenFri

we are actively investigating but haven’t found a solution yet.
Can you see if you can generate a OAK crash report with this script:

import cv2
import depthai as dai
from json import dump
from os.path import exists

# Connect to device and start pipeline
with dai.Device() as device:

    if device.hasCrashDump():
        crashDump = device.getCrashDump()
        commitHash = crashDump.depthaiCommitHash
        deviceId = crashDump.deviceId

        json = crashDump.serializeToJson()
        
        i = -1
        while True:
            i += 1
            destPath = "crashDump_" + str(i) + "_" + deviceId + "_" + commitHash + ".json"
            
            if exists(destPath):
                continue

            with open(destPath, 'w', encoding='utf-8') as f:
                dump(json, f, ensure_ascii=False, indent=4)

            print("Crash dump found on your device!")
            print(f"Saved to {destPath}")
            print("Please report to developers!")
            break
    else:
        print("There was no crash dump found on your device!")

You can run it in a seperate TouchDesigner process right after the camera / TouchDesigner crashes.

cheers
Markus

I just tried to run the script in a separate TD file right after TD crashed. But got an error message that i could not connect to the Device. When running the script as soon as TD closes it prints “There was no crash dump found on your device!”

Hi @BenFri,

we were able to also create this crash when running the original example in edge mode (which we implemented) available from here:

We are looking for a solution and in the meantime will try to implement the host version.

Cheers
Markus

1 Like

Hi @BenFri

It looks like this is an issue with the depthai SDK, Luxonis has said they will come with a with a fix for their depthai SDK near end of Febuary that should address this problem. If you have a pro license with pro support hours, we can work on getting a separate build with a downgraded stable working SDK. If not you will probably need to wait until Luxonis releases their fix.

Best,
Huck

Hey, thanks for the message.
Unfortunately we only have a Touchdesigner Commercial license, so we have to wait until the end of February. We also ran the original deapth_ai_handtracking model and it works on Mac, but unfortunately not on Windows.
Cheers,
Bene