What kind of checking are you doing to verify your image is valid when you call camera.getImage.
Last year, people had some issues with images that were valid pointers, but had 0 width, and would crash (due to an exception). I used this guard code after getting the image, but before converting to a binaryImage.
Code:
if ((colorImage == (void *) 0) || (colorImage->GetWidth() == 0) || (colorImage->GetHeight() == 0))
{
return returnVal;
}
My full code is here:
https://github.com/TeamExcel/Project.../Robot2012.cpp
Line 795 has the camera code.