As Pepsi noted, section 42 does not account for the ‘in between’ situation
Suppose the proximity and momentum of the driver is such that, at the time the signal activated, attempting to comply with 42 (2) (b) and ‘not proceed’ across the crossing and rather to stop, would leave them in violation of 42 (2) (a) and stopped closer than 5 metres to the track.
Technically, you may be in a situation where it is impossible not to violate one of the two. Surely that is not the intent of the law, and one may hope an officer would be able to use judgment to elect not to write a ticket.
Consider the stopping distance, which factors in thinking and braking time. Here is an article with some info and examples on that calculation
https://www.raisethehammer.org/artic...pping_distance
So if you were approaching the crossing at, say 40 km/h, then on dry asphalt you may have a stopping distance of 18.98, plus the 5 metres from the track within which you can’t stop. So if you were going 40 and you believe you were less than ~24 m from the tracks, then you have to cross so as not to stop within 5 m
There could be a case to be made, if you can reasonably establish the distance at which you saw the signal activate
So 2 factors need to be considered, the distance you were at when the light activated, plus your speed
If you were to fight it, I believe you could apply for disclosure, so if there is a camera, and a photo and a speed upon which they wish to rely, as part of the prosecution, then you should be able to get access to it.