Default Camera Problem

Well the principal camera works but only when it wants and the front facing camera doesn't work at all and when I try to use it my phone reboots. I have this problem on stock rom, viper miui v5 and cm 4.4.2

Sent from my HTC Sensation using XDA Free mobile app