I had those randomly on my 7D, took it in to the repair center and they fixed it. Apparently in my case there was a connection in the internal power circuitry that was flaky, therefore the randomness.
I actually had to take it in twice as they couldn't reproduce the fault at first, then the next time it happened, I left the camera in this bad state and took it in. Then they located the issue.
Haven't seen the problems since.
My guess is that there's nothing you can do, but have it returned and replaced.