No Frame Available

Asa_E-E
Posts: 16
Joined: Mon Jun 25, 2012 8:01 am

No Frame Available

Post by Asa_E-E »

What is general cause of the No Frame Available error? Periodically, when I run the cameras using the API, I get this error often. However, to resolve this, all I have to do is a hard restart (unplug the hub and plug it back in) and re-run my code. Sometimes, it doesn't even take a hard restart, just re-running my code. I'm not sure what would cause this to happen.

Thanks,
Asa
NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: No Frame Available

Post by NaturalPoint - Mike »

What type of cameras are you using?
Asa_E-E
Posts: 16
Joined: Mon Jun 25, 2012 8:01 am

Re: No Frame Available

Post by Asa_E-E »

S250e
NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: No Frame Available

Post by NaturalPoint - Mike »

Do you just run TT_Update(); once and get no frame available or does it loop TT_Update(); if no frame is found for a period of time?
Asa_E-E
Posts: 16
Joined: Mon Jun 25, 2012 8:01 am

Re: No Frame Available

Post by Asa_E-E »

The former. If no frame is available, the loop simply repeats (calls TT_Update() again).
NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: No Frame Available

Post by NaturalPoint - Mike »

How long will it go without a frame?
Asa_E-E
Posts: 16
Joined: Mon Jun 25, 2012 8:01 am

Re: No Frame Available

Post by Asa_E-E »

It usually does not go for more than one loop (~10 ms) without there being a frame. In some tests, it will miss a frame once and everything will be fine. In others, it'll keep missing frames periodically in fairly short intervals.

I can do a bit of testing soon to try and replicate this behavior and see how many frames pass between there being no frame available.
NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: No Frame Available

Post by NaturalPoint - Mike »

My guess would be that TT_Update(); is being called before the frame arrives. Try putting the TT_Update(); call in a loop that repeats the command until it returns success. There should be no real need to put in a delay. If you have to, start small (10us or so) and go up from there until you find something that works.
Asa_E-E
Posts: 16
Joined: Mon Jun 25, 2012 8:01 am

Re: No Frame Available

Post by Asa_E-E »

I did what you suggested and have TT_Update() loop until successful. Unfortunately, I'm still running into problems with the availability of frames. I'm timing each loop in my code and finding major discrepancies, all of which seem to arise from waiting for a frame to be available. For example, one loop will take ~0.005 s (~200 fps) whereas another loop will take ~0.065 s (~15 fps). Any idea why the time it takes a frame to be available seems to be so inconsistent?
NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: No Frame Available

Post by NaturalPoint - Mike »

What type of application are you compiling? Is this console? MFC? CLR? what compiler are you using? IF you use the visualtest.exe application included in the SDK binaries, does it detect and run properly? (it should show reported framerate)
Post Reply