Elvas Tower: Traffic Train Vanishes in x2127 - Elvas Tower

Jump to content

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

Traffic Train Vanishes in x2127 Unhanded Exception Error Message Rate Topic: -----

#11 User is offline   R H Steele 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 3,442
  • Joined: 14-March 13
  • Gender:Male
  • Location:known universe
  • Simulator:Open Rails
  • Country:

Posted 08 April 2014 - 02:43 PM

View Postcopperpen, on 07 April 2014 - 11:14 PM, said:

It appears that this curve resistance change in 2117 is doing something strange. Your AI disappears, my player train and others lock OR under certain conditions. I therefore think the two situations generate the same error, but the AI gets dumped, and the game freezes if it is the player because that cannot be dumped.

Turn curve resistance off and everything works.


Interesting, when I found that it dumped the AI train, I wondered what would have happened had it been the player train.

#12 User is online   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,868
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 12 April 2014 - 05:13 AM

Hi Copperpen,

View Postcopperpen, on 07 April 2014 - 11:14 PM, said:

It appears that this curve resistance change in 2117 is doing something strange. Your AI disappears, my player train and others lock OR under certain conditions. I therefore think the two situations generate the same error, but the AI gets dumped, and the game freezes if it is the player because that cannot be dumped.

Tracking this down might be tricky as the error message from Gerry is all about graphics and not directly linked to Curve Resistance.

Are you able to pinpoint a player train that gets into trouble "under certain conditions" so that I can reproduce the problem?

Thanks,

#13 User is offline   JTang 

  • Open Rails Developer
  • Group: Status: Active Member
  • Posts: 643
  • Joined: 18-November 10
  • Gender:Male
  • Country:

Posted 12 April 2014 - 05:38 AM

It is because the train car's XNAmatrix is miscalculated due to errors of dividing zero, which should be guarded. The train is still there but cannot be shown.

#14 User is offline   copperpen 

  • Executive Vice President
  • Group: Status: Elite Member
  • Posts: 3,144
  • Joined: 08-August 05
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 12 April 2014 - 11:14 AM

View Postcjakeman, on 12 April 2014 - 05:13 AM, said:

Hi Copperpen,


Tracking this down might be tricky as the error message from Gerry is all about graphics and not directly linked to Curve Resistance.

Are you able to pinpoint a player train that gets into trouble "under certain conditions" so that I can reproduce the problem?

Thanks,

My bug report Bug 1300942 refers. Turn curve resistance off and the player train is fine. At the time of the freeze the train is spread out over four switches and a left hand curve.

The activity is Milw02_ThruFreight261 and the freeze occurs while leaving the yard.

#15 User is online   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,868
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 12 April 2014 - 11:42 AM

Hi Jijun,

View PostJTang, on 12 April 2014 - 05:38 AM, said:

It is because the train car's XNAmatrix is miscalculated due to errors of dividing zero, which should be guarded. The train is still there but cannot be shown.

Sounds entirely plausible, but I can't find any way in which the Curve Resistance changes could have this effect.

Line: 1123 hasn't changed in a long time:
WorldPosition.XNAMatrix = Matrix.CreateRotationZ(z) * SuperElevationMatrix * WorldPosition.XNAMatrix;

Any ideas?

#16 User is online   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,868
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 13 April 2014 - 12:27 AM

View Postcopperpen, on 12 April 2014 - 11:14 AM, said:

My bug report Bug 1300942 refers. Turn curve resistance off and the player train is fine. At the time of the freeze the train is spread out over four switches and a left hand curve.

Thanks, Copperpen.

#17 User is offline   JTang 

  • Open Rails Developer
  • Group: Status: Active Member
  • Posts: 643
  • Joined: 18-November 10
  • Gender:Male
  • Country:

Posted 13 April 2014 - 12:52 PM

View Postcjakeman, on 12 April 2014 - 11:42 AM, said:

Hi Jijun,


Sounds entirely plausible, but I can't find any way in which the Curve Resistance changes could have this effect.

Line: 1123 hasn't changed in a long time:
WorldPosition.XNAMatrix = Matrix.CreateRotationZ(z) * SuperElevationMatrix * WorldPosition.XNAMatrix;

Any ideas?


It is before that (I do not have my laptop handy, so could not pinpoint the location), but based on my conversation with steamer_ctn, it is some code around line 2857 in the train.cs.

#18 User is offline   dennisat 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 474
  • Joined: 16-February 13
  • Gender:Male
  • Simulator:Open Rails & MSTS
  • Country:

Posted 14 April 2014 - 06:22 AM

I don't know if this could have any relation to the problem but I have recently been having problems with a Dorset Coast activity freezing. I have Curve Dependent Resistance selected but not Curve Dependent Speed Limit. If I deselect Curve Dependent Resistance the activity works OK.

I have eventually traced the freeze to the UpdateCurveSpeedLimit() method in TrainCar.cs.

At entry to this method, CurrentCurveRadius = 7003.413 and RouteSpeedMpS = 44.704.

Following the logic through, this leads the value of SuperelevationM to be set to zero. Yet further down, SuperelevationM is used to calculate MaxCurveEqualLoadSpeedMps which comes out as zero.

Now into method UpdateCurveForce(). MaxCurveEqualLoadSpeedMps is used as a divisor to calculate CurveResistanceSpeedFactor which comes out as Infinity. Subsequently, CurveForceN is calculated using CurveResistanceSpeedFactor which comes out as not a float number. Eventually TotalForceN is calculated using CurveForceN and everything freezes up.

I found I could cure the freeze by setting SuperElevationM to .001 (instead of 0) in the "else" clause to "if (RouteSpeedMpS > 55.0)" in UpdateCurveSpeedLimit().
I'm aware that's probably not the best thing to do but the activity runs now.

Dennis

#19 User is online   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,868
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 14 April 2014 - 10:03 AM

Hi Dennis,

View Postdennisat, on 14 April 2014 - 06:22 AM, said:

I found I could cure the freeze by setting SuperElevationM to .001 (instead of 0) in the "else" clause to "if (RouteSpeedMpS > 55.0)" in UpdateCurveSpeedLimit().
I'm aware that's probably not the best thing to do but the activity runs now.

That's great work, Dennis. Sounds really plausible. Thanks ever so much.

I'll sort out a patch with Steamer_stn,

#20 User is offline   steamer_ctn 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 1,889
  • Joined: 24-June 11
  • Gender:Male
  • Country:

Posted 15 April 2014 - 02:11 AM

Hi Dennis,

View Postdennisat, on 14 April 2014 - 06:22 AM, said:

I don't know if this could have any relation to the problem but I have recently been having problems with a Dorset Coast activity freezing. I have Curve Dependent Resistance selected but not Curve Dependent Speed Limit. If I deselect Curve Dependent Resistance the activity works OK.

.................................

I found I could cure the freeze by setting SuperElevationM to .001 (instead of 0) in the "else" clause to "if (RouteSpeedMpS > 55.0)" in UpdateCurveSpeedLimit().
I'm aware that's probably not the best thing to do but the activity runs now.

Thanks for identifying this problem for me.

I have added a patch (#2180) to fix this issue as you have suggested, as it fits ok with the function logic.

I have also added weather conditions to the curve friction, ie in wet conditions there will be less friction on the curve.

Can you please test the changes on the "impacted" activity and confirm all is ok.

Thanks again.

Cheers

Peter

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users