When may a driver stop on railroad tracks?

Never stop on railroad tracks. If your car stalls on the tracks and you cannot restart it, get out and try to push the car off the tracks. If you cannot push the car off the tracks, get help. Do not begin to cross railroad tracks unless your car can entirely clear the tracks.
DMV Writen Test