LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tbb.dll entrypoint not found

Hello,

 

I have moved a DLL dependant sourcecode with all it´s DLLs but functions from the top DL library fail to load;

 

When I select the function click OK, I get an dialog saying that tbb.dll some procedure entrypoint was not found. This is probably caused by loading different dll by labview or the calling dll.

 

The top library is using vision.h and there are calls to opencv functions, that probably use some different version of tbb.dll.

 

I tried to recompile and rebuild the used DLL in MSVS on the target computer with no problems, but the problem still persists.

0 Kudos
Message 1 of 10
(6,540 Views)

So it seems that labview loads its own tbb.dll into memory, which is different from the tbb my DLL functions know, this throws the error.

 

I do not know how to force the labview process to load the DLLs and all dependant dlls from the same folder even if there are some in memory.

Funny thing, that this error was solved by moving all dependant DLLs into the top DLL folder. I got no error and the VI was runnable, after LabView restart, same problem 🙂

0 Kudos
Message 2 of 10
(6,529 Views)

Hi Bublina,

 

We will need more information in order to help you with this issue.

Let me see if I understood correct what you wrote so far.

 

You have a VI that is calling a dll. This dll is calling other dlls in the background. When you run the VI that calls a function from the first dll you receive an error. What is the error?

If you drag the dlls that are called by tbb.dll into main folder, it is working.

 

Did you try to copy the new tbb.dll in the system32 folder, so that LabVIEW will call it automatically?


Can you attach your project or screenshots so that will be easier to understand the behavior.


Best regards,

Ion R.

0 Kudos
Message 3 of 10
(6,514 Views)

tbb.dll (and it's accompagning DLLs) is a DLL that gets normally installed in the system32 directory. As such you should avoid to have it anywhere else on your system. Now it seems tbb gets actually installed by several LabVIEW components and so is already loaded in recent LabVIEW versions when LabVIEW gets started.

 

Now you might get in a number of troubles here. First if you reference the DLL by path in a Call Library Node Windows will load the DLL as so called SxS (Side by Side) DLL into memory. This is to prevent troubles with different components expecting different versions of the DLL, yet it opens up a big can of worms too. Most DLLs getting installed in system32 do so because they maintain global state and other things internally that gets totally messed up when you load the DLL again from a different location.

 

Another problem however can be version differences in the DLL. The standard version installed by whatever software makes use of it, may be older than what your own software needs. In that case you have to install the newer version of the library in your system to replace the older version, not put it somewhere else to be loaded in parallel. And keep your fingers crossed, that the library has not introduced incompatible chances between versions, as that would simply make whatever other software has used it before, fail now. Yes it's all DLL hell, but SxS would not be the solution for it either, just a different way of getting roasted in DLL hell.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 4 of 10
(6,508 Views)

Thanks rolfk,

 

I had this issue once before with the very same DLL, the good thing is that this does not occur yet when using the built .exe as it is forced to load all libraries in the standard windows order.

In LabView version 11.0.1f1 this problem does not occur and I installed most of device drivers from the same date edition DVD.

 

This particular one happens becouse OpenCV I am using has its own tbb.dll so once I configure the Call Library Node, it uses the DLL located in system32 preloaded by labview and throws incompatibility becouse the OpenCV DLL has different header.


Fortunately they keep the release and debug versions, the release version DLLs have standard generic names, but the debug ones are somewhat marked like _debug or d or such, so all I had to do was to recompile the the top DLL in debug MSVS configuration.

It is not really an issue, since for app debugging I will probably use the debug DLLs, build the app and include all release version DLLs in the .exe folder. This should force windows to load correct DLLs.

 

 

 

 

0 Kudos
Message 5 of 10
(6,505 Views)

@ion.rosca wrote:

Hi Bublina,

 

We will need more information in order to help you with this issue.

Let me see if I understood correct what you wrote so far.

 

You have a VI that is calling a dll. This dll is calling other dlls in the background. When you run the VI that calls a function from the first dll you receive an error. What is the error?

If you drag the dlls that are called by tbb.dll into main folder, it is working.

 

Did you try to copy the new tbb.dll in the system32 folder, so that LabVIEW will call it automatically?


Can you attach your project or screenshots so that will be easier to understand the behavior.


Best regards,

Ion R.


Hi Ion,

 

If I copy the expected DLL in the system32 folder, it solves the problem and the labview code compiles, but it is very radical solution and might cause the rest of involved programs to stop working.

When I have some extra time, I will explore the problem properly and contact the NI support directly.

0 Kudos
Message 6 of 10
(6,502 Views)

@Bublina wrote:

If I copy the expected DLL in the system32 folder, it solves the problem and the labview code compiles, but it is very radical solution and might cause the rest of involved programs to stop working.

When I have some extra time, I will explore the problem properly and contact the NI support directly.


You shouldn't copy the DLLs into the system32 folder by yourself. There has to be an installer somehow by whatever software makes use of this library and that installer should take care about checking for version difference and installing the new version where it should be.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 7 of 10
(6,499 Views)

@rolfk wrote:

@Bublina wrote:

If I copy the expected DLL in the system32 folder, it solves the problem and the labview code compiles, but it is very radical solution and might cause the rest of involved programs to stop working.

When I have some extra time, I will explore the problem properly and contact the NI support directly.


You shouldn't copy the DLLs into the system32 folder by yourself. There has to be an installer somehow by whatever software makes use of this library and that installer should take care about checking for version difference and installing the new version where it should be.


I know, i wrote I will not do that 🙂

0 Kudos
Message 8 of 10
(6,497 Views)

Sorry to bump this old thread, but I have a related question.

 

I tried to decompose dependencies of the problematic DLL, and dependancy walker shows calls to wrong library.

Problem is, that the call comes from a library allready build.

 

If someone using MSVC OpenCV build knows how to force a build without this dependency problem, please shed some light.

I used some standard average joe tutorial with c-make.

 

Bez názvu.png

0 Kudos
Message 9 of 10
(6,458 Views)

You can't force Windows to load a different DLL with the same name in an application that is already using a DLL, unless you use SxS which requires both DLLs to contain a manifest resource that specifies its version and compatibility and install the versions into the SxS directory or as private copy into your application directory. All applications and shared libraries using that DLL need to contain an according manifest resource too.

 

Since Intel chose to normally have developers install tbb.dll and related into System directory, SxS is not an option. You would not only have to install the library that LabVIEW is using into SxS and relink it to contain the necessary manifest resource but also add a manifest resource to LabVIEW itself, or whatever dependant DLL links to tbb.dll.

 

The only feasable choice you have is to find out what version is already installed, and find a proper installer for the version you need, and install that over the already installed version if it is newer. And then keep your fingers crossed that Intel didn't introduce binary incompatible chances to the new DLL. And of course when you distribute your OpenCV based library/toolkit or whatever, you have to make sure any user is installing that version of the tbb.dll distribution too. That installer needs to check for an already installed tbb.dll check it's version and if older replace it by the new version, making whatever registry changes there need to be.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 10 of 10
(6,438 Views)