This is basically the same issue as described here:
Camera isn't available - Trusted Face ( Android Lollipop - Nexus 5)Camera isn't available - Trusted Face ( Android Lollipop - Nexus 5)
Im running Marshmallow on a Nexus 5.
So yesterday i enabled password protection and Smart Lock with "Trusted Face". This worked great so far.
However, after some time (like 4-8 hours) the front camera will stop working. This will cause Smart Lock to not recognize me obviuosly and i have to use my password every time.
When launching the camera app, i am able to use the back camera, however switching to front only gives me a black screen and the app does not react to input anymore.
Rebooting the device will fix this, until it starts againt after the mentioned time-span.
Anyone got any ideas?
EDIT: Clearing the cache (as advised in an answer) did prolong the time the front camera worked to about 36 hours but did not fix this permanently.