In my experience, most of these issues have been caused by the following:
1. A switch with two uplinks toward the root, where one is normally blocked, and the other link that is normally the designated port is either flapping or has many CRC errors. The flaps on the designated port cause the normally blocked port to unblock and block again continuously as a result of STP - this causes temporary loops when it is unblocked and the designated port comes up again. A high number of CRC errors causes alot of missed BPDUs received on the designated port, which has the same effect as a flapping port.
2. With fiber connections, a uni-directional link condition causes bridging loops to occur if UDLD is not enabled on both ends, becaue STP is unable to detect this condition.
Problems like these can be alleviated by using UDLD on all ports, and Uplink Fast if STP is used, or Rapid-STP instead.