Sounds like a bad card, whenever the camera tries to write and the bad area of the card is selected, the camera may be unable to complete the write and hang.
If you have a pc, put the card in a reader, and run diskcheck on it with the check unused sectors box selected. It will tell you if it finds any bad sectors on the card. Then, you can do a low level format to map them out so the camera will not see them.
Format the card in camera before using it again.
NOTE: Formatting in camera is not a low level format, and will not map out bad sectors, so it will not fix the card.
All brands of cards can have issues, the low cost ones use cheaper memory, which might be marginal and occasionally fail. If you have more failures and diskcheck reveals even more bad sectors, toss the card and buy Lexar or Sandisk. they are about the best and most reliable.