TORONTO - Increasingly complicated vehicle software is making it "well-nigh impossible" to duplicate in testing all the real-world situations a driver could face, according to one expert.

"There is actually a serious problem in both identifying all the possible situations that can occur and simulating those situations so you can test to see whether the software actually worked correctly or not," said Tom Maibaum, principal investigator for the Centre for Safety-Critical Software Certification at McMaster University in Hamilton.

"It may actually be well-nigh impossible to duplicate some of the situations which may occur."

The average new vehicle today has approximately 100 different computers using close to 100 million lines of code, all of which are constantly communicating with each other and with hundreds of sensors, Maibaum said.

By comparison, the safety system at Ontario's Darlington nuclear plant uses one computer with 60,000 lines of code.

On Tuesday, Consumer Reports gave the Lexus GX 460 sport utility vehicle a rare "Don't Buy" warning due to the potential of rollovers. The magazine said the rear end of the SUV slid until it was nearly sideways before a stability system kicked in during a test of how it handled unusual turns.

In Canada, Lexus is the subject of a lawsuit by a Toronto woman who says software problems with the automatic transmission of her ES330 caused her to lose control of her vehicle and drive it into a tree.

Toyota acknowledged problems with the automatic transmissions in its Camry, Sienna, Highlander and Lexus ES vehicles and said it was seeing numerous customer complaints as early as 2004, according to documents filed in the Ontario Superior Court.

Maibaum said "a very simple problem" -- the complicated software -- is at the heart of problems like those faced by Toyota.

When dozens of computers are used simultaneously, they have to be prepared to deal with a dizzying array of complicated real-world situations, he said.

Unfortunately, the software is often designed cheaply and quickly by engineers who don't necessarily have the right education and experience, and badly designed software can make fixing a problem that much harder.

"It makes it much more difficult to know whether you're fixing the right thing or whether in fixing the right thing, because the software is not well designed, you may actually be affecting other parts of the software," Maibaum said.

The only way to overcome these problems is by spending the money and taking the time to properly design and test all the software that goes into a vehicle, Maibaum said.