My messaging application sometimes closes itself while typing - How can I fix this?
You can try to investigate this issue more deeply based on system logs. Install some application to grabbing logs from device (for example SendLog). When you application crashes, then grab system log in which should be placed callstack started in your application.

Getting logs should be done asap after crash, because these files rotate.