DLL Load failed

The 2023 version does not support calling one DLL file from another DLL file. For example, the laserOS plugin in the following link would crash when loaded, whereas the 2021 version could load it directly.

If other Python SDKs have multiple DLL files, an error will occur during import. Importing a single DLL file works normally.

1 Like

Hi @ninjai

What do you mean here:

If other Python SDKs have multiple DLL files, an error will occur during import.

Do you have an example?

Best,
Michel

Is there a solution?
Thanks

Hi @ninjai

We are doing our best to cover forum reported issues in a timely manner.

If an issue needs to be prioritized for a project and fixed as soon as possible, users with Pro licenses can contact support@derivative.ca and use Pro Support hours for fast tracked action during our business hours. Given, of course, that a solution is available.

More details at

Best,
Michel

There is no issue on our end in build 2023.11880. Cannot reproduce crash. Please share .dmp file if any, or generate a dmp file using WinDbg. Using WinDbg to Debug Crashes - Derivative

Note that you should make sure you are using the latest TouchDesigner build as well as have all your graphic drivers up to date.

I am using the latest version. The error has always been there.
Please check this file:
pysdk 1.3.3.zip (3.9 MB)

Hi @ninjai - I was referring to the Laser OS plugin. There is no issue here.

Why are you trying to use PyOrbbecSDK ? You know we have Orbbec support in TD?

It’s possible that multiple of those DLLs you are trying to import are already imported in TD, such as OrbbecSDK.dll, depthengine_2_0.dll. Which could be in slightly different versions from what you try to use and cause additional issues.

Seeing your script, you are appending the Lib folder attached, which would prevent to load the DLLs you have here, since they have matching (and conflicting) names.

A developer will look into it further.

There is definitely the potential for conflicts with the Orbbec SDK that we already include with TouchDesigner versus the one you are trying to use. They’ve been changing their SDK a lot so it has gone through multiple updates just in our 2023 release:

2023.11880 uses Orbbec SDK 1.10.8
2023.11600 uses Orbbec SDK 1.9.4
2023.11340 uses Orbbec SDK 1.8.3

If you want to find out the SDK version in the build you are using you can put down an Orbbec TOP inside of TouchDesigner and middle-click on it to open the Info box which will show the SDK version.

As @JetXS already asked, is there a specific feature you need from the python SDK for orbbec? Otherwise you should be able use the built-in Orbbec TOP and then use Touch’s python interface to do any python work with the results

Hi, @JetXS Could you show a screenshot of you running the LaserOS plug-in in the 2023 version? The reason I want to use pyorbbecsdk is that the orbbec top op does not provide the functions in orbbec viwer, such as options for exposure, gain, and filtering parameters. As for whether it is an SDK version loading conflict problem, the pyorbbecsdk 1.3.2 version I compiled is completely imported and used normally because it is a single dll file.
Thank you.

The 1.3.2 version of a single dll file that I tested can be imported normally without conflicts. Many people also encounter problems importing Python modules with multiple dll files. Including the LaserOS plug-in, there are also multiple dll files. Therefore, it is suspected that there is a problem with the dependency loading of dll files in the 2023 version.
Thanks

Hi @ninjai

Let’s try and avoid mixing up and confusing multiple issues. You mention things that are unrelated.

Including the LaserOS plug-in, there are also multiple dll files.

The issue with LaserOS doesn’t rely on any python lib. We have the plugin, Laser OS CHOP.dll and a third party dependency, laserdocklib.dll. If a crash occurs using the plugin, it’s probably because it’s 4 years old and relying on a previous TouchDesigner Cpp API. If a crash occurs, you should share .dmp files, as stated earlier, or contact the developer of the plugin.

Whil I don’t have a laser to fully test here, the plugin does load fine in latest 2023.11880.

pyorbbecsdk 1.3.2 version I compiled is completely imported and used normally because it is a single dll file

This is not what you shared and this is not how things work. Python will use the .pyd file, but this will sideload all the required dependencies and .dlls. Which include both OrbbecSDK.dll and depthengine_2_0.dll. OrbbecSDK.dll especially is not matching the version already shipping with TouchDesigner, which is already part of the search path and will have priority over what you ship with the PyOrbbecSDK. It works outside of TouchDesigner in its own environment because the DLLs get loaded without conflicting dependencies and matching names in the search paths.

Many people also encounter problems importing Python modules with multiple dll files.

Can you please send those many people our way with reports about the Python modules they are having issues with ? If there is an issue, we need to have a look at multiple reports to track down the issue that makes sense and can be reproduced.


pysdk 1.3.2.zip (3.3 MB)
In TouchDesigner version 11880, I imported pyorbbecsdk 1.3.2 and it can be imported normally. The version of the C++ SDK printed for use is 1.10.5 instead of 1.10.8 used in version 11880. If it is an SDK version conflict, when I use TouchDesigner 11510 to import pyorbbecsdk 1.3.3, it should be importable.
Thanks.

Thanks for the feedback on the exposure controls. If you’re using a Femto Mega or Bolt, those cameras will work with the Kinect Azure TOP which supports some of those controls.

We haven’t added those to the native Orbbec TOP yet because they don’t always work with every camera type, but its good to hear what you guys find helpful as we may add those things in the future.

I would have expected pysdk 1.3.3 to work with TouchDesigner 2023.11810 since they both are supposed to use the 1.10.8 version of the Orbbec SDK, but I’m glad you found something that worked.

I don’t know if there is a typo in your last post, but TouchDesigner 2023.11510 uses Orbbec SDK 1.8.3 so it may work with pysdk 1.2.9 which was built with Orbbec SDK 1.8.1, but I would not expect it to work with pysdk 1.3.3

Unfortunately, DLL conflicts are often a major headache when using any external libraries. The library loading is entirely done by Windows based on its preference system which includes the location of the TouchDesigner exe, your Windows system path and any other DLL paths you have defined. This means that problems are often very specific to a given user’s machine.

As a bit of a hack, you can potentially copy the DLLs from your pysdk folder into the TouchDesigner/bin folder. This may break TouchDesigner’s native nodes, but may ensure it loads the correct ones for your plugin