I had this happen before. Scared the crap out of me. It only did it twice, before i found the problem and fixed it.
It was a bad ground wire eyelet terminal, one of the ones that bolt to the back of the heads. I don't know which one because i didn't trace it out. When i saw what the problem...