Deep Space 1, NASA Asteroid Probe
The Deep Space 1 (DS1) probe, launched on October 24, 1998, had as its declared objective "To test 12 advanced technologies in deep space to lower the cost and risk to future science-driven missions that use them for the first time." This includes using a very fuel-efficient electric ion-drive propulsion system for all its propulsion needs, once launched out into space.
Asteroid and comet flybys were not in the mission requirement, but were recognized as could-do options for a mission extension "bonus", if the advanced technologies worked successfully. Indeed, the mission was extended.
The first asteroid fly-by, specifically of asteroid "1992 KD", subsequently renamed "9969 Braille", was at a distance of only 10 kilometers in July, 1999.
When the asteroid encounter occurred, no good pictures were taken, partly due to the asteroid being darker than the worst-case scenario envisioned (surface high in carbon?), and then a software bug which caused the failure of the target tracking system and a "safe mode". The best photo was just 4 pixels, from 70 minutes prior to the flyby. The "safe mode" caused a time dropout. After that, in all subsequent photo attempts, the camera was pointed in the wrong direction.
(The probe was programmed to essentially shut down and call Earth if it encountered that kind of bug, i.e., "safe mode". It was an inconvenient time -- during a rendezvous. The probe team had to hurriedly reset the probe. Perhaps it should have just reset and continued, with reporting as it goes, and reasonable limitations on behavior. Yes, this sounds a lot like Clementine's failure en route to Earth-crossing asteroid Geographos.)
"Braille" thus was a prophetic name for this asteroid.
However, the infrared camera functioned OK and the highlighted infrared image is at http://neo.jpl.nasa.gov/images/braille.gif.
Emphasis was made that the mission was already entirely successful without any target flybys, and any and all asteroid and comet flybys were extras.
That September, the mission was officially "extended" again, beyond the first budget allocation.
The next scheduled target was asteroid/Comet Wilson-Harrington a year and a half later. This is a very interesting object because it was seen as a captured comet with a tail in 1949, then "lost". Subsequently, an asteroid was discovered in 1979. Years later, someone backtracked the asteroid's orbit and realized that the asteroid was the comet, but without the tail. Thus, it became the first (and only, to date) comet seen to become an asteroid - a "transitionary" object. This lent further support to the mathematical models which state that many, if not most, asteroids near Earth are captured comets, and probably are very volatile rich under a thin crust.
Thus, many professionals were greatly excited about the Comet Wilson-Harrington encounter, far more so than the asteroid Braille.
The bugs in the pointing system were worked out in transit.
Unfortunately, in November 1999, the star tracker of Deep Space 1 failed. The spacecraft entered a "safe mode" whereby it shut down the propulsion system. Without the star tracker, engineers had to devise alternative ways of pointing and controlling the spacecraft, a very challenging task. An improvised, best-we-can-do system was implemented in December and January, and the spacecraft was deemed to still have some useful life.
The encounter with Comet Wilson-Harrington was missed due to the down time of the spacecraft.
The star tracker was not one of the 12 technologies to be tested, but was an advanced subsystem which had experienced intermittent problems earlier in the mission, and finally failed totally that November.
The next target was Comet Boreally in September, 2001. It successfully navigated a difficult trajectory near the comet's tail, getting very detailed photos of the comet, and taking measurements of the composition of the comet tail. The high resolution images showed that the jets coming out were offset from the comet nucleus and not distributed evenly. None of the jets were pointed at the spacecraft, by chance, which helped its survival. This part of the extended mission was a great success.
Some of the technologies tested included an autonomous navigation system using the star tracker, a Miniature Integrated Camera Spectrometer (MICAS), "SCARLET" solar arrays, and a small deep space transponder. The ion drive engine worked great all the way thru the last of its propellant. Total cost of mission (1995-99) was $152.3 million, all inclusive, and the extended part should be relatively little.
It was a completely successful mission in testing the 12 new technologies in space, and the failures were in the bonus extended mission, but most of all their style in announcing the bad news. To their credit, the technical paper on the DS1 website regarding the extended mission is a fascinating, indeed riveting, blow-by-blow account of the mission, its difficulties, successes ... and failures in the extra events (worded more carefully than this).
(My previous link to their mission page became a dead link.)