found cause of segfault in camera and image