TerminateException: Cannot load library module NuitrackModule.dll

I downloaded the latest 0.35 version of nuitrack and I get these errors when trying to run any of the demos after importing the unity package to an existing project:

nuitrack.TerminateException: NuitrackException (TerminateException): WARNING: Cannot load library module: C:\Program Files\Nuitrack\nuitrack\nuitrack/middleware/NuitrackModule.dll
at nuitrack.NativeImporter.throwException (nuitrack.NativeImporter+ExceptionType type, System.String message) [0x00055] in <0fa84b5c91c943e190b9d848b3950060>:0
at nuitrack.NativeImporter.handleError (System.IntPtr error) [0x00061] in <0fa84b5c91c943e190b9d848b3950060>:0
at nuitrack.NativeNuitrack.Init (System.String config) [0x0000e] in <0fa84b5c91c943e190b9d848b3950060>:0
at nuitrack.Nuitrack.Init (System.String config, nuitrack.Nuitrack+NuitrackMode mode) [0x00029] in <0fa84b5c91c943e190b9d848b3950060>:0
at NuitrackManager.NuitrackInit () [0x0006b] in D:\Repos\Azure GIT\xxx\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:316
UnityEngine.Debug:LogError(Object)
NuitrackManager:NuitrackInit() (at Assets/NuitrackSDK/Nuitrack/Scripts/NuitrackManager.cs:350)
NuitrackManager:FirstStart() (at Assets/NuitrackSDK/Nuitrack/Scripts/NuitrackManager.cs:190)
NuitrackManager:Awake() (at Assets/NuitrackSDK/Nuitrack/Scripts/NuitrackManager.cs:156)

NullReferenceException: Object reference not set to an instance of an object
NuitrackUtils.TryGetMirrored (nuitrack.JointType joint) (at Assets/NuitrackSDK/Nuitrack/Scripts/NuitrackUtils.cs:229)
RiggedAvatar.Start () (at Assets/NuitrackSDK/Tutorials/Avatar Animation/Scripts/RiggedAvatar.cs:19)

My unity version is 2019.4.13f1 and the sensor is Realsense D455. The odd thing is, that the demos work when importing the plugin to an empty project. I tried to imitate the empty project’s settings and structure in the existing project, but the error keeps popping up. How would I proceed to fix this? For me the projects seem identical.

Also there are additional path related errors when NuitrackSDK folder is not in the root of Assets. We need to have the folder in a different folder.

The issue was seemingly solved by removing dll’s I had in the Unity project’s root folder. However when I build the project I get this error in the build:

nuitrack.TerminateException: NuitrackException (TerminateException): WARNING: Cannot load library module: C:\Program Files\Nuitrack\nuitrack\nuitrack/middleware/NuitrackModule.dll
ERROR: TBB version mismatch: runtime library version is 11100, but the application was compiled with the 11102 version!

I had same version of tbb.dll in the nuitrack install folder, Unity’s editor folder and the project’s root folder. I tried copying the tbb.dll to the build’s root folder as well, which fixed this error but presented another one:

nuitrack.TerminateException: NuitrackException (TerminateException): WARNING: Cannot load library module: C:\Program Files\Nuitrack\nuitrack\nuitrack/middleware/NuitrackModule.dll
at nuitrack.NativeImporter.throwException (nuitrack.NativeImporter+ExceptionType type, System.String message) [0x00055] in <0fa84b5c91c943e190b9d848b3950060>:0
at nuitrack.NativeImporter.handleError (System.IntPtr error) [0x00061] in <0fa84b5c91c943e190b9d848b3950060>:0
at nuitrack.NativeNuitrack.Init (System.String config) [0x0000e] in <0fa84b5c91c943e190b9d848b3950060>:0
at nuitrack.Nuitrack.Init (System.String config, nuitrack.Nuitrack+NuitrackMode mode) [0x00029] in <0fa84b5c91c943e190b9d848b3950060>:0
at NuitrackManager.NuitrackInit () [0x00057] in :0
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

Also on the PC where the build is, the activation tool does not work. When I try to run it, this error pops up:
The procedure entry point ei_core_read_network_from_memory could not be located in the dynamic link library C:\Program Files\Nuitrack\nuitrack\nuitrack\activation_tool

Oddly enough, I was able to activate nuitrack using one of the samples.

Does anyone have idea how to get Nuitrack (0.35) to work in both editor and build without problems?

So it’s been a week since I posted the problem. The current situation is:

I have two PC’s with nuitrack 0.35 installed.

  • On the PC A project runs fine in editor and build.
  • On the PC B intended for final builds I get the error:nuitrack.TerminateException: NuitrackException (TerminateException): WARNING: Cannot load library module: C:\Program Files\Nuitrack\nuitrack\nuitrack/middleware/NuitrackModule.dll
    ERROR: TBB version mismatch: runtime library version is 11100, but the application was compiled with the 11102 version!

Odd, since the nuitrack version is same on the both PC’s.

Also when trying to run the nuitrack_sample.exe, I get this error:
Failed to resolve the request:
Format: Z16, width: 848, height: 480

Into:
Formats:
Z16

terminate called after throwing an instance of ‘tdv::nuitrack::TerminateException’
what(): Realsense2DepthProvider: rs2_pipeline_start_with_config(pipe:000000000EF8D9B0, config:000000000EEB6450):

Failed to resolve the request:
Format: Z16, width: 848, height: 480

Into:
Formats:
Z16

Same problem here. I get the following error whenever I play one of the demo scenes:
NuitrackException (TerminateException): WARNING: Cannot load library module: C:\Program Files\Nuitrack\nuitrack\nuitrack/middleware/NuitrackModule.dll
ERROR: TBB version mismatch: runtime library version is 9102, but the application was compiled with the 11102 version!

I’ve installed the latest version for Windows 10 x64 and I’m using the latest unitypackage on Unity 2019.4.2f1 and also 2020.1.0f.

I’m using the Intel Realsense D435 and the device works on the Nuitrack viewer, trial license activated

We can try this.

Thanks for the suggestion. However, I’m already using the unity package included in the sdk with correct runtime version. It works in editor and in build on the same computer, but did not work on other computer with same runtime version installed.

That being said, the build suddenly started working again. The pc has been unused and even the windows update is disabled so no clue what’s happened.

Somehow I have feeling I will be back.

1 Like