This may be to do with a broken ribbon cable. When the phone tries to start the camera. it can't find it and it shuts down.