The failure of a sophisticated electronic system designed to keep trains from colliding has been blamed for the crash.