It's most likely a hardware issue if you did a factory reset, and not all that uncommon with the Nexus 5 (happened to my friend's). LG fixed it though so you may want to contact them. Oh, first try disabling trusted face on smart unlock if you have that on. That always makes my front camera crash