API version mismatch

Hi.
We have a problem with 2 scenes inside Unity with the second one with Nuitrack using Realsense D415: the first scene uses the depth and RGB camera with Intel Realsense SDK, and works well. In end the next scene is called, using Nuitrack SDK for body tracking. But in this moment the editor and the build application (Windows 10) crashes. Strange think is when the second scene is played alone (editor and build) works ok. Here is the line when the error occurs in the log:

Runtime/Export/Debug.bindings.h Line: 45)

nuitrack.ModuleNotInitializedException: NuitrackException (ModuleNotInitializedException): Can’t create DepthSensor module
AstraProPerseeDepthProvider: Can’t create RGB Stream (VideoCapture device ID is not valid)
OpenNI2DepthProvider: Can’t open device ( DeviceOpen using default: no devices found
)
OpenNIDepthProvider: Can’t create OpenNI DepthGenerator (OpenNI Status: Can’t create any node of the requested type!)
API version mismatch: librealsense.so was compiled with API version 2.16.0 but the application was compiled with 2.17.0! Make sure correct version of the library is installed (make install)

at nuitrack.NativeImporter.throwException (nuitrack.NativeImporter+ExceptionType type, System.String message) [0x000aa] in :0
at nuitrack.NativeDepthSensor…ctor () [0x00036] in :0
at nuitrack.DepthSensor.Create () [0x0000a] in :0
at NuitrackModules.ChangeModules (System.Boolean depthOn, System.Boolean colorOn, System.Boolean userOn, System.Boolean skeletonOn, System.Boolean handsOn, System.Boolean gesturesOn) [0x00022] in :0

We see that we have an API version error. What is wrong? Our project depends on this solution to be presented this Saturday. Thank you!

Hi Mauricio,

Nuitrack was compiled with librealsense.dll v2.17.0. It seems that RealSense SDK installed on your PC includes librealsense.dll v2.16.0. When you run Nuitrack, it can detect the older version of librealsense.dll, which causes this problem.

There are two possible solutions:

  1. The easiest one - update RealSense SDK and run your project.
  2. Back up librealsense.dll (for example, rename it) in RealSense SDK and run your project.

Also please advise did you change (i.e., replace) librealsense.dll in Nuitrack SDK or not?

1 Like

Thank you Olga! We will test it next working day. I’ll share any update in this.

I’m getting sensibly this same problem:

ModuleNotInitializedException: NuitrackException (ModuleNotInitializedException): Can’t create DepthSensor module
AstraProPerseeDepthProvider: Can’t create RGB Stream (VideoCapture device ID is not valid)
OpenNI2DepthProvider: Can’t open device ( DeviceOpen using default: no devices found
)
API version mismatch: librealsense.so was compiled with API version 2.29.0 but the application was compiled with 2.25.0! Make sure correct version of the library is installed (make install)
OpenNIDepthProvider: Can’t create OpenNI DepthGenerator (OpenNI Status: Can’t create any node of the requested type!)

nuitrack.NativeImporter.throwException (nuitrack.NativeImporter+ExceptionType type, System.String message) (at :0)
nuitrack.NativeDepthSensor…ctor () (at :0)
nuitrack.DepthSensor.Create () (at :0)
NuitrackManager.NuitrackInit () (at Assets/NuitrackSDK/Nuitrack/Scripts/NuitrackManager.cs:229)
NuitrackManager.Awake () (at Assets/NuitrackSDK/Nuitrack/Scripts/NuitrackManager.cs:123)

I tried installing Realsense 2.25, 2.29 and 2.33 from https://github.com/IntelRealSense/librealsense/releases/ and always get the same error. I don’t see any librealsense.* anywhere in the Unity project.

What is the fix for this?

Please follow these steps:

  1. Uninstall all Realsense SDK Versions
  2. Test Nuitrack by running nuitrack_sample (for Windows: %NUITRACK_HOME%\bin\nuitrack_sample)
  3. Install Realsense SDK 2.29
  4. Repeat step 2.

Optional:

  1. Completely rebuild your project using the Realsense SDK + Nuitrack SDK, if you have one.
    Please inform us of the results after completing these steps

I am experiencing the same issue. I have no errors in the unity console, but I see the error in the unity canvas. the nuitrack_sample.exe in the bin folder seems to work just fine (showing depth and rgb). If the sample works fine but unity throws the version mismatch error, should I also follow your steps iosif? My Intel Realsense (using D415) SDK is v2.34. i can not find a download for v2.17 on Intel’s website. Thanks for the support.

Going through steps 1 through 4, nuitrack_sample works just fine. However, in Unity, I’m still getting the same error:

API version mismatch: librealsense.so was compiled with API version 2.29.0 but the application was compiled with 2.25.0!

I can try any version of the realsense sdk and I still get the same error. This doesn’t seem to be at all related to the system install of realsense sdk, especially since the error reports librealsense.so and I’m on windows.

I would really appreciate a link to the correct version of Nuitrack, NuitrackSDK and librealsense that will make streaming data into Unity work.

1 Like

First option:

  1. Install the latest release version of the Realsense SDK.
  2. Log out from system.

If the first option does not help, try the following option:

  • Modify the PATH system variable to differentiate the paths to realsense.dll;
  • If you don’t want to modify the PATH variable:
  1. Create the directory <Unity sample folder>\Assets\Plugins\x64;
  2. Copy the realsense.dll library from %NUITRACK_HOME%/bin (that is used to launch “nuitrack_sample.exe”) to the created directory Assets\Plugins\x64;
  3. In the Unity project tree, double-click on the file Assets\Plugins\x64\realsense.dll - the “Plugin Inspector” window will open;
  4. Check “Load on startup” in “Plugin load settings” (read the warning in the “Information” section).

Sorry to say I can’t really test that anymore as I went with the nuclear option and re-installed windows and everything else from scratch. It now works in Unity, as long as I run Unity in administrator mode.