Happened to me too at odd times. Once or twice. First time was SCARY and I actually thought I'd have to take out the battery - I felt like a fool when I realized I could do a soft reset instead
If it happens often I'd say replace the phone - no app or modification should cause it. I say
should, not
can.