LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Shared Variable Memory Leak

Solved!
Go to solution

Hi all,

 

I have an urgent issue with sporadic memory leaks in the shared variables.

Occasionally reading and writing to shared variables leak memory. The rate can be increased by enabling "Flush Shared Variables" disabled in the code,

I have not been able to reproduce it with shared variables on the localhost, however shared variables running on a RT PXI target seem to cause this issue.

It is as if something sometimes breaks and causes the memory leaks. Perhaps some threading/pointer concurrency issue?

 

Steps to reproduce:

  1. Start the MemoryLeak.vi and sometimes it does, other times it does not leak memory slowly.
  2. Enable the "Flush Shared Variable" vi behind the disable diagram structure
  3. Watch the memory usage go amok after restarting the MemoryLeak.vi
  4. Disable the "Flush Shared Variable" behind the diagram disable structure
  5. Restart the MemoryLeak.vi and the memory leaking continues at various speeds depending on how it breaks.
  6. The memory will leak every time I run the vi, only restarting LV will put it back in somewhat nonleaking condition.

 

System information:

  • Latest & greatest LV2012 SP1 f0 32-bit on fully upgraded client and target systems
  • Lenovo Thinkpad W530 client computer running Win7 Professional 64 bit
  • PXIe-8135 controller on a PXIe-1078 cassis running LVRT 12.0.1

Some help here from an AE or R&D would be nice as I can not resolve this on my own.

 

See the attached pictures.

 

Br,

 

/Roger

 

0 Kudos
Message 1 of 5
(3,694 Views)

Another memory leak besides the flush initiated one is a shared variable property node that leak memory. See the attached example project and image below.

 

It seem to be there both for LV2011 SP1 and LV2012 SP1

 

MemoryLeak.JPG

 

Below is an image of a workaround using a shift register to store the values of "Children[]" which is read just once:

MemoryLeak2.JPG

 

A #CAR for these two bugs would be nice to have. Smiley Wink

 

Br,

 

/Roger

 

0 Kudos
Message 2 of 5
(3,550 Views)
Solution

CAR #403386 was created to track this issue.

 

0 Kudos
Message 3 of 5
(3,486 Views)

Were you ever able to resolve this issue?

0 Kudos
Message 4 of 5
(3,090 Views)

@LinCui wrote:

Were you ever able to resolve this issue?


I'm always able to work myself around the shortcomings in LV. Smiley Wink

The bug(s) seem to be fixed in LV2013.

 

https://www.ni.com/en/support/documentation/bugs/13/archived--labview-2013-bug-fixes.html

 

Br,

 

/Roger

 

0 Kudos
Message 5 of 5
(3,085 Views)