System.ArgumentOutOfRangeException at ORTS.Train.UpdateSectionState

Bug #1408546 reported by Derek Morton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Open Rails
Fix Released
High
Carlo Santucci

Bug Description

Crash on start of activity

Revision history for this message
Derek Morton (derek-a) wrote :
Peter Gulyas (pzgulyas)
summary: - System.ArgumentOutOfRangeException: Index was out of range
+ System.ArgumentOutOfRangeException at ORTS.Train.UpdateSectionState
Revision history for this message
r.roeterdink (r-roeterdink) wrote :

Could you please attach the related activity files : activity, traffic and paths (consists are not required).

Thanks,
Rob Roeterdink

Revision history for this message
Derek Morton (derek-a) wrote : Re: [Bug 1408546] Re: System.ArgumentOutOfRangeException at ORTS.Train.UpdateSectionState

Files as requested.

cheers
Derek

On 8/01/2015 19:40, r.roeterdink wrote:
> Could you please attach the related activity files : activity, traffic
> and paths (consists are not required).
>
> Thanks,
> Rob Roeterdink
>

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

Thanks - but I'm still missing some files, I'm afraid.
I need all the Service files, as well as all paths, that is those for the AI trains as well.

Thanks,
Rob Roeterdink

Revision history for this message
Derek Morton (derek-a) wrote :

Hi Rob,

Extra files as requested.

cheers
Derek

On 9/01/2015 9:38, r.roeterdink wrote:
> Thanks - but I'm still missing some files, I'm afraid.
> I need all the Service files, as well as all paths, that is those for the AI trains as well.
>
> Thanks,
> Rob Roeterdink
>

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

OK - thanks.
Found the problem : the crash is caused because a train which enters the sim at speed (CN_Q11131_AI) cannot be located and therefor is not properly initiliazed, leaving various data without proper values. Despite this a full update is performed on that train. That cannot work.
I will contact Carlo Santucci on this as he created the code for trains entering the sim at speed.

Regards,
Rob Roeterdink

Changed in or:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Carlo Santucci (carlosanit1) wrote :

Should be fixed in x.2777. Derek, pls. check.

Changed in or:
assignee: nobody → Carlo Santucci (carlosanit1)
status: Confirmed → In Progress
Revision history for this message
Derek Morton (derek-a) wrote :

Hi Carlo,

There is no crash, but no AI train either?

cheers
Derek

On 9/01/2015 19:49, Carlo Santucci wrote:
> Should be fixed in x.2777. Derek, pls. check.
>
> ** Changed in: or
> Assignee: (unassigned) => Carlo Santucci (carlosanit1)
>
> ** Changed in: or
> Status: Confirmed => In Progress
>

Revision history for this message
Carlo Santucci (carlosanit1) wrote :

Good that the crash has gone.
The AI train does not appear because OR could not position it at the initial position. There can be various reasons for this, but the most common is that such position is already occupied or reserved by another train. In this case OR retries every 30 seconds for 15 minutes; if after such time the train still could not be positioned, a log message is written in the logfile.
You could also try to enable the MSTS compatibility option, as it is more "tolerant" and MSTS compatible in positioning the train at the initial position.

Revision history for this message
Derek Morton (derek-a) wrote :

The train appeared when the MSTS compatibility option was ticked

On 9/01/2015 22:59, Carlo Santucci wrote:
> Good that the crash has gone.
> The AI train does not appear because OR could not position it at the initial position. There can be various reasons for this, but the most common is that such position is already occupied or reserved by another train. In this case OR retries every 30 seconds for 15 minutes; if after such time the train still could not be positioned, a log message is written in the logfile.
> You could also try to enable the MSTS compatibility option, as it is more "tolerant" and MSTS compatible in positioning the train at the initial position.
>

Changed in or:
status: In Progress → Fix Committed
Revision history for this message
r.roeterdink (r-roeterdink) wrote :

The AI train is booked to start just 5 secs. before the start of the activity, on the single track right in front of the player train.
Because of this, it falls in the 10 secs. 'black hole' before the activity start. As the pre-run processing runs every 10 secs., the last update before the start of the activity is 10 secs. before that start. Any train booked to start within those last 10 secs. is started after the activity start, and therefor after the player train has been started. By then, the player train will have claimed that section of single track and the AI train can no longer start until after the player train has gone. That is what happens - the AI train is generated behind the player train as soon as the player train has cleared that section.

Setting "enhanced compatibility" will allow the AI train to be generated even though the player train has cleared its path over that section. The other possible way out is to start the AI train some 10 secs. earlier.

James Ross (twpol)
Changed in or:
milestone: none → 1.0
James Ross (twpol)
Changed in or:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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