I can't say with 100% certainty, but if you saw sparks at the cap, you probably either have a short circuit or you witnessed the death of that cap.
Over-voltage is one way a cap can fail...caps should always be specified using voltage ratings well above your operating voltage (ex: Vss = 12V caps should be rated for 25V min where 25V is a standard cap rating).
Alternatively, if a polar cap (has a + and - terminal) then if the cap is installed and soldered into place reversed from its correct orientation and powered up, it can also catastrophically fail in the manner posted.