The issue you are seeing is call "force closing".
If your phone is stock, that is not rooted, then chances are a third party app is causing the problem. If it happens after a factory restore, with no third party apps installed, then you just need to clear the cache.
http://forums.androidcentral.com/verizon-htc-one/315416-how-clear-cache-partition-stock-recovery-un-rooted-phone.html
That's a guide on clearing your cache. You will have to redownload your apps but that should fix it.