If it derails at a certain spot everytime, it may be a track problem. Do you have any other locomotives that don't derail? Four things that I can think of off the top of my head will cause derailing. #1 The track being out of gauge will cause a derail. #2. Locomotive wheels being out of gauge will cause a derail. #3. If your minimum radius is too tight for a locomotive, it will derail. #4. If you have dips or bumps in your track work on a corner section and a long wheel base locomotive like an Alco PA, a DD40x or some of the new 6 axle power units they can be derailed when the locomotive tries to go over the bad section of track.
One more thing I forgot to mention, sometimes a locomotive will derail when it shouldn't have any problem with a particular radius. If a part of the wiring moves into the wrong place, or a detail gets bent slightly, or a wire to one of the trucks is too tight, anything that might restrict the travel or swivel of a truck will cause derailing.