On the August 22nd 2014 a test flight of the F9R test vehicle ended in a flight termination.
In an interview Elon Musk once told, “We probably wil have some craters along the way” This is quite normal when you are pushing the technology you use and develop to the limits, this is a natural part of the process and you can learn a lot of your failures as we all know from daily live. However, you normally don’t see these “failures” as so self proclaimed “critic” use them to point and make a negative depiction. So let me make it very clear the flight termination of the F9R isn’t a failure as it’s purpose is to test the system to the limit. Just call this a unexpected hiccup.
The explosion was deliberately caused by the Flight Termination System (FTS) which is present in any modern rocket of considerable size. It is an autonomous system that checks the rocket functioning and trajectory. A FTS is to protect people an assets on the range and on the flight path of the rocket (down range) When a serious anomaly occurs e.g. the rocket is starting to get out of control the FTS will terminate the mission. This is done by detonating charges placed on both the propellant and liquid oxygen tank.
In case of the F9R termination, the rocket was still above the test flight when it was terminated. After termination propellant burned up very quickly and the only thing that happens is a lot of falling peaces. As this is scenario that is taken into account, it is so called fail save situation, that can only cause minor damage and no casualties as the test range is always abandoned before a test flight.
SpaceX has a very sophisticated autonomous FTS, where the FTS computer on the rocket itself makes the decision to terminate the flight when thing go south. No human interaction is needed.