Default [Q] X10 mini, phone shutdown when taking a photo

Hello , my phone was working normally ,then suddenly it`s been shutting down occasionally , for example when i power it with sim card it shuts down immediately after the boot animation finish , or when turning Bluetooth on , or right after taking a photo with camera , and sometimes shuts down on its own .... i have jb kernel with cm10 installed , i tried switching to GB kernel with xperian_z ROM , but still the same thing .
any ideas about what could causing the problem ?
thanks in advance .