How much warning does the engineer or conductor get before the train derails or topples over?
In this instance, I'm sure the rail would probably roll over and the wheels would just fall where they are. Probably nothing but a real inconvenience for the crew who is tasked with rerailing the engine. As far as a warning, there probably wouldn't be any. It happens kinda like you walking in the woods and snaping a twig with one of you steps. It just happens.