Orts.Parsers.Msts.STFException at Orts.Simulation.RollingStocks.ParticleEmitterData..ctor (X4116, Empty DieselSpecialEffects section causes crash)

Bug #1770408 reported by Jonathan Dandridge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Open Rails
New
Undecided
Unassigned

Bug Description

The particular engine is MEP-Cravens105 from the UKTrainSim Mid East PLus route DVD.
This engioe is a DMU and is set up as a driving trailer (unpowered)
Therefore there is a DieselSpecialEfects section but the section contains no Exhaust blocks.
Unfotunately I do not have an MSTS installation anymore, but I suspect this is handled nby MSTS.

However when loading an activity using Open Rails it crashes:
Error: System.IO.FileLoadException: C:\Miniroutes\mep1.0-MiniRoute\Train Simulator\trains\trainset\MEP-Cravens105\MEP-Cravens105.eng ---> Orts.Parsers.Msts.STFException: "(" not found - instead found ")" in C:\Miniroutes\mep1.0-MiniRoute\Train Simulator\trains\trainset\MEP-Cravens105\MEP-Cravens105.eng:line 241

For testing purposes I commented out the exhaust blocks

  Effects (
    DieselSpecialEffects (
      comment (
        the format of these little blocks is as follow:

        offset.x offset.y offset.z
        normal.x normal.y normal.z
        width in metres

        defining the offset from the shape pivot point
        where steam / smoke should appear, the direction
        it should go and the width of the nozzle

      Exhaust1 (
        0.60 3.90914 -9.0
        0.2 0.3 0
        0.1
      )
      Exhaust2 (
       -0.60 3.90914 -9.0
        0.2 0.3 0
        0.1
      )
      )
    )

If I uncomment the exhaust blocks it works perfectly. Of course being a trailer unit it should really have no exhaust. I haven't figured out a way to disable it - perhaps reducing the smoke level to near zero?

The activity is Cambridge to Ely in the MEP route.
I have attached the log file.

Revision history for this message
Jonathan Dandridge (jonpd47) wrote :
Revision history for this message
Carlo Santucci (carlosanit1) wrote :

Remove the comment lines and you won't have the crash.

Revision history for this message
Jonathan Dandridge (jonpd47) wrote : Re: [Bug 1770408] Re: Empty DieselSpecialEffects section causes crash

I think you missed the point. Originally the file as received has just
the DieselSpecialEffects section with the usual comment about the format
of the blocks which seems to be in every eng file. In that form it crashed.

I added the blocks

Exhaust1 (
           0.60 3.90914 -9.0
           0.2 0.3 0
           0.1
         )
         Exhaust2 (
          -0.60 3.90914 -9.0
           0.2 0.3 0
           0.1
         )

and everything worked fine.

If I comment out the blocks then it crashes.

Either way an empty DieselSpecialEffects section with just comments in
it and no blocks crashes.

Apparently this worked in MSTS (I have no MSTS to verify this on). I
assume people did this as a way to have a driving trailer that did not
emit exhaust.

In OR it looks like it has to have blocks in there.

I suppose I could try taking out the DieselSpecialEffectssection
completely. I haven't tried that.

On 5/11/2018 3:42 PM, Carlo Santucci wrote:
> Remove the comment lines and you won't have the crash.
>

Revision history for this message
Carlo Santucci (carlosanit1) wrote : Re: Empty DieselSpecialEffects section causes crash

Sorry, I wasn't inexact. You are right. As your engine (which in reality is a wagon) has no diesel special effects, you can completely remove the DieselSpecialEffects block. This way you avoid the crash.

Revision history for this message
Jonathan Dandridge (jonpd47) wrote : Re: [Bug 1770408] Re: Empty DieselSpecialEffects section causes crash

Yes that should resolve it.

I was wondering though, given that MEP is a fairly popular UK route,
anyone trying to run this route as is is going to encounter this problem
and not everyone is up to modifying eng files, and there are several of
them with this issue in the stock included with the route, including all
the AI versions etc.

So either the original creators of the stock have to issue revised eng
files, or could OR be modified to accept an empty special effects section?

On 5/13/2018 2:33 AM, Carlo Santucci wrote:
> Sorry, I wasn't inexact. You are right. As your engine (which in reality
> is a wagon) has no diesel special effects, you can completely remove the
> DieselSpecialEffects block. This way you avoid the crash.
>

James Ross (twpol)
summary: - Empty DieselSpecialEffects section causes crash
+ Orts.Parsers.Msts.STFException (Empty DieselSpecialEffects section
+ causes crash)
summary: - Orts.Parsers.Msts.STFException (Empty DieselSpecialEffects section
- causes crash)
+ Orts.Parsers.Msts.STFException at
+ Orts.Simulation.RollingStocks.ParticleEmitterData..ctor (Empty
+ DieselSpecialEffects section causes crash)
summary: Orts.Parsers.Msts.STFException at
- Orts.Simulation.RollingStocks.ParticleEmitterData..ctor (Empty
+ Orts.Simulation.RollingStocks.ParticleEmitterData..ctor (X4116, Empty
DieselSpecialEffects section causes crash)
James Ross (twpol)
tags: added: content crash physics
removed: dmu engfile
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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