A software bug was responsible for the rush hour meltdown Friday evening, when subway service was halted on six numbered lines and the Times Square shuttle.

The bug knocked out the computer system that tracks the lines, leaving workers in the MTA's Rail Control Center unable to know where trains were located.

That forced the MTA to halt service.

"Of course, one of the problems with bugs is, you don't know that you have a bug until a bug manifests itself," NYC Transit President Andy Byford said. "But we're taking steps not only to locate any other circumstances, but also to upgrade the system."

This failure of train tracking system, called Automatic Train Supervision, was not an isolated incident.

"I think we need outside expertise," MTA board member Larry Schwartz said. "I'm not sure whether or not we have the internal expertise to determine how to prevent future viruses or bugs possibly from invading the system."

According to MTA records obtained by NY1, subway service has been affected 952 times in the last 10 years because the Automatic Train Supervision system did not work properly.

The MTA flagged 109 of those incidents as "significant," affecting more than 7,700 trains.

Including Friday's meltdown, there have been seven significant disruptions so far this year, affecting more than 1,000 trains, compared to eight in all of last year.

"We have on occasions had problems with ATS but nothing of this magnitude," Byford said, "Yes, there have been a number of what I would call fairly run-of-the-mill incidents with ATS and in each case, we've resolved them."

MTA officials say a July 6 failure with the system was the result of an error in a single line of code.

A morning rush hour on March 21 was ruined when Rail Control Center had its train status board freeze, with red dots in place of trains.

It was blamed on a software issue.

In October, back-to-back outages on a Sunday evening and the following morning inconvenienced riders.

Schwartz, the MTA board member, wanted to bring in the agency's inspector general to investigate the problems with the train tracking system.

MTA board member Linda Lacewell asked for a closed door briefing about the MTA's cyber-security issues.

An MTA spokesman said that number of incidents will fall, as more lines get the same modern signaling system installed on the 7 and L lines.