NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

teststand handles accumulate

John,

Are generating reports with your TestStand application?  And if so, what type of report are you generating?  Does disabling report generation prevent the crash?  Does your code consistantly crash on the same iteration, or does it run for 'a while' and then crash?

Also, I'm not sure that the handles that fopen is refering to, and the handles that are in task manager are the same thing.  I simply don't know enough about Windows to say for sure.  Are you closing your file references with fclose() after you are done using them?

Josh W. | National Instruments | Applications Engineering

 

Message Edited by Mist on 06-13-2006 11:46 AM

Josh W.
Certified TestStand Architect
Formerly blue
0 Kudos
Message 11 of 14
(1,301 Views)
We are generating html reports. The file handles do get closed, some immediately and some later at the end of the run. I should mention, I think I did earlier, that I am running the test programs programmatically and not using the UI therefore I do not use a process model. There are times when we do run interactively and use the process model but in those cases the test programs are run once or twice and we don't see the problem because the test programs are only run a couple of times. The problem I am describing happes when I run the test program programmatically. We run testexec, the operator presses a button which brings up a utility panel then press a start button. The test program is then run using TSUI_SequenceFileViewMgrRun. Over a period of time the test program can easily be run 200 times.

John
0 Kudos
Message 12 of 14
(1,285 Views)

John,

I believe I have found the source of the handle leak in the Benchmarks.seq example.  I used a utility called TaskInfo in order to see what handles were being created after several runs.  I was able to determine the leak was related to a registry key entry for Internet Explorer.  We use Internet Explorer to display reports in an execution, so I was able to test this theory by disabling reports and disabling displays of new execution windows to prevent the report view from being created.  In this case, I was able to run my execution overnight without accumulating any handles.  A similar test run overnight without these options resulted in an increase of several thousand handles (but also was several thousand executions).  I noticed several other complaints about this problem by other users who use IE in a similar manner.  It appears that an update was the source of this problem - http://support.microsoft.com/kb/912812.

Judging by the nature of this leak, I don't think it is the source of the problems you are seeing.  I would recommend using this utility (or a similar one) to see if this is the source of the handle leaks you are seeing.  If you are seeing something else, please let me know and I will investigate it further.

Allen P.

TestStand R&D

0 Kudos
Message 13 of 14
(1,270 Views)
Allen,
Thanks, I think it is part of my problem. I will use taskinfo to see what else is going on.

thanks very much,
John Hopkins
0 Kudos
Message 14 of 14
(1,261 Views)