System.ArgumentOutOfRangeException at ORTS.DeadlockInfo.SetTrainDetails (X.2065)

Bug #1286978 reported by Basil Price
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Open Rails
Expired
Medium
Unassigned

Bug Description

When starting some activities on the SLI Scenic Sub 2.0 the sim will crash while loading.

System argument out of range exception, Index was out of range. Must be non negative and less than the size of the collection. Parameter name: Index

Open Rails is starting...
Argument 0 = -start
Argument 1 = H:\Train Simulator\ROUTES\BNSF_Scenic\ACTIVITIES\6_CanadianImports.act
Version = X.2065
Build = 0.0.5172.33706 (2014-02-28 18:43:32Z)
Logfile = C:\Users\BPrice\Desktop\OpenRailsLog.txt
--------------------------------------------------------------------------------
AdhesionMovingAverageFilterSize = 10
Alerter = False
AvatarURL = (user set) http://www.openrails.org/images/ICONmediumOD.jpg
BrakePipeChargingRate = (user set) 30
BreakCouplers = False
Cab2DStretch = 0
CarVibratingLevel = (user set) 1
CurveResistanceOptimalSpeed = 0.75
CurveResistanceSpeedDependent = False
CurveResistanceZeroSpeedFactor = 3
DataLogger = (user set) True
DataLoggerSeparator = comma
DataLogMisc = (user set) True
DataLogPerformance = True
DataLogPhysics = (user set) True
DataLogSpeedUnits = route
DataLogStart = False
DataLogStationStops = False
DataLogTrainSpeed = False
DataLogTSContents = 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
DataLogTSInterval = 10
DayAmbientLight = (user set) 26
DistantMountains = (user set) True
DistantMountainsViewingDistance = (user set) 50000
DoubleWire = False
DynamicShadows = (user set) True
FullScreen = (user set) True
GraduatedRelease = False
Language =
LoadingDelay = 0
LODAlwaysMaximum = (user set) True
LODViewingExtention = (user set) True
Logging = True
LoggingFilename = OpenRailsLog.txt
LoggingPath = C:\Users\BPrice\Desktop
Menu_Selection = (user set) H:\Train Simulator, H:\Train Simulator\ROUTES\BNSF_Scenic, H:\Train Simulator\ROUTES\BNSF_Scenic\ACTIVITIES\6_CanadianImports.act
MSTSBINSound = True
Multiplayer = False
Multiplayer_Host = (user set)
Multiplayer_Port = 30000
Multiplayer_UpdateInterval = 10
Multiplayer_User = (user set)
MultiplayerClient = False
MultiplayerServer = False
OverrideNonElectrifiedRoutes = False
PerformanceTuner = False
PerformanceTunerTarget = (user set) 10
Precipitation = (user set) True
PreferDDSTexture = False
Profiling = False
ProfilingFrameCount = 0
ProfilingTime = 0
ReplayPauseBeforeEnd = True
ReplayPauseBeforeEndS = 0
ScreenshotPath = C:\Users\BPrice\Pictures\Open Rails
ShaderModel = 3
ShadowAllShapes = False
ShadowMapBlur = True
ShadowMapCount = 4
ShadowMapDistance = 1500
ShadowMapResolution = 1024
ShowAvatar = False
ShowErrorDialogs = True
SoundDetailLevel = 5
SoundVolumePercent = 100
SuperElevationGauge = 1435
SuperElevationMinLen = (user set) 65
SuppressConfirmations = False
TrainLights = (user set) True
UseAdvancedAdhesion = True
UseLocationPassingPaths = (user set) True
UseMSTSEnv = False
UseSuperElevation = (user set) 1
VerticalSync = False
ViewDispatcher = (user set) True
ViewingDistance = (user set) 3000
ViewingFOV = 45
WindowGlass = (user set) True
WindowPosition_Activity = 50, 50
WindowPosition_CarOperations = 50, 50
WindowPosition_Compass = 50, 0
WindowPosition_ComposeMessage = 50, 50
WindowPosition_DriverAid = 100, 100
WindowPosition_Help = (user set) 50, 46
WindowPosition_NextStation = (user set) 100, 100
WindowPosition_Quit = (user set) 42, 35
WindowPosition_Switch = (user set) 8, 100
WindowPosition_TrackMonitor = (user set) 0, 100
WindowPosition_TrainOperations = (user set) 61, 49
WindowSize = (user set) 1360x768
Wire = False
WorldObjectDensity = 10
--------------------------------------------------------------------------------
Mode = Activity
Activity = H:\Train Simulator\ROUTES\BNSF_Scenic\ACTIVITIES\6_CanadianImports.act
--------------------------------------------------------------------------------
Loading TRK TDB SIGCFG DAT ACT RDB CARSPAWN SIGSCR WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW

