The other week I spotted something strange on my train home – the gibberish looking message on the destination screen of a Melbourne train. So what’s the story here?
To be accurate, the message wasn’t complete gibberish – but {"Colour": "#009639", "text": "Flinders Street"}
– JSON formatted data for ‘Flinders Street’ and hex colour code for green ‘#009639‘.
Many people guessed that the cause of this bug is “colour” vs “color” spelling, with CSS requiring the use of the American ‘color’ spelling, but it’s actually a much more obscure bug…
The backstory
When first delivered back in the early-2000s, the fleet of Siemens trains in Melbourne were fitted with a low resolution LED matrix display to show the names of upcoming stations.
However two decades later this passenger information and communication system was approaching the end of life, so an upgraded system was installed in two stages – the first being the new hardware being installed, but operating the same as the previous system, but on the new high resolution LED displays.
And followed by stage two – a software change to show a dynamic route map to passengers.
But there was one problem – the Siemens trains are 3-car sets, coupled together to form a 6-car train in normal operation, with communication signals sent across the coupler.
But if an train with the updated dynamic route map software leads an unmodified train, the payload for other half of the train to display is JSON formatted, which an unmodified train doesn’t know how to handle, and so blindly spits out the gibberish to the passenger facing displays.
At least the data structure they chose wasn’t XML – or even worse, YAML. ☠️
A Twitter related footnote
I originally posted the above video to Twitter, went to bed, and realised a few days later it had 830,000 views, 21,000 likes 1,900 retweets and 83 comments against it.
I didn’t notice it at the time because I’m not a heathen who enables notifications on their phone.
Just another case of mismatching, it probably doesn’t happen much now
As the new software rolls out across the fleet I’d expect it to happen less often.
Notifications aren’t a default?
By the way, I AM NOT a heathen! I’m a Philistine!!
(And Thomas Huxley’s version of an Atheist, not one of those clowns who deny “there are no gods” is a religious conviction.) – DavID