Just to chip in on the software front: my day job is electronic engineering and embedded software, so I've seen a lot of software bugs in my time. The great virtue of software is its flexibility - you can change functionality as you want. But this comes back to bite you from a project management perspective, especially with a new product introduction. Anyone doing a project plan will look for fixed constraints and lead times - and making the hardware is full of these. Meanwhile, the software can be developed almost independently of the hardware. This often encourages senior management, faced with a project running late, to cut back time for software development, integration with the final hardware (which, of course, has to wait for the hardware to be ready), and lots and lots of testing. A big complex system like a train, made of hundreds of components? Cutting short the testing to "get the product out there" will come back to bite you. Airbus mitigate a lot of this by having an "iron bird" - a complete plane's worth of electrical/mechanical systems, minus the actual airframe - in a warehouse, so that you can get as close as possible to the real hardware as early as you can. I can't help but feel that the train makers are all rather late to the software party and failing to learn the lessons from other industries. But it's very common to have teething troubles as a result of system integration difficulties. Integration between train and signalling is a big one in the rail sector. Power supply quality is often a big factor. I once worked on an electrical consumer appliance where we had a few units reported as catching fire. It was impossible to replicate in the lab initially and took weeks of work to find out what was going on - it turned out to be caused by people plugging them into portable generators, which produce an out-of-spec mains voltage that was confusing the power electronics.
But I bet my bottom dollar that the main issue is that other aspects (mechanical, electrical, supply chain) of the GA Flirt project at Stadler ran late, and so software development and testing time got cut short to try and get the trains delivered. It's a very common management decision, and one that often doesn't end well!