I had this happen to my GS5 last week after using it for about 5 days.
- I cleared app cache and data.
- Factory reset with SD card in
- Factory reset with no SD card
- Factory reset without adding my Google account in and went straight to the camera.
All no dice. I took it back to Best Buy mobile and their Samsung Experience Rep Flashed the factory binaries from an image (something similar to Odin) Factory reset. Still camera failed in the camera app and any app that uses the camera. IN fact if you try to open the camera in any other app like messaging etc. etc. it will force close that specific app and cause you to clear cache in said app.
Samsung tech said it was definitely hardware related and promptly gave me a new phone.
There is another thread here in Q&A with others experiencing the same issue. Either a bad batch or something larger is looming.
FWIW. It worked fine for a few days...
---------- Post added at 01:53 PM ---------- Previous post was at 01:51 PM ----------
Here is the other thread:
I am hoping this isnt a larger issue than a few bad 'apples'. Pun intended