LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV 8.5 DLL - Windows error on exit

I created a DLL in a LabVIEW 8.5 project, and found that if I used the 'Call Library Function Node' in a subsequent LabVIEW 8.5 VI, the DLL functions worked perfectly, but after I exited LabVIEW I would get the attached error from Windows.
 
I then created a very simple DLL VI, and built separate DLLs from it in LabVIEW versions 6.1, 8.2.1, and 8.5. I created a set of simple VIs to call these DLLs using LabVIEW versions 6.1, 8.2.1, and 8.5.
 
The DLL calls worked perfectly in all combinations of VI & DLL versions (for example, calling the 8.5 DLL from a 6.1 VI, or calling the 8.2.1 DLL from an 8.5 VI, etc.). I repeatably get the error message after exiting LabVIEW ONLY after opening an 8.5 VI that called the 8.5 DLL. I have also tried calling DLLs written by others in LabVIEW version 7 from an 8.5 VI, which worked perfectly and there was no error after exit.
 
Does anybody know why I might be getting this error message?
0 Kudos
Message 1 of 6
(5,500 Views)


@BEHajder wrote:
I created a DLL in a LabVIEW 8.5 project, and found that if I used the 'Call Library Function Node' in a subsequent LabVIEW 8.5 VI, the DLL functions worked perfectly, but after I exited LabVIEW I would get the attached error from Windows.
 
I then created a very simple DLL VI, and built separate DLLs from it in LabVIEW versions 6.1, 8.2.1, and 8.5. I created a set of simple VIs to call these DLLs using LabVIEW versions 6.1, 8.2.1, and 8.5.
 
The DLL calls worked perfectly in all combinations of VI & DLL versions (for example, calling the 8.5 DLL from a 6.1 VI, or calling the 8.2.1 DLL from an 8.5 VI, etc.). I repeatably get the error message after exiting LabVIEW ONLY after opening an 8.5 VI that called the 8.5 DLL. I have also tried calling DLLs written by others in LabVIEW version 7 from an 8.5 VI, which worked perfectly and there was no error after exit.
 
Does anybody know why I might be getting this error message?


It could be a problem with the Call Library Node! When you say you created a simple VI I do assume there are no changes that you misconfigured the Call Library Node in some ways to for instance provide a not large enough string or array buffer to the DLL function, so that it is overwriting some illegal memory that LabVIEW trips over when closing down.

And no, not crashing in the other situations does not automatically mean that there is no problem like I described above. It very much depends on the actual memory layout at the moment of the illegal access, if this will cause an immediate crash, an access violation exception, a delayed crash, or nothing obvious at all.

Rolf Kalbermatter

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 6
(5,473 Views)
Hi BEHajder,
Like Rolf said, please verify that all the parameters passed to the Call Library Function Node is correct.  If the problem persist, could you please post your test dll and all the different versions of the code that you tested?

Thank you!

Yi Y.
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 3 of 6
(5,450 Views)

Hello Yi Y,

Thank you (and Rolf) for your replies.

I have not been able to configure the DLL build or Call parameters to avoid the error popup from occurring.

 

I have attached a zip file which contains 4 sub-folders:

 

The "LV 8.2.1 DLL" folder contains a project to build a simple DLL in LabVIEW version 8.2.1.

The "LV 8.5 DLL" folder contains a project to build the same simple DLL in LabVIEW version 8.5.

The "LV 8.2.1 DLL Test VIs" folder contains 2 LabVIEW version 8.2.1 VIs, one calls the version 8.2.1 DLL, the other calls the version 8.5 DLL.

The "LV 8.5 DLL Test VIs" folder contains 2 LabVIEW version 8.5 VIs, one calls the version 8.2.1 DLL, the other calls the version 8.5 DLL.

 

My test procedure consists of opening one of the Test VIs using it's version of LabVIEW, and then exiting LabVIEW.

If I open the "Test 8.5 call 8.5 DLL.vi", I always get the error after exiting LabVIEW. Opening the other test VIs do not result in an error after exiting LabVIEW. It does not make any difference if the test VI was actually executed or not.

The projects and VIs are very simple, please let me know if you think there is a configuration somewhere responsible for producing the error. I guess I am very interested to know if the error is reproducible for you, I have tested this on two Windows XP PCs here and both get the error. Also let me know if there is a problem with the attached zip file.

 

Thank you for your help!

Brian

0 Kudos
Message 4 of 6
(5,432 Views)


@BEHajder wrote:

Hello Yi Y,

Thank you (and Rolf) for your replies.

I have not been able to configure the DLL build or Call parameters to avoid the error popup from occurring.

 

I have attached a zip file which contains 4 sub-folders:

 

The "LV 8.2.1 DLL" folder contains a project to build a simple DLL in LabVIEW version 8.2.1.

The "LV 8.5 DLL" folder contains a project to build the same simple DLL in LabVIEW version 8.5.

The "LV 8.2.1 DLL Test VIs" folder contains 2 LabVIEW version 8.2.1 VIs, one calls the version 8.2.1 DLL, the other calls the version 8.5 DLL.

The "LV 8.5 DLL Test VIs" folder contains 2 LabVIEW version 8.5 VIs, one calls the version 8.2.1 DLL, the other calls the version 8.5 DLL.

 

My test procedure consists of opening one of the Test VIs using it's version of LabVIEW, and then exiting LabVIEW.

If I open the "Test 8.5 call 8.5 DLL.vi", I always get the error after exiting LabVIEW. Opening the other test VIs do not result in an error after exiting LabVIEW. It does not make any difference if the test VI was actually executed or not.

The projects and VIs are very simple, please let me know if you think there is a configuration somewhere responsible for producing the error. I guess I am very interested to know if the error is reproducible for you, I have tested this on two Windows XP PCs here and both get the error. Also let me know if there is a problem with the attached zip file.


I can't find any configuration error in these VIs, HOWEVER:

I've run the 8.2 DLL with 8.2 Test in 8.2 and everything was fine.

And I've run the 8.5 DLL with the 8.5 Test VI in 8.5 and everything is fine too!! No error dialog independant if I just open the VI and close LabVIEW or if I run the VI before closing.

So I guess it is more of an environmental problem than a pure LabVIEW problem.

As to my computer all I can say it is a Sony VAIO, Pentium Mobile 1.5GHz, Windows XP Professional SP2, with latest fixes, Englisch OS version, just about any NI software starting from LabVIEW 5.1 up to and including LabVIEW 8.5, LabVIEW 7.1 and 8.2 with DSC, IMAQ, FPGA and RT software, NI-DAQ 7.4, DAQmx 8.6, MAX 4.3, NI-488, NI-VISA 4.2 and a few other drivers like CAN etc.

Rolf Kalbermatter

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

Hello Rolf,

Thank you for your time and effort, your results are interesting!

One of the PCs I tried is a Sony Vaio setup very similar to what you described, the other is a desktop PC with P4, more Ram, etc. Both have several versions of LabVIEW installed, althogh only one has DSC... suffice it to say that I think the major difference between my PCs and yours is probably some local configuration applied to mine as a result they are both part of our in-house corporate network. Maybe I can try the test on a brand new PC, and then see if our IT may point out some configuration or installed program I can look at as a cause.

In the meantime, if anyone reading this has any related comments, suggestions, or questions, please feel free to reply - Thanks!

Brian

 

0 Kudos
Message 6 of 6
(5,350 Views)