Looky1173 / launchpad-bugs-migration2

0 stars 0 forks source link

[BUG n°1770408] Orts.Parsers.Msts.STFException at Orts.Simulation.RollingStocks.ParticleEmitterData..ctor (X4116, Empty DieselSpecialEffects section causes crash) #2020

Open Looky1173 opened 6 years ago

Looky1173 commented 6 years ago

Imported from https://bugs.launchpad.net/bugs/1770408

Property Value
Reported by Jonathan Dandridge (jonpd47)
Date reported Thu, 10 May 2018 13:27:38 GMT
Tags content, crash, physics

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.

Looky1173 commented 6 years ago

Imported from https://bugs.launchpad.net/or/+bug/1770408/comments/1

Property Value
Posted by Jonathan Dandridge (jonpd47)
Date posted Thu, 10 May 2018 13:27:38 GMT
Looky1173 commented 6 years ago

Imported from https://bugs.launchpad.net/or/+bug/1770408/comments/2

Property Value
Posted by Carlo Santucci (carlosanit1)
Date posted Fri, 11 May 2018 19:42:04 GMT

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

Looky1173 commented 6 years ago

Imported from https://bugs.launchpad.net/or/+bug/1770408/comments/3

Property Value
Posted by Jonathan Dandridge (jonpd47)
Date posted Fri, 11 May 2018 20:18:42 GMT

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.

Looky1173 commented 6 years ago

Imported from https://bugs.launchpad.net/or/+bug/1770408/comments/4

Property Value
Posted by Carlo Santucci (carlosanit1)
Date posted Sun, 13 May 2018 06:33:17 GMT

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.

Looky1173 commented 6 years ago

Imported from https://bugs.launchpad.net/or/+bug/1770408/comments/5

Property Value
Posted by Jonathan Dandridge (jonpd47)
Date posted Sun, 13 May 2018 10:41:16 GMT

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.