Ask any current or former smoker about the perils of giving up and most will tell you quitting comes with some pretty intense side effects.

But for one train driver in Victoria, it almost proved deadly when they ran a level crossing before the boom gates were down.

Now an investigation by the Australian Transport Safety Bureau has found nicotine withdrawal is likely to blame.