I acquire 500x500 pixel images at 1000 fps from a Basler A504k camera using a PCIe 1429 (LabView 8.6, x64 Vista). The images are processed online, and the whole thing works - some time. Once in a while the program just gets to the Extract Buffer vi and never gets out of it. No error is produced. I need to kill Labview and restart it to get going again. I read http://forums.ni.com/t5/Machine-Vision/BUG-with-PC
Solved! Go to Solution.
Thanks! Should have thought of that! Updated to the latest version (didn't check which version I was using before - it was last updated over a year ago), and so far no hangs with 2-3 hours of data taking. It was always an intermittant problem so I'm not sure it is solved yet. Hope it is!
Thanks for the response.
CPU usage actually falls to near zero because there are no images to process when Extract Buffer freezes (image processing keeps it at near 100% when the program is working). I also don't see any increase in memory use.
It appears as if Extract Buffer is just waiting indefinitely for something to happen.
Can you put some debugging facilities into your code to record a list of buffer ids being requested and the ones returned when this happens?
One other thing is that your program structure does look a bit broken. You are extracting buffers from the ring, putting a reference to the corresponding image into your queue, then going back and extracting a different buffer. This means that your previous buffer is no longer extracted and could be overwritten, but your other loop might not have finished processing that image yet.
Not that this should be causing your current problem, but I thought it is worth pointing out. I'd suggest having two queues of source images. One that contains free images and one that contains populated images. You producer loop that you gave here would consume from the free queue, grab into one of those images, then place it into the populated queue. Your consumer loop would pull from the populated queue, process the image, and then place the image back in the free queue.
I've attached the debug file. The first line describes the columns. I noticed that the frame count looks strange - the same frame number repeats once in a while. Doesn't that mean that the same image is being sent to the queue twice?
I see your point about the possible problem with the buffer. Will try to implement the two queue solution tomorrow.