I think the Messages Database crashed which causes the app to immediately close. The fastest way to fix this problem is to delete all phone contents and settings (Go To Settings > General > Reset > Erase All Content and Settings)
It will take less than a minute
Once your iPhone had been completely erased, you will need to restore everything from your latest backup
Luckily I've backed up my iPhone 2 weeks ago. I hope you have one too
P.S. Do not create another backup upon connecting to iTunes. Because it might just create a backup copy of the corrupted messages database. Then you will be just restoring the same corrupted data file which will not fix the said problem
Hope this helps