LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Call Library Node

Hi,
 
I have experienced some problem (refer to my attachment) in running my LabVIEW program as an EXE file. However, such error did not appear when the program in running as llb format. I suspect it has something to do with the configuration of the Call Library Node.
 
Please kindly advice. Thanks  
 
LCM
0 Kudos
Message 1 of 5
(3,072 Views)
Have you tried recreating the EXE. It might just be a problem of VI corruption. Also try copying the dll that you are using into the same directory as the executable. Again, these are general suggestion. Since the message says that the error is occuring within the dll, it might be something more than just the configuration of the call library node.
 
If you want to send me the dll and example program, I can try it out here.
 
Regards,
 
Jack J.
Applications Engineer
National Instruments
 
Message 2 of 5
(3,047 Views)


@Jack J. wrote:
Have you tried recreating the EXE. It might just be a problem of VI corruption. Also try copying the dll that you are using into the same directory as the executable. Again, these are general suggestion. Since the message says that the error is occuring within the dll, it might be something more than just the configuration of the call library node.
 
If you want to send me the dll and example program, I can try it out here.
 
Regards,
 
Jack J.
Applications Engineer
National Instruments
 


That sort of errors almost always means either a wrong Call Library Node configuration or setup or a bad DLL itself. The fact that it doesn't crash in the development environment is just bad luck and I really mean here BAD. Since the application has a different runtime setup (no edit features of the devlopment environment and such and smaller VI code) the chances that a bad memory access corrupts some vital data for LabVIEW are different and most often higher. Your DLL still corrupts memory even in the development environment but happens to do so by chance in an area LabVIEW doesn't care for that particular application. A seemingly small change to the VIs could change that at any time and make your program crash even in the development environment. Check out the call library node and make sure you have configured everything accordingly. A common error here could be that the DLL expects a string or array buffer of a specific size and you pass in a to small string or array. Even a single byte such as for the terminating zero character of strings can be and sooner or later will be already fatal here.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 3 of 5
(3,029 Views)

Hi all,

I have copied a new DLL file into the same folder that contain the EXE file. i have tried to configure the call library node to call this DLL and i recieve the same error. 

Any sugguestion, anyone? 

0 Kudos
Message 4 of 5
(2,964 Views)


@LCM wrote:

Hi all,

I have copied a new DLL file into the same folder that contain the EXE file. i have tried to configure the call library node to call this DLL and i recieve the same error. 

Any sugguestion, anyone? 



You can try all possible things including reinstalling your entire PC, but the problem is really in the configuration of the Call Library Node or in the DLL itself. If you do not provide large enough arrays or strings for the DLL for instance, your DLL will overwrite data it shouldn't. Depending on the actual environment this can cause an immediate crash, a crash when exiting LabVIEW or no crash at all but maybe at some point strange results.
I have very extensive experience with external code in LabVIEW and every crash I have encountered until now was about wrong configuration of the Call Library Node or not correctly providing the necessary size for arrays and strings (unless I build in a bug in my own DLL, that is).

Rolf Kalbermatter

Message Edited by rolfk on 10-20-2005 04:08 PM

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 5 of 5
(2,940 Views)