This has been a long standing issue: the french RFSP (Paris subway) route (http://funtrain.net/fr/simulateur-de-train/microsoft-train-simulator/lignes/add-on-12/) fails to load due to an exception in Signal.cs. The error report below was obtained with a revision #2194, but the situation is the same with more recent revision:
Error: System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
à ORTS.SignalWorldObject..ctor(SignalObj SignalWorldItem, SIGCFGFile sigcfg) dans c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\Signals\Signals.cs:ligne 9874
à ORTS.Signals.BuildSignalWorld(Simulator simulator, SIGCFGFile sigcfg) dans c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\Signals\Signals.cs:ligne 462
à ORTS.Signals..ctor(Simulator simulator, SIGCFGFile sigcfg) dans c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\Signals\Signals.cs:ligne 111
à ORTS.Simulator.Start() dans c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\Simulator\Simulator.cs:ligne 231
à ORTS.Processes.GameStateRunActivity.Start(UserSettings settings, String acttype, String[] args) dans c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\Processes\GameStateRunActivity.cs:ligne 261
à ORTS.Processes.GameStateRunActivity.<>c__DisplayClass6.<Load>b__3() dans c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\Processes\GameStateRunActivity.cs:ligne 149
à ORTS.Processes.GameStateRunActivity.Load() dans c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\Processes\GameStateRunActivity.cs:ligne 190
à ORTS.Processes.LoaderProcess.Load() dans c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\Processes\LoaderProcess.cs:ligne 121
à ORTS.Processes.LoaderProcess.DoLoad() dans c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\Processes\LoaderProcess.cs:ligne 102
à ORTS.Processes.LoaderProcess.LoaderThread() dans c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\Processes\LoaderProcess.cs:ligne 73
à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
à System.Threading.ThreadHelper.ThreadStart()
Actually, the TDB of the route may contain some inconsistencies, but the error should be captured by OR. I attach a patch that:
- detects that SignalWorldItem.SignalUnits is null before accessing it, thus avoiding the exception
-- emits a warning if SignalWorldItem.SignalUnits is null and continues the loading process
-- process SignalWorldItem.SignalUnits otherwise
With this patch, the route can be loaded and it works fine.
Reattach the patch with the proper flag