Does this user always get the error or it only happens from time to time? Also, is your code based in cameraEx class/lib?
This exception can appear if the picture can't be taken because preview isn't active, the cam has been released, or other low-level timing issues which can be vendor-dependant
As a protection against this, you could only let the user take a picture when you know for sure that the preview is running, also prevent the button (if there is one) to be pressed two consecutive times, and put this part (takePicture) in a try/catch block