Elvas Tower: FPM Pacific Surfliner problem - Elvas Tower

Jump to content

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

FPM Pacific Surfliner problem Rate Topic: -----

#1 User is offline   engmod 

  • Open Rails Developer
  • PipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 1,754
  • Joined: 26-February 08
  • Gender:Male
  • Location:Eltham, Victoria, Australia
  • Simulator:ORNYMG
  • Country:

Posted 11 October 2018 - 04:48 PM

I have a problem with "steam engine tender" and I have no idea where to look.

I don't believe this is a bug in OR.

This is the commercial FPM Surfliner route.

Any assistance would be appreciated.

cheers
Derek

Attached File(s)



#2 User is offline   engmod 

  • Open Rails Developer
  • PipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 1,754
  • Joined: 26-February 08
  • Gender:Male
  • Location:Eltham, Victoria, Australia
  • Simulator:ORNYMG
  • Country:

Posted 11 October 2018 - 09:05 PM

The crash is from this snippet of code:-

// TO BE CHECKED - What happens if multiple locomotives are coupled together in reverse?
SteamLocomotiveTender = Train.Cars[tenderIndex] as MSTSSteamLocomotive;
SteamLocomotiveTender.HasTenderCoupled = true;
crash here

#3 User is offline   engmod 

  • Open Rails Developer
  • PipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 1,754
  • Joined: 26-February 08
  • Gender:Male
  • Location:Eltham, Victoria, Australia
  • Simulator:ORNYMG
  • Country:

Posted 11 October 2018 - 10:42 PM

I have a crash from Surfliner2-2 as well.

Same tender stuff

Attached File(s)



#4 User is offline   copperpen 

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

Posted 12 October 2018 - 02:04 AM

I had exactly the same error when trying to run a specific DMU set on the UK Mideast Plus route. The cause was untraceable and I ended up doing a complete re-install of the route and stock. I had modified the DMU for OR operation and it worked in OR v1.1, but not from 1.2 onwards. FWIW I have tested the FPM OLI activity here and it runs with no error.

#5 User is offline   engmod 

  • Open Rails Developer
  • PipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 1,754
  • Joined: 26-February 08
  • Gender:Male
  • Location:Eltham, Victoria, Australia
  • Simulator:ORNYMG
  • Country:

Posted 12 October 2018 - 07:35 PM

And another one.

Attached File(s)



#6 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,986
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 13 October 2018 - 12:37 PM

I see a possible error in the part of code involved, that I think should be corrected before 1.3, but I'd prefer if the code author intervenes. This is the code part:
          else if(Train.Cars.Count < 1) // If car count is less then 1, then there must be no tender attached
                {
                    SteamLocomotiveTender = Train.Cars[0] as MSTSSteamLocomotive;
                    SteamLocomotiveTender.HasTenderCoupled = false;
                }

This means 0 cars. However in next line Train.Cars[0] is called. I think that in the first line the test should be == 1. I don't know if this solves all problems. Probably not.

#7 User is offline   steamer_ctn 

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

Posted 13 October 2018 - 07:01 PM

View PostCsantucci, on 13 October 2018 - 12:37 PM, said:

This means 0 cars. However in next line Train.Cars[0] is called. I think that in the first line the test should be == 1. I don't know if this solves all problems. Probably not.

#4260 has a patch to correct this. Thanks Carlo for identifying it.

As you suggest I don't expect it to fix the problem first identified.

At the moment the code supposedly causing problems (ConfirmSteamLocomotiveTender) should only be accessed if the car is a steam locomotive. To ensure this is the case the following test is done:
if (WagonType == WagonTypes.Engine && EngineType == EngineTypes.Steam )


It appears that the problem identified is occurring on non steam locomotive types of vehicles.

To fault find further it would be helpful if the consists generating these errors could be identified, and the ENG files provided for inspection in the first instance.

Thanks

#8 User is offline   engmod 

  • Open Rails Developer
  • PipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 1,754
  • Joined: 26-February 08
  • Gender:Male
  • Location:Eltham, Victoria, Australia
  • Simulator:ORNYMG
  • Country:

Posted 13 October 2018 - 08:40 PM

I have a crash with 4260

Consist and eng files for all 4 crashes, in the zip.

Attached File(s)



#9 User is offline   steamer_ctn 

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

Posted 13 October 2018 - 09:21 PM

View Postengmod, on 13 October 2018 - 08:40 PM, said:

I have a crash with 4260

Consist and eng files for all 4 crashes, in the zip.
Thanks for the confirmation, and files.

A quick review of the CabCar_6951 suggests that there might be a bracket missing from the file.

Typically in the other ENG files the files looks like this (around the change from the Wagon to Engine section):
 	Radius ( 0.65 )
 	)
	)
   )
  )

 	Sound ( "../../Surfliner_Common/Sound/Surfliner_F59PHIEng2.sms" )

)

Engine ( F59PHI_460

whereas in the CabCar it looks like this:
 	Radius ( 0.05 )
 	)
	)
   )
  )
   Sound ( "../../Surfliner_Common/Sound/Surfliner_6900Eng2.sms" )

 Engine ( CabCar_6951
 


Note the missing bracket between the Sound and Engine lines. I am not sure of the impact of how OR would read all the engine parameters in this case as the file structure, is no longer a "standard" format.

As a check, can you add the extra bracket into the cab car and rerun the activity? Has this corrected the problem? EDIT: You may need to also remove one bracket from the end of the file.

If not, can you run each of the consists in Explorer mode, and advise which if any crashes OR?

Thanks

#10 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,986
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 13 October 2018 - 10:03 PM

Yes,
I think this solves the crash. Referring to the if clause in post #7, WagonType is set as Engine in this case, the engine part is not parsed and by consequence EngineType is left to steam, which is the default. Later in the ConfirmSteamLocomotiveTender() there are expressions like Train.Cars[tenderIndex] as MSTSSteamLocomotive that should lead to crash in this case (because this car is not a MSTSSTeamLocomotive for OR, even if it has steam as EngineType). Peter, besides Derek correcting the .eng file, which is not an OR issue, I think that it would be safer to replace the if clause with the following one
        if (this is MSTSSteamLocomotive)


  • 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