Elvas Tower: No Mass line in a WAG file - Elvas Tower

Jump to content

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

No Mass line in a WAG file Rate Topic: -----

#1 User is offline   cr-stagg 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 909
  • Joined: 16-May 05
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 01 February 2015 - 12:37 PM

I am in the process of examining all the trainset tests ConBuilder preforms and how both MSTS and ORTS react when that error condition is present. One of the tests on wagons is to check to see if the Mass line is present in the WAG file. Now one might ask “Why test for that?” Answer: “Because someone created or copied a WAG file and left the line out.”

ConBuilder:
When ConBuilder finds no Mass line in a WAG file, it generates a Startup Error Report. The Error report looks like this:
Cannot locate the line "Mass (" in the file us2freight6.wag
Folder E:\PURE MSTS\TRAINS\TRAINSET\US2FREIGHT6
Or there is a syntax error on the wagonshape line
correct this error and re-run ConBuilder!!


MSTS:
MSTS reacts to the missing Mass line with 2 error messages which are displayed before the menu is displayed. The first says “Error reading Train database line ##. The second says “Error reading Train database file …\Train\Trainset\folder\filename.wag”. These two messages are reported for each time the wagon is used in a consist. If it is used quite often, there becomes so many errors that MSTS crashes. But if there are not too many and the user clicks continue for each then MSTS eventually opens. If it is the Editor that is opening then the wagon is not in the list of available wagons for the CE to place in a consist. If it is the Sim that is opening then the Consist(s) that contains the wagon is not in the list of available consists.

ORTS:
ORTS reacts very differently. No error messages are displayed. The consist(s) which contain the wagon are listed in the list of available consists and can be selected as the Player and the Sim loads as if everything is normal. The moving to an external viewpoint, one can see that the consist is complete. Returning to the cab, releasing brakes, setting reversal to forward and applying power the consist moves. Bring up the F5 HUD and Shift F5 to the Consist Information display one will see in the Weight column that the Wagon with no Mass weighs 10.0t. So it appears that ORTS supplies a default weight of 10.0 tons when no mass is found in the wagon file. Now in the case of my test consist of a GP38 and 3 empty boxcars ( 27 tons empty) the user would not notice much difference in the handling of this consist. But if it had consisted of 25 loaded box cars (98 tons loaded) the user would notice a significant difference. Before someone asks: No, there was no error indication that the wagon had a missing Mass line. Log report is attached.

Is this a bug? Who knows? Only the person who wrote the code. BUT should not the user be at least alerted to the fact that the wagons have no Mass and a value of 10 tons is being substituted?

Attached File(s)



#2 User is offline   Matej Pacha 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 571
  • Joined: 08-December 10
  • Gender:Male
  • Location:Slovakia
  • Country:

Posted 01 February 2015 - 08:59 PM

In fact, ORTS in general is not checking if some parameter is missing. It only checks if a parameter is correct or within proper limits. If some parameter is critical, it has some default value. In case the value is not given by the eng/wag file, the default value is used.
There are other parameters using this default value mechanism, just to avoid e.g. division by zero.
I don't think it is a bug. Yes, user should be notified, but it is not causing a crash.
We are planning some data integrity check in the future. Since ORTS is still in development, it will take some time.
Matej

#3 User is offline   vince 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,314
  • Joined: 18-June 14
  • Gender:Male
  • Location:West of the Contental Divide
  • Simulator:ORTS_Running MSTS_Editing
  • Country:

Posted 01 February 2015 - 09:20 PM

Charles,

Perhaps when using Conbuilder fail message just issue a warning message 'Wagon (Engine) at \Train\Trainset\folder\filename.wag is missing the Mass parameter . . . and open a box allowing the user to enter a mass, thus correcting the error. Possibly the test/utility should make a backup \filename~wag.bk

and team: Great job on this new sim.

best
vince

#4 User is offline   captain_bazza 

  • Chairman, Board of Directors
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 13,927
  • Joined: 21-February 06
  • Gender:Male
  • Location:Way, way, way, South
  • Simulator:MSTS & OR
  • Country:

Posted 01 February 2015 - 09:55 PM

10t is more like narrow gauge.

CB.

#5 User is offline   vince 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,314
  • Joined: 18-June 14
  • Gender:Male
  • Location:West of the Contental Divide
  • Simulator:ORTS_Running MSTS_Editing
  • Country:

Posted 01 February 2015 - 10:46 PM

Capt,

Maybe the thinking for a default for the missing value was for an empty car? . . . Which seems reasonable to me.

vince

#6 User is offline   cr-stagg 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 909
  • Joined: 16-May 05
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 02 February 2015 - 07:19 AM

View Postvince, on 01 February 2015 - 09:20 PM, said:

Charles,

Perhaps when using Conbuilder fail message just issue a warning message .............
best
vince

That is the plan to update ConBuilder to remove the flag to keep file with error out of the Wagon list.

#7 User is offline   cr-stagg 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 909
  • Joined: 16-May 05
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 02 February 2015 - 07:26 AM

View Postvince, on 01 February 2015 - 10:46 PM, said:

Capt,

Maybe the thinking for a default for the missing value was for an empty car? . . . Which seems reasonable to me.

vince

I disagree Vince. My test WAG was a 50ft Box car 27 tons empty and 98 tons full. 40-50 tons would be a more reasonable default than 10 tons.

#8 User is offline   vince 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,314
  • Joined: 18-June 14
  • Gender:Male
  • Location:West of the Contental Divide
  • Simulator:ORTS_Running MSTS_Editing
  • Country:

Posted 02 February 2015 - 09:00 AM

Charles,

I agree that the empty/loaded mass is going to be different for any railcars but the on-the-fly default insertion has to be something but not to heavy or not too light and the current 10 tons default seems a reasonable middle ground.

I assume you would not want an unloaded narrow gauge flat with a missing mass line have it's default set to 27 tons!

My thinking was that the OR Team had to decide on some mass to use for a default 'plug in' in order for the consist to load in the Sim and that a 10 ton default was just that; an on-the-fly patch to allow the activity to run.

The OR default mass is not in my opinion a way to apply the correct mass, just something to allow running the sim and issue a warning message that the wagons mass needs fixing.

A message somrthing like his fully loaded hopper car was 10 tons and you (the user) should look into providing the proper mass parameter.

Something like this:

!!WARNING!! E:\PURE MSTS\TRAINS\TRAINSET\US2FREIGHT6 Missing Mass Line; Default mass 10t applied.

Re: Conbuilders 'test' it would be helpful if the test provided a way during the test for the user to insert the correct mass as I suggested earlier.

All best,

vince

#9 User is offline   cr-stagg 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 909
  • Joined: 16-May 05
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 02 February 2015 - 09:20 AM

View Postvince, on 02 February 2015 - 09:00 AM, said:

Charles,

.......
Re: Conbuilders 'test' it would be helpful if the test provided a way during the test for the user to insert the correct mass as I suggested earlier.

All best,

vince

Already there just not during test.
  • Open Conbilder
  • Select Wagon with error
  • Click on wagon icon bottom left corner
  • Dialog opens to change/enter item Name, weight and pulldowns to select front and rear Coupler Type

One of the reasons ConBuilder does not fill the screen. When Trainset loading is complete User is presented with a Warning that there were Startup Error(s) and that User can view the Report by clicking an icon on the toolbar. When he does he can move the report to the side of the screen and locate the items with errors in the lists of Engines or Wagone and then use the procedure described above or CTRL click the ENG/WAG which opens the file in his chosen Unicode editor.

Otto would post a picture here, but I think you can visualize what I am describing.

#10 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,359
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 02 February 2015 - 11:30 AM

View Postcr-stagg, on 02 February 2015 - 09:20 AM, said:

Otto would post a picture here, but I think you can visualize what I am describing.


Not quite. It would be:


Otto would post a picture here, but I think you can visualize what I am describing! :p

  • 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