A friend of mine had a similar problem. Screen would freeze up when opening the keyboard. It ended up getting worse and worse until he finally had to get it replaced. It ended up being a hardware problem. The act of opening and closing the keyboard was pinching the ribbon cable going to the display.
Sent from my Droid 4