LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory Leak using Index Waveform Array.vi in LV 8.5

Hello,
 
After recently upgrading this program from LV 7.1 to LV 8.5, we are seeing a memory leak and finally a crash. The system is running on a Windows PC. I think I've narrowed it down to the Index Waveform Array.vi, and have written a simple VI that can reproduce the problem. To reproduce it, you must have more than one call to the Index Waveform Array.vi, and you must index a waveform that is not in your array of waveforms.
 
This is a little confusing to me, since in the actual program I am not indexing a waveform that is not in the array of waveforms. Nonetheless, if I disable the Index Waveform Array VIs, I don't see a memory leak, and if I enable them, I see the memory creep up.
 
In the test VI that I wrote, I can eliminate the memory leak by making the WDT Index Channel by Name DBL.vi reentrant with preallocated clones.
 
This all used to work in 7.1, so I'm not sure what has changed in 8.5 to cause a memory leak now. Any ideas are appreciated.
 
Thanks,
Sima
 
Edit: Attached attachment.


Message Edited by Sima on 05-22-2008 05:17 PM
0 Kudos
Message 1 of 7
(3,348 Views)

Hi Sima,

I modified your attached example so that I could try to reproduce the issue on my system. I tried two different scenarios, one with an array of constant data waveforms and one with waveform data coming from a data acquisition device. In both cases I was unable to see any memory leaks occur in the 15 minutes that I monitored the memory usage. Could you please try the two VIs that I have attached to see if you have a memory leak on your computer. In addition could you answer these questions which would help me to narrow down the variables in this issue:

  1. How long did you have to run the VI until you saw noticable memory leakage?
  2. What hardware you using this VI with (what was the input to the waveform array control), when you saw the leakage occur?
  3. What are the system specifications for computer (Windows version, processor, etc.)
  4. Are you using LabVIEW 8.5 or 8.5.1?

Thanks in advance for your answers to these questions, as they will help to expediate the resolution time for your issue. I hope you are having a good Memorial Day weekend!

Cheers,

Jonah
Applications Engineer
National Instruments

Jonah Paul
Marketing Manager, NI Software
Download All
0 Kudos
Message 2 of 7
(3,320 Views)

Hi Jonah, thanks for looking into this for me. First to answer your questions:

1. How long did you have to run the VI until you saw noticable memory leakage?

I ran for a few minutes and then started to see an increase of about 4K every 5 seconds using your "memory leak test ver1.vi". It went a lot faster in the original application, but that might have been because there were more instances of this VI.

2. What hardware you using this VI with (what was the input to the waveform array control), when you saw the leakage occur?

A (traditional) DAQ card.

3. What are the system specifications for computer (Windows version, processor, etc.)

Windows XP and I think it was an Intel dual core, but I'm not sure. I am running the test VIs at my laptop and still seeing the leak. I have a Dell Latitude D810 and I'm running Win XP as well.

4. Are you using LabVIEW 8.5 or 8.5.1?

LV 8.5

Now, to get your VIs to leak: It looks like you have to index one instance "correctly" (e..g use 0 or a name that exists), and the other instance incorrectly (e.g. use 5 or a name that doesn't exist). I hope you'll be able to reproduce the issue.

My temporary fix was to write a VI that simply searches the array of names and then use the regular Index Array VI to pull the waveform I need. I replaced all the Index Waveform Array VIs with this code. The customer has not seen the memory leak on their PC so far.

Thanks,

Sima

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

Sima,

I tried running the memory leak test ver1 VI using indices of 0 and 5 as you suggested; however, after a half an hour I was still unable to see any memory leaks occuring. In addition to LabVIEW 8.5.1, I also tried LabVIEW 8.5 on a different machine in which I did not see any memory leaks. I will try this VI as well as the version2 VI on my colleagues' computers and let you know if I'm able to reproduce the leak.

Cheers,

Jonah
Applications Engineer
National Instruments

Jonah Paul
Marketing Manager, NI Software
0 Kudos
Message 4 of 7
(3,238 Views)
Hi Jonah, I'm surprised you haven't been able to reproduce the leak. Once it starts you can see about a 4K increase every few seconds in the memory that LV occupies.
0 Kudos
Message 5 of 7
(3,221 Views)
Hi Sima,
 
I tried reproducing the leak using "memory leak test ver1.vi" on a colleague's computer; however, it also had no results of a leak. You had said in your last post that you were able to a 4K rise in the memory that LabVIEW occupies. What methodology did you use to monitor the memory (i.e. task manager, or different means) ? Are you running any other programs on the PCs?
 
Thanks. 
 
Cheers,
 
Jonah
Applications Engineer
National Instruments
Jonah Paul
Marketing Manager, NI Software
0 Kudos
Message 6 of 7
(3,193 Views)
I'm sure this doesn't help at all, but i am running LV 8.5.1, I tried you original vi.  I was able to reproduce the memory leak with the index enabled.  The leak stopped when I disabled the index.
0 Kudos
Message 7 of 7
(3,026 Views)