memory leak teststand

memory leak teststand

I have a TestStand sequence which calls another sequence in another sequence file many times. It's a functional test, and I don't use any built-in reporting tool of TS, I have instead a VI which evaluates all the results and logs them.I use TS2010 without station model. I run my sequences in the Sequence Editor.

If I monitor the used memory on the windows task manager, it increases each time, when the sequence "functional test" is called. I need to call it several 1000 times, so a memory leak is very harmful.

I have made a VI, which sets the followings in the "Functional test.seq"

- disable record results for each step, in all sequences

- disable record results on all sequences in the sequence properties page

- load option = preload when execution begins for each step, in all sequence

- unload option = Unload when sequence file is unloadad for each step, in all sequence

- I have also tried to set it to "Unload after sequence executes", but no succes

I have learned from other threads, that the "Optiomize non-reentrant calls to this sequence" has to be unchecked, to be TS able to use my module unload settings. I tried it - no success, the used memory still increases.

All of the above written things bring to success. My question is, why does TS need more memory for each call to this sequence file? I just need to have the sequence file with its sequences in the memory, and call it 10000 times, without increasing the memory usage - because I don´t need to store any results of any of the steps.

Re : memory leak teststand

But basically I don't want to unload all the code modules after each execution of this sequence, they could be kept in the memory. I don't understand, what is the reason that TestStand needs always some memory, when the sequence executes. Load and unload modules are maybe not my problem, but something else.

I have to mention, that I tested all the steps in the sequence file, there is no memory leak inside the modules. It is caused definitely by TestStand.

Re : memory leak teststand

I have compiled a small dll in labview, which reads a test configuration in xml format, and calls always the next sequence in the main sequence file.(callingSeq.jpg) This is my sequence controller.

If it reads "Funktionstest" string, then the "Functionstest" sequence will be called via NewExecution node. In the "Funktionstest" sequence there is a call to the sequence in another sequence file, where the functional test with the device under test (DUT) is performed. It will be done 10000 times. So 10000 times I use the NewExecution node.

Re : memory leak teststand

I have tried it, to close the references in the right order. This doesn´t change the behaviour of the memory usage.

Does anyone know, what TestStand stores in the memory in addition to the code modules and the step/sequence variables? Because for me it is OK, when the code modules stay in the memory, I don´t want to unload them.

Re : memory leak teststand

Instead of constantly creating new Executions, simply reuse one initial Execution. Looking briefly at your block diagram, I don't have an explanation why you're leaking memory, but I would bet reusing one Execution over and over should have a positive effect.

Check out the RestartEx method on an Execution invoke node. Perhaps this will work for your circumstances.