Error: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at ORTS.DeadlockInfo.SetTrainDetails(Int32 trainNumber, Int32 subpathRef, Single trainLength, TCSubpathRoute subpath, Int32 elementRouteIndex) in c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\Signals\Signals.cs:line 11164
   at ORTS.Train.SetDeadlock_locationBased(Int32 thisIndex, TCSubpathRoute thisRoute, TCSubpathRoute otherRoute, Train otherTrain) in c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\Physics\Train.cs:line 8270
   at ORTS.Train.CheckDeadlock_locationBased(TCSubpathRoute thisRoute, Int32 thisNumber) in c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\Physics\Train.cs:line 8156
   at ORTS.Train.CheckDeadlock(TCSubpathRoute thisRoute, Int32 thisNumber) in c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\Physics\Train.cs:line 7929
   at ORTS.AITrain.PostInit() in c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\AI\AITrain.cs:line 224
   at ORTS.AI.AddToWorld(AITrain thisTrain) in c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\AI\AI.cs:line 311
   at ORTS.AI.AIUpdate(Single elapsedClockSeconds, Boolean preUpdate) in c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\AI\AI.cs:line 171
   at ORTS.AI..ctor(Simulator simulator, Double activityStartTime) in c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\AI\AI.cs:line 85
   at ORTS.Simulator.Start() in c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\Simulator\Simulator.cs:line 216
   at ORTS.Processes.GameStateRunActivity.Start(UserSettings settings, String[] args) in c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\Processes\GameStateRunActivity.cs:line 248
   at ORTS.Processes.GameStateRunActivity.<>c__DisplayClass6.<Load>b__3() in c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\Processes\GameStateRunActivity.cs:line 138
   at ORTS.Processes.GameStateRunActivity.Load() in c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\Processes\GameStateRunActivity.cs:line 178
   at ORTS.Processes.LoaderProcess.Load() in c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\Processes\LoaderProcess.cs:line 121
   at ORTS.Processes.LoaderProcess.DoLoad() in c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\Processes\LoaderProcess.cs:line 102
   at ORTS.Processes.LoaderProcess.LoaderThread() in c:\Users\James\Documents\Coding\Jenkins\workspace\Open Rails Experimental\Source\RunActivity\Processes\LoaderProcess.cs:line 73
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Loader: Time = 00:04:02.1068255 ms
Loader: Expected = 95,344,798 bytes
Loader: Actual = 12,143,377 bytes
Loader: Difference = -83,201,421 bytes (-87.3 %)

Information: Game.PopState()

Revision history for this message
r.roeterdink (r-roeterdink) wrote :

It seems to me something has gone wrong with the installation of Open Rails.
Just tried this activity on version X2071, and all went well (see attached log). There have been no changes to this code since X2048.

Also, these are the lines around the line where the crash occured :

        public int SetTrainDetails(int trainNumber, int subpathRef, float trainLength, Train.TCSubpathRoute subpath, int elementRouteIndex)
        {
            int trainSubpathIndex = GetTrainAndSubpathIndex(trainNumber, subpathRef);
            Train.TCSubpathRoute partPath = null; // retreived route of train through deadlock area

            // search if trains path has valid equivalent

Clearly, there is na array in there.
There were problems in this routine earlier but these were corrected in version X2048. It seems somehow you still have the old version of RunActivity.exe.

Revision history for this message
Basil Price (bhprice2) wrote : Re: [Bug 1286978] Re: Some activities crash while loading
Download full text (11.7 KiB)

Problem solved. I had the experimental option "Use location-linked passing
path processing" checked. It loads fine without it checked.

Thanks
Basil
-----Original Message-----
From: r.roeterdink
Sent: Monday, March 03, 2014 3:52 AM
To: <email address hidden>
Subject: [Bug 1286978] Re: Some activities crash while loading

It seems to me something has gone wrong with the installation of Open Rails.
Just tried this activity on version X2071, and all went well (see attached
log). There have been no changes to this code since X2048.

Also, these are the lines around the line where the crash occured :

        public int SetTrainDetails(int trainNumber, int subpathRef, float
trainLength, Train.TCSubpathRoute subpath, int elementRouteIndex)
        {
            int trainSubpathIndex = GetTrainAndSubpathIndex(trainNumber,
subpathRef);
            Train.TCSubpathRoute partPath = null; // retreived route of
train through deadlock area

            // search if trains path has valid equivalent

Clearly, there is na array in there.
There were problems in this routine earlier but these were corrected in
version X2048. It seems somehow you still have the old version of
RunActivity.exe.

** Attachment added: "OpenRails_BNSFScenic.log"
   https://bugs.launchpad.net/or/+bug/1286978/+attachment/4005016/+files/OpenRails_BNSFScenic.log

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1286978

Title:
  Some activities crash while loading

Status in Open Rails Tracker:
  New

Bug description:
  When starting some activities on the SLI Scenic Sub 2.0 the sim will
  crash while loading.

  System argument out of range exception, Index was out of range. Must
  be non negative and less than the size of the collection. Parameter
  name: Index

  Open Rails is starting...
  Argument 0 = -start
  Argument 1 = H:\Train
Simulator\ROUTES\BNSF_Scenic\ACTIVITIES\6_CanadianImports.act
  Version = X.2065
  Build = 0.0.5172.33706 (2014-02-28 18:43:32Z)
  Logfile = C:\Users\BPrice\Desktop\OpenRailsLog.txt
  --------------------------------------------------------------------------------
  AdhesionMovingAverageFilterSize = 10
  Alerter = False
  AvatarURL = (user set)
http://www.openrails.org/images/ICONmediumOD.jpg
  BrakePipeChargingRate = (user set) 30
  BreakCouplers = False
  Cab2DStretch = 0
  CarVibratingLevel = (user set) 1
  CurveResistanceOptimalSpeed = 0.75
  CurveResistanceSpeedDependent = False
  CurveResistanceZeroSpeedFactor = 3
  DataLogger = (user set) True
  DataLoggerSeparator = comma
  DataLogMisc = (user set) True
  DataLogPerformance = True
  DataLogPhysics = (user set) True
  DataLogSpeedUnits = route
  DataLogStart = False
  DataLogStationStops = False
  D...

James Ross (twpol)
summary: - Some activities crash while loading
+ System.ArgumentOutOfRangeException at ORTS.DeadlockInfo.SetTrainDetails
tags: added: crash signals
James Ross (twpol)
tags: added: experimental
James Ross (twpol)
Changed in or:
status: New → Triaged
importance: Undecided → Medium
James Ross (twpol)
summary: System.ArgumentOutOfRangeException at ORTS.DeadlockInfo.SetTrainDetails
+ (X.2065)
Revision history for this message
spawncpt (spawncpt) wrote :

Trying to set up a timetable with different kinds of passenger trains on the Full Bucket line I have come across this bug as well. It seems to have to do with trains not going through any platforms of a station at which trains from the opposite direction stop. When I route the express trains through any of the platform tracks the crash does not occur.

Revision history for this message
sachin (sachindevadiga1992) wrote :

pls

Revision history for this message
sachin (sachindevadiga1992) wrote :

pls

Revision history for this message
Cédric GNIEWEK (sharpeserana) wrote :

Does the problem still happen with version 1.4?

Changed in or:
status: Triaged → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Open Rails because there has been no activity for 60 days.]

Changed in or:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.