LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview memory leak

I have built a large test application using Labview 2014 and Teststand 2014 for a customer to calibrate the tools they make that contain accelerometers and magnetometers.  The hardware of the test system includes a motion simulator, thermal chamber, magnetometer, and power supply.  All of those including the UUT communicates to the software over a VISA connection of some sort.  The problem I am having is when the software runs, memory handles continue to increase until the application's memory limit is reached and an out of error message is displayed. Using tools from Sysinternals, I have found that semaphore handles grow throughout the test.  I have found a semaphore handle named \Sessions\1\BaseNamedObjects\SemBlocking that continues to grow.  Investigating further, it seems that the handles grow when a VISA device is being accessed.  During portions of the test where a VISA connection is not being accessed, the handles don't seem to grow.  The VISA sessions are opened at the beginning of the test and are closed at the very end.  This is a 16 hour test and it takes awhile before the memory limit is reached. I have also used Desktop Execution Trace Tookit, which showed everything working properly as far as memory handling is concerned.  So I am wondering if anybody else has seen anything like this before?  Are there any other tools I can use that could show me what is generating these semaphore handles?

 

Thanks

0 Kudos
Message 1 of 7
(3,100 Views)
@Ideal wrote:

... and an out of error message is displayed.

that made me smile Smiley Happy

 

EDIT: sorry i have no recommendations regarding your problem, except the question wether you are using TDMS to write data to file?


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 2 of 7
(3,095 Views)

Oops, I meant out of memory error message.

0 Kudos
Message 3 of 7
(3,089 Views)

The test is writing to TDMS files and an Access database throughout the test. It is collecting a very large amount of data.  After completion of the test, a total of about 7 TDMS files at about 20MB each have been created.

0 Kudos
Message 4 of 7
(3,084 Views)

from the size of your tdms files, i think this is not the culprit, but regardless you may want to skim over this https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019MfNSAU


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 5 of 7
(3,080 Views)

I have developed background threads to avoid the repeated Open/Close VISA memory leaks. Not sure if that will fix your challenge but it may be a ticket to freedom.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 7
(3,064 Views)

My VISA sessions are only opened once at the beginning and remain open until I am finished.  I access them way too often to open and close them all the time.  I just did a test to keep one of my VISA sessions within Labview and not passing it through Teststand with no change in results.

0 Kudos
Message 7 of 7
(3,025 Views)