I have seen a bad battery cause this problem twice now. In my case I could let off of the gas and it would die, for instance when I would turn in somewhere. It would always start right back up. a new battery fixed both trucks and both were 97 models.