On my X-Men this would happen from time to time. I figured out it was the ball trough connector that was causing it. Vibration and gravity made it come a little too loose so once in awhile it would have issues. Flippers would die and ball would end. Pushing that connector up tight again under the playfield always solved the issue for me.