LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory leak

I am getting increased memory usage on a fairly complex program running LabVIEW 2009. It is a vision application and uses about 50 imaq buffers. These buffers are opened before the start of acquisition. Used during the run. Then disposed of. The memory increases after each run. I am using the latest IMAQ driver. It also uses net controls to control a motion device. When the memory gets to large, closing the VI does not fix it. Labview has to be closed and restarted. Any ideas on memory leaks in an application like this?

0 Kudos
Message 1 of 15
(4,015 Views)

Very difficult to debug memory leaks from a discription.  We're pretty sharp but not clairvoiant (Well most of the time)

Can you post your code- or break it down to the barest functions that still exhibit the sysmpoms?


"Should be" isn't "Is" -Jay
Message 2 of 15
(4,011 Views)

I know it is vague. Just looking for know problems for labview 2009 related to this. Thanks.

0 Kudos
Message 3 of 15
(4,007 Views)

Nothing I know of- It could be 1) a programming isue or 2) you might have hit a bug.  if 1 we can probably help if 2 we really want to knowSmiley Wink


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 15
(4,001 Views)

Download the Desktop Execution Trace Toolkit. It has a thirty day trial but costs about $1K (Well worth it)

 

You can configure it to show memory allocations above a user defined threshold and see where it is being allocated. You can also set it to show unclosed references. Those show up highlighted in yellow. You don't want any yellow.

=====================
LabVIEW 2012


0 Kudos
Message 5 of 15
(3,998 Views)

Start throwing away functionality a piece at a time until you see the memory stop leaking.

 

I am unclear about how often the Vision and motino stuff get re-init.

 

If either or both get re-init between when the app is started and when you exit, then either or both may be leaking. I have recently worked with antoher poster with a leak that was traced back to the .net function.

 

Old Joke about Digital Equipment Field Engineers (of which I once was back when they were #2 behind IBM).

 

How does a DEC FSE know which tire to change?

 

He keeps swapping them until he finds the one that is flat.

 

So in your case keep tossing till you find the part(s) that leak.

 

And before I forget...

 

These tags are performance related. They may help you out.

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 15
(3,996 Views)

Hmm. I'm not sure if DETT will show .NET leaks. Does anybody know if it will (too lazy to check Smiley Happy) and if not is there something from Microsoft that will?

=====================
LabVIEW 2012


0 Kudos
Message 7 of 15
(3,991 Views)

Yea. I am in the mode of isolating it.  Looking for known problems especially around .net and imaq buffers. Tried the profile window, but it causes an error when I start it. Divide and conquer until I find it I guess. I inherit lots of fun stuff.

0 Kudos
Message 8 of 15
(3,987 Views)

DETT will give you a good starting point. I am not sure if you can get the trial for 2009 though.

=====================
LabVIEW 2012


0 Kudos
Message 9 of 15
(3,984 Views)

Ernie, I noticed you're using .NET with a motor. I have a small leak with one of our main systems which occasionally uses vendor-supplied .NET LV code for the motor. Since we use that motor so seldom, I haven't trobleshot it much. What motor/controller is it?

Richard






0 Kudos
Message 10 of 15
(3,963 Views)