STFReader performance: ORTS skips exterior sounds after reading comment in Lights section

Bug #1274713 reported by Sid Penstone
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Open Rails
Fix Released
Low
jeroenp

Bug Description

Version X1966 (and earlier). Also reproducible in default and other .eng files.
This was first noticed in the Paul Charland set of 10 locomotives "cpsw10pk.zip" from Trainsim. There was no ORTS exterior sound in any of these locos; the cab sound worked fine. MSTS behaved normally.
By trial, it was discovered that if the exterior sound line in the .eng file: Sound ( "SW1200eng.sms" ) was moved to a location above the Lights() section, the exterior sounds worked normally.
It was then noticed that there was a comment line immediately preceding the line containing the closing right bracket of the Lights() section of the .eng file: e.g.

#(++++++++++++++++++++++++ End of light section +++++++++++++++++++++++++++++)
    )
Sound ( "SW1200eng.sms" )
)
(The last right bracket above is the closing of the Wagon() section.)

If this comment line immediately preceding the end of the Lights() section is removed, the exterior sound works normally, even when the sound line follows the Lights() section. I believe that this location is used for the exterior sound line in many .eng files.

As a further confirmation, the default GP38.eng file was modified by inserting a comment on the line ahead of the closing right bracket of the Lights () section. The sound line ' Sound ( "GP38Eng.sms" ) ' follows the Lights() section. The result was that the GP38 also lost all exterior sounds (i.e. 2-view and 3-view).

In all cases, MSTS works normally - i.e. it correctly produces exterior sounds, with or without the extra comment line. There was a discussion about allowable comment lines here:
http://www.trainsim.com/vbts/showthread.php?278838-Why-are-some-comments-ok-and-others-not&highlight=comments

Tags: tests
Revision history for this message
Sid Penstone (penstone) wrote :

P.S. The line "#(+++++++++++++++ End of light section +++++++ etc. )" ends on a single line in the file.

James Ross (twpol)
Changed in or:
status: New → Triaged
importance: Undecided → Low
tags: added: tests
Peter Gulyas (pzgulyas)
summary: - ORTS skips exterior sounds after reading comment in Lights section
+ STFReader performance: ORTS skips exterior sounds after reading comment
+ in Lights section
Revision history for this message
jeroenp (j-paasschens) wrote :

Dear all.
I added a fix (2044). Can someone please confirm it is solved for them as well?
Thanks

Changed in or:
assignee: nobody → jeroenp (j-paasschens)
Revision history for this message
jeroenp (j-paasschens) wrote :

Sorry, I mentioned the wrong version. It should be fixed in 2316

Revision history for this message
Sid Penstone (penstone) wrote :

Hi- I just ran X2318, and my test cases work fine.
Thanks
Sid.

jeroenp (j-paasschens)
Changed in or:
status: Triaged → Fix Committed
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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