LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use task manager to detect memory leaks?

Hi all,
 
I have a scanning program. for latge scans it crashes with an out of memory error. However, when looking at task manager, nothing much seems to be wrong. What field am I supposed to be looking at? PF usage? commit charge? Does anyone know what each one means and which one I should be monitoring to detect my memory leak?
 
(I can't use the profiler to test my program - I wrote about it in another thread - it simply crashes Labview every time I try....)
 
Thanks!
Danielle
"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 1 of 12
(5,039 Views)


(I can't use the profiler to test my program


Looks more like a software corruption.Try reinstalling labVIEW again.Before that where is your program??
0 Kudos
Message 2 of 12
(5,027 Views)

I wouldb't re-install Labview just yet.  It's unlikely the source.

Can you post your code?  It would be easier to evaluate it.

RayR

0 Kudos
Message 3 of 12
(5,022 Views)

That error will ocur if you try to allocate a buffer that is larger than the largest contiguous memory block  the OS's memory manager  has available.

Under the best conditions this is usally about 1.2 G. I have pushed it farther but its not trivial.

Last I checked the Profile tool only crashed LV when used in combination with one of the add-ons (don't remeber which off-hand). I think that bug was fixed so an upgrade to LV 8.5 should fix the Profile tool crashing LV.

You are probably building a large array somewhere. Try using a different method for stroing the data.

Trying to help,

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 12
(5,007 Views)
Hey Ben
 
Suprised you are still on the board,  I thought you were headed to microsoft.
 
Always good to see your answers
 
-Tim C.
1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!
0 Kudos
Message 5 of 12
(5,000 Views)
Ben at microsuff??  LOL!!  He'll have to tell us about that one...  (Breakpoint??)  LOL! 😄
0 Kudos
Message 6 of 12
(4,997 Views)
Maybe it was Darren that headed that way....
1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!
0 Kudos
Message 7 of 12
(4,993 Views)

You must be confusing me with someone who knows what they are talking about.

I did apply to IBM  about 28 years ago. They shot me down saying "We don't take retreads." (meaning if you ever worked for anyone else, they were not interested). That left me with a very sour taste in my mouth regarding IBM. So I turned around and got myself hired by there biggest competitor, DEC. I also gave Bill Gates a virtual "high-five" when he DOS'd IBM and thereby killed OS2.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 8 of 12
(4,980 Views)

Hi,

I do have a large array, but at its largest it is about 200 Mb. I think I'm creating needless copies somewhere as I can see that the memory usage of the program increases with time. However, when the crash comes it looks like I've still got plenty of space. If the problem is contiguous memory, splitting the array into smaller chunks will solve the problem, but I'll have to merge the parts at some point and then I'll have the same problem won't I?

Is there something else I can look at in the Task Manager to help pinpoint this?

And about the profiler - I wrote about in thread http://forums.ni.com/ni/board/message?board.id=170&message.id=294881&requireLogin=False. I was using LV 8.5, so the LV version is not the problem.

I can't post the code - it's confidential... but I need to scan from a daq board data from several channels. The scan size is 1024x1024 pixels, 16 channels. I realize this is big, but our competitors manage this OK :). I keep this in a 3D array of doubles. (no clusters or complicated data types). I use a queue for storing it and deque and enque as needed, and I pass the reference to subvis.

Any ideas would be greatly appreciated.

Thanks,

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 9 of 12
(4,954 Views)
The .NET guru of LabVIEW moved over to Microsoft (Lycangeek/Brain Tyler we miss you)

Firstly you could try to read in the bitsize of the data instead of the DBL size, or just go for SGLs.

However it makes sense to look for copies.
I think using Queues here is a bad choice, you need at least one copy in the queue, and one to process.

Maybe LabVIEW classes can help ? (use the Endevo by Ref version or any other by ref version).
If you feed the array to a subvi make sure you don't allocate a copy, so one in , one out, keep at least one path straight to force the compiler to use the same buffer if possible.

Good luck,

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 10 of 12
(4,949 Views)