NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

call executable handle leak

We noticed in TestStand 4.1 that when we use "Call Executable" on a batch file:

 

  • with "no wait" it leaks a handle on each call
  • with other view options thatn "show minimized" it leaks GDI objects

We can work around the first issue by using CloseHandle (from kernel32.dll) on RunState.PreviousStep.ProcessHandle, but I would like to know whether these are known issues and are addressed in later versions of TS.

 

Best regards

 

Peter

 

0 Kudos
Message 1 of 3
(4,734 Views)

In later versions of TestStand, the default behavior of a new callexecuteable step is to NOT store the process handle at all (instead it gets closed immediately). There is a setting for whether or not to store the handle and an expression to specify where to store it as shown below:

forum.png

 

 

For the GDI object leak, are you seeing a leak in the TestStand process or is the GDI object leaking because the handle hasn't been closed yet, so the other process is still around and still using GDI objects? Does the GDI leak go away if you close the process handle? If you call callexecutable in a tight loop does the number of GDI objects grow unbounded or does it level off (i.e. is it really a leak or a one-time allocation)?

 

-Doug

 

0 Kudos
Message 2 of 3
(4,723 Views)

Thanks for the quick reply. I found the setting in TS 2012 but thank you for the clarification of the behavior.

 

As for the GDI leak, I have to reproduce the situation as this was a while ago on a machine in the field and we fixed it using the "minimized" approach. I will get back as soon as I tested it.

 

Regards

 

Peter

0 Kudos
Message 3 of 3
(4,716 Views)