Hi,
I'm afraid Abhinav is correct in the lack of information. A majority of errors are usually caused by the avi files themselves. I have come across this error before however usually it occurs at the end of avi files were someone is attempting to read past the end of the video.
Naturally as there is no frame a null exception is thrown. I would expect it's a similar problem your directly trying to apply the frame acquired to the Image<bgr,byte> variable image as there is no frame it can't be applied.
You could use a try{}catch{} method however this is less preferred as it will prevent other errors from becoming visible such as half rendered frames etc.
However there is a check you could attempt to prevent this error from occurring and it's well documented.
using (Image<Bgr, byte> frame = capture.QueryFrame())
{
if (frame != null)
{
var bmp = frame.Bitmap;
}
}
}
I hope this helps
Cheers
Chris