LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV2009 EXIT function - not terminating process

I have built a reasonably large application ( EXE) using a MAIN.VI as entry point and which based on user options, loads one among many other ( about 40 VIs ) VIs. Data transfer between the loaded VI and MAIN is thorugh Functional Globals. Once the user is done with  the  chosen VI, he returns to MAIN when the chosen VI  is closed and unloaded from memory. Then the user exits from MAIN wherupon the Timed loop in MAIN is terminated and finally the EXIT function is invoked.

 

But surprisingly , while the MAIN closes without any error message, the EXE process is not terminated in Windows OS and for every open and close of MAIN there are as many processes that keep running. Found out this by accident , due to odd behaviour of the whole application. I have to terminate the process from Windows manually.

 

What possibly could be the reason ?? I am running on WIN 7 / Pro -32 Bit platform and LV2009-SP1. Happening on two PCs with similar configuartion so I tend to believe that this a LV issue ??

 

Thanks

 

 

Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 1 of 3
(2,333 Views)
Hi,
Just one suggestion, this will happen if you use network stream vi's in your app. If this is the case it has been fixed in lv2011. If its not streams then hopefully you will get more insightful replies! Dll' s not unloading perhaps? Usually, exit LabVIEW VI is reliable in my experience.
all the best
Michael.
0 Kudos
Message 2 of 3
(2,328 Views)

I have run into similar situations, but I never really looked into it deeply, mainly because in those system the executable is rarely closed and if it is, it's usually done by me.

 

If memory serves, I did verify that my code runs all the way to the end (probably by using a debug log), but after calling the Quit LV primitive the process still stays in memory. I'm not sure why, but I think this has to do with opening external references, such as ActiveX, .NET, etc., which somehow don't get cleaned up properly.

 

One thing you might test is whether this happens every time or only if you leave the application open for a long time. I also seem to remember that that was a factor, but again, that's a vague memory.


___________________
Try to take over the world!
0 Kudos
Message 3 of 3
(2,314 Views)