This is definitely not a crashdump mode issue..My camera is practically unusable, it locks very much on the front. I only get it sometimes when I restart my phone, but imagine you in a situation of taking a quick photo having to ask people to wait for your phone to restart before you can take a photo. Besides it shut down when I'm using it, and I can only call after a few minutes.
Try deleting data from camera and your gallery app and then reboot your phone. See if it happens again after that. That should solve this issue you're having.
Are you on stock oos or a custom rom? Regardless try that..
Clear storage on those apps...aka wipe data on gallery and camera apps