Are you using a backup program to restore text messages after flashing new ROMs? Like Sprite, MyPhone, or PIM Backup? I've had some super wierd issues with a corrupted message getting my inbox corrupted too and causing lockups and frozen messages.
The fix for me was not to restore my texts and emails after hard resetting. I lost my texts of course, but at least I got my emails. Fortunately most of my texts were garbage anyway, I still have no clue why I bother backing them up.