Did it do it just once, or many times? Did it happen again if you changed memory cards?
My first thought is that it came accross a unwriteable memory block on your card and hung.
If it works after the power reset, try the following:
First, transfer all the images to your computer, then use a card reader (in Windows) run checkdisk with the scan for and attempt recovery of bad sectors box checked. This checks every sector, even the empty ones. If you find bad sectors on the card, its likely that the card was the issue.
After that, do a low level format, followed by a in-camera format. The first test will find and report bad sectors, so it provides feedback to you without changing anything.
Note, a in camera format of a CF card does not check or map out bad memory blocks, it merely marks the fat table to tell the camera that the card is empty. It might be months, weeks, or just seconds before the camera trys to write to the bad block again, and then it can hang.
It takes a while to scan all the sectors on a large card, so be patient, I just did it to a 16GB card, it took about 5 minutes.
I hope thats the issue, because its a simple fix. Having a bad sector on solid state memory does not mean the card is dying, it does occasionally happen, but, if you check your card once a week and see it happinng again, then the card is dying.
If its not a bad card, you do not have too many other options. To a total camera reset to return everything to its default status. Sometimes switching to a non electronic lens like a Samyang has also caused me problems that were resolved by a full camera reset (this is a known issue).