05-12-2015 09:16 AM - edited 05-12-2015 09:18 AM
I have a sequence that loops for around 70k iterations (which is pretty huge). The sequence calls a sub-sequence where the called sequence's locals are modified. Issue is, around 65k th iteration, I am getting an error stating that Local's reference passed is invalid. The iteration count when error occurs varies from PC to PC but always in the 65k range. When I try to run another sequence(simple one) consecutively, I get an "out-of memory" error. I guess the reason why Local's reference getting invalid is because the TS execution stops when TS memory gets full making Sequence Context and thus Local's reference invalid.
I would like to know how to reduce the TS memory consumption since I have disabled the result recording for all sequences(Configure->Station Options->Execution), disabled result recording for each iteration in the loop, Optimize non-reentrant Calls to thi sequence is also enabled. I even tested with just this sequence running and I am wondering if there is a maximum count for execution threads when looping.
PC Configuration
RAM-12 GB
LabVIEW and Teststand 2010 SP1
I will not be able to post the code but the looping is a custom step that has Sequence Call as its adapter.
Solved! Go to Solution.
05-14-2015 04:16 AM
Hi Ranjani,
Are you calling the sub sequence in the context of the main sequence or a new thread or a new execution.
New threads\execution can lead to many simultaneous instances running leading to shortage of memory.
Ravi
05-14-2015 04:23 AM
The subsequence is called in context with the main sequence and not as a seperate thread/execution. I did notice that the Sequence context is valid but the execution reference is invalid rendering the Local variable's reference invalid too.
05-14-2015 04:44 AM
Hi,
I tried this :
Main sequence calls a sub sequence which has 3 statement steps.
I looped the sub sequence to 75k with result logging enabled.
TS runs succesfully - no issues.
Try skipping steps (one at a time) in the sub sequence to find out which step is leading to this issue.
Also try reproducing using a simple sequence (which you can post online).
Ravi
05-14-2015 09:26 AM - edited 05-14-2015 09:33 AM
Have you checked the memory usage of seqedit.exe when you are getting this error? It sounds like there might be a memory leak in one of your code modules or elsewhere.
-Doug
05-14-2015 09:34 AM
But I have disabled the result recording in the station and I have also unchecked the result recording for each iteration of th eloop. This must disable the result collection. Is that not so?
05-14-2015 09:39 AM
@Ranjani_R wrote:
But I have disabled the result recording in the station and I have also unchecked the result recording for each iteration of th eloop. This must disable the result collection. Is that not so?
Yeah, sorry, I didn't fully read your post before responding (I updated my post once I realized you already disabled result collection). I'm now thinking it's more likely there is a memory leak in one of your code modules or something else that your sequence is doing. I think trying to narrow it down like Ravi suggested is probably the best approach.
-Doug
05-14-2015 09:43 AM
I think so too. Weird thing is I am using LabVIEW code module. But when I face this error, I see that LabVIEW has barely used 0.1GB of process memory. And when a sequence is executed immediately after this error, TestStand throws "out-of-memory" error which made me think TestStand is the culprit. But I will re-visit my code and check. Thanks for all the help.