12-28-2011 07:54 PM
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
12-28-2011 08:20 PM
12-29-2011 02:16 AM
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.