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
- disable "step failure causes sequence failure" property for each step, in all sequences
- load option = preload when execution begins for each step, in all sequences
- unload option = Unload when sequence file is unloadad for each step, in all sequences
- I have also tried to set it to "Unload after sequence executes", but no success
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.
I think this is because you load the sequence and play it 1000 times then you have to unload 1000 times the same sequence.
Maybe you should try to load the sequence once, then play it 1000times, then unloading the sequence file
You just have to create a step (in Labview) that plays the sequence (then play this step again when you receive the end execution callback)
But this may not be the smartest solution...
No, it would be not a good solution for me.
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.
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.
Maybe I should add some parameters to this node?
Do you sawn any references of that execution reference in the Invoke Node?
Does this mean you could have upto a 1000 exections?
Also, it would be wise to merge the errors from the Close Reference functions.
You have to handle the close references in the right order (sequencing them using the error wire)
thanks for you r posts.
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.
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.
Is your VI a UI of sorts? If so, Did you base it on the simple UI? Are you using an application manager control?
If not, are you running this in a UI or the sequence editor? If you are not running it in the sequence editor, can you try to run it in the sequence editor and see if you still see a leak?
You should be able to create and destroy executions repeatedly without any significant leaks (assuming the code modules you are calling aren't leaking memory).