Elvas Tower: FPM Pacific Surfliner problem - Elvas Tower

Jump to content

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

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

#1 User is online   engmod 

  • Open Rails Developer
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 2,164
  • 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 online   engmod 

  • Open Rails Developer
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 2,164
  • 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 online   engmod 

  • Open Rails Developer
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 2,164
  • 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: Posts: Elite Member
  • Posts: 3,192
  • 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 online   engmod 

  • Open Rails Developer
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 2,164
  • 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: Posts: Elite Member
  • Posts: 7,450
  • 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: Posts: Elite Member
  • Posts: 1,980
  • 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 online   engmod 

  • Open Rails Developer
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 2,164
  • 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: Posts: Elite Member
  • Posts: 1,980
  • 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: Posts: Elite Member
  • Posts: 7,450
  • 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)


#11 User is offline   steamer_ctn 

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

Posted 13 October 2018 - 10:24 PM

View PostCsantucci, on 13 October 2018 - 10:03 PM, said:

the engine part is not parsed and by consequence EngineType is left to steam, which is the default.
I suspected that this might be the case.

View PostCsantucci, on 13 October 2018 - 10:03 PM, said:

I think that it would be safer to replace the if clause with the following one
        if (this is MSTSSteamLocomotive)


I am happy to do this, and will add it.

I will also change a few other similar occurrences. However there are other locations where EngineType is also used as a test (and can't be easily adapted), so since the ENG file will not be correctly parsed, other problems with performance will be created. In this instance as it appears to be a dummy cab file the performance issues may not have been noticeable even if it loaded successfully.

I am wondering whether we could create an error checking message to appear in the log to advise a user that there is a potential problem with the file. For example all ENG files should have at least one engine parameter parsed successfully. Perhaps the Type parameter could be used as the test. So say, if no Type parameter is defined for an ENG file then a warning message is added to the log.

Can you think of an easy or better way to do this?

Thanks

#12 User is online   engmod 

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

Posted 13 October 2018 - 10:45 PM

Ok,

6951 had an extra brace in the second section and was missing one in the first section.

Corrected, the activity has just crashed, I will include all the files.

Attached File(s)



#13 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,450
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 13 October 2018 - 10:48 PM

Hi Peter,
yes, having such a check could be a good idea. A further thing I had in mind is this: you see that WagonType has as default "Unknown". I'd insert also for EngineType an "Unknown" default value. So if after parsing of a wagon or engine file EngineType is at "Unknown" and WagonType is at "Engine", WagonType could be reverted to "Unknown". However I wouldn't dare to do this before 1.3, while the replacement suggested in my above post could be done now.

#14 User is offline   steamer_ctn 

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

Posted 13 October 2018 - 10:57 PM

View Postengmod, on 13 October 2018 - 10:45 PM, said:

Corrected, the activity has just crashed, I will include all the files.
Did the activity run for a longer period?

Does the consist run in Explorer mode?

#15 User is offline   steamer_ctn 

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

Posted 13 October 2018 - 11:16 PM

View PostCsantucci, on 13 October 2018 - 10:48 PM, said:

yes, having such a check could be a good idea.
Given the state of some ENG/WAG files, I think as many error checks as possible would be good to help people to identify problem files.


View PostCsantucci, on 13 October 2018 - 10:48 PM, said:

WagonType could be reverted to "Unknown"

How would this then change OR operation?

Thanks

  • 2 Pages +
  • 1
  • 2
  • 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