LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Where did this giant puddle of memory come from?

Solved!
Go to solution

So I'm mopping up a giant puddle of memory from underneath my computer and I notice that memory is just pouring out of IMAQ Learn Pattern 2 VI. Turns out, when IMAQ Learn Pattern 2 decides that a template image doesn't have enough contrast, it gets frightened and pees out memory onto the floor. Attached is a VI that lets you wash your computer desk with RAM.

 

Labview development team- two things, please:

 

1: Please fix the memory leak in IMAQ Learn Pattern 2 and if possible, post the fixed version so I don't have to pointlessly wait for the release.

 

2: I've read that the test for contrast is that there must be at least 2 grayscale levels in the image that are populated by at least 10 pixels each. This seems to be true. But just for giggles, could someone please confirm that this is exactly (and without exception) how the IMAQ Learn Pattern 2 vi test for contrast works so that I can reverse engineer it and use that to keep IMAQ Learn Pattern 2 VI from creating a memory vortex from which no bit can ever escape.

 

 

Thanks,

 Root

Message Edited by Root Canal on 02-19-2009 01:49 PM

global variables make robots angry


Download All
Message 1 of 9
(4,113 Views)
Solution
Accepted by Root_Canal

Root,

 

What version of vision are you using? I ran this VI with the boolean selected for about 10 minutes with no leak. When does your leak occur, and how significant is it? While the CPU obviously jumped to 50% on my computer, I never had a leak.

 

I looked through the readmes of some recent fixes of Vision, and it seems that the IMAQ Learn Pattern 2 was updated with 8.6.4. I don't see anything about it being because of a memory leak, but apparently it used to "hang" with low contrast images:

 

"The IMAQ Learn Pattern 2 VI may hang." - from ReadMe

 

You can find the 8.6.4 download here.


You must have Vision 8.6.0 before you install the 8.6.4 update. Also, if you want to update your Vision Assistant, we had an 8.6.1 update for that. 

 

Hopefully this helps!

 

 

 

 

Chris Van Horn
Applications Engineer
Message 2 of 9
(4,034 Views)

I'll give it a try.

 

here's a link to a forum post from another poor sap who observed the same memory leak problem:

 http://forums.ni.com/ni/board/message?board.id=170&message.id=148470&query.id=13278#M148470

 

 


global variables make robots angry


0 Kudos
Message 3 of 9
(4,027 Views)
oh, I forgot to tell you, it leaks about one megabyte per second on a dual quad (8 core) 3.2 GHZ intel platform and on a seperate dual core 2.33 GHZ intel platform.

global variables make robots angry


0 Kudos
Message 4 of 9
(4,025 Views)

Bingo. The memory leak issue with IMAQ Learn Pattern 2 was fixed in Vision 8.6.4.

 

Thanks, Chris. I regret that I have but one Kudos to give.

 

Gratefully,

-Root

 

P.S. Can anyone verify that IMAQ Learn Pattern will always produce a "not enough contrast" error message if the template image does not contain have two regions of different uniform pixel value containing at least ten pixels each, and that IMAQ Learn Pattern will never produce a "not enough contrast" error message if the template does contain two such regions? Also, what is the minimum size for a valid training template image? is there a minimum pixel area or a minimum width and height or what?


global variables make robots angry


0 Kudos
Message 5 of 9
(3,932 Views)

It seems like you are correct in the fact that any contrasting ROI of 10 pixels or less will give that error.

 

It also seems that if you have an image of less than 8x8 pixels, it will throw an error also. I verified this with our Product Support Engineer. At first we thought 8 pixels was necessary, but after some testing and obvious fairly, we determined it was actually 8x8.

Chris Van Horn
Applications Engineer
Message 6 of 9
(3,917 Views)

Thanks again for your help! I am always delightfully astounded at the expeditiousness with which even the most preposterous requests for assistance are accomodated on the LabVIEW support forums. I'm keen to post a question about the meaning of life; I'm almost certain that someone on here would beat their head against a copy of Jean-Paul Sartre's Being and Nothingness untill they arrived a plausible answer (I vaguely suspect it has something to do with deep fried twinkies and rum, by the way.)

 

I can't help but wonder though- is there a formal channel through which I may send a request to NI to ask for the inclusion of specific additional information into the LabVIEW help documentation which would preclude the need for a forum search for future LabVIEW users? There have a number intances where I've run into curious omissions in the help docs that I think NI would be more than happy to include if only the right person were made aware of them.

 

Thanks,
-Root


global variables make robots angry


0 Kudos
Message 7 of 9
(3,886 Views)

Root Canal wrote:

Thanks again for your help! I am always delightfully astounded at the expeditiousness with which even the most preposterous requests for assistance are accomodated on the LabVIEW support forums. I'm keen to post a question about the meaning of life; I'm almost certain that someone on here would beat their head against a copy of Jean-Paul Sartre's Being and Nothingness untill they arrived a plausible answer (I vaguely suspect it has something to do with deep fried twinkies and rum, by the way.)

 

I can't help but wonder though- is there a formal channel through which I may send a request to NI to ask for the inclusion of specific additional information into the LabVIEW help documentation which would preclude the need for a forum search for future LabVIEW users? There have a number intances where I've run into curious omissions in the help docs that I think NI would be more than happy to include if only the right person were made aware of them.

 

Thanks,
-Root


 

Re: Docs 

 

Well the NI AE's prowling these forums should be able to file a "Documentation CAR" to fix the docs.

 

Re:Meaning of life 

 

My mother spent the first 30 or so years of her life investigating that question and finally settled on "The meaning of our life is to find the purpose for us being here." So then she starting with that question. I think she was mildly annoyed when I told her  "I know that one! We were put here to serve the "Divine Wire-worker" and to be happy doing* so. Just take a look at the last chapter of ..." Smiley Wink

 

Ben

 

* which to my understanding does not rule out twinkies, hoho's or rum.

 

 

 

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

Root Canal wrote:

Thanks again for your help! I am always delightfully astounded at the expeditiousness with which even the most preposterous requests for assistance are accomodated on the LabVIEW support forums. I'm keen to post a question about the meaning of life; I'm almost certain that someone on here would beat their head against a copy of Jean-Paul Sartre's Being and Nothingness untill they arrived a plausible answer (I vaguely suspect it has something to do with deep fried twinkies and rum, by the way.)

 

I can't help but wonder though- is there a formal channel through which I may send a request to NI to ask for the inclusion of specific additional information into the LabVIEW help documentation which would preclude the need for a forum search for future LabVIEW users? There have a number intances where I've run into curious omissions in the help docs that I think NI would be more than happy to include if only the right person were made aware of them.

 

Thanks,
-Root


Product Suggestion Center is a possble venue for such things.


Rolf Kalbermatter

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 9 of 9
(3,871 Views)