A software error led to integer overflow, causing the rocket to veer off its flight path 37 seconds after launch. This caused the vehicle to disintegrate under high aerodynamic forces, eventually self-destructing due to its flight termination system.