Message: I agree with Geoff... My truck did the same thing. It ended up being a bad O2 sensor.
The check engine light lit up. Autozone offers a free service where they plug in a computer to check the problem codes. The code showed up as a bad O2 sensor. $75 later and some skinned knuckles and it's working fine :)