What file call is creating this error?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • steamer_ctn
    Member
    • May 2010
    • 87

    #1

    What file call is creating this error?

    I am excited about the possibilities that OR is opening up. I have started to experiment to determine how to reduce the reliance, as much as possible on MSTS.

    As part of my experimentation I have encountered the following error. It results because I have removed the Global Sound folder (on purpose).

    I am trying to identify the file in my test route that is calling the "gen_urb1.wav" file. Is there a way to identify the calling file? Or is the call hard coded into OR?

    I have checked (well I think I have) all the sms files in the route and cannot find any calls from them for the "gen_urb1.wav" file.

    runactivity.exe : Error : 0 : System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Open Rails Train Simulator\SOUND\gen_urb1.wav'.
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
    at ORTS.WAVIrrKlangFileFactory.EnsureStream(String FileName)
    at ORTS.WAVFileStream..ctor(String filename)
    at ORTS.WAVIrrKlangFileFactory.openFile(String filename)
    at IrrKlang.FileFactoryForwarder.createFileReader(Fil eFactoryForwarder* , SByte* filename)
    at IrrKlang.ISoundEngine.Play2D(String soundFilename, Boolean playLooped, Boolean startPaused, StreamMode streamMode, Boolean enableSoundEffects)
    at IrrKlang.ISoundEngine.Play2D(String soundFilename, Boolean playLooped)
    at ORTS.Viewer3D.Initialize(RenderProcess renderProcess)
    at ORTS.RenderProcess.Initialize()
    at Microsoft.Xna.Framework.Game.Run()
    at ORTS.Viewer3D.Run()
    at ORTS.Program.<>c__DisplayClass8.<Start>b__7()
    at ORTS.Program.Start(IEnumerable`1 options, String[] args)

    Thanks
    Last edited by steamer_ctn; 04-03-2011, 04:31.
  • kraus
    1000 Post Veteran

    • Jan 2001
    • 1086
    • Madison, Wisconsin
    • General

    #2
    For a route, most sound (.wav) files are called from sound management system (.sms) files which are called from world sound (.ws) files. An example from a route that has this sound file, gen_urb1.wav, is the Lehigh and Hudson River route.

    File city_l_m.sms has

    StartLoop ( 1 File ( "gen_urb1.wav" -1 )

    The sound file can be in either the route sound folder or the global sound folder.

    File w-010991+014389.ws has

    FileName ( city_l_m.sms )

    See post https://www.trainsim.com/vbts/showthread.php?274838 for a list of sound sources.

    Comment

    • steamer_ctn
      Member
      • May 2010
      • 87

      #3
      Hi Jeffrey,

      Thank you for the reply.

      I have a "fair" understanding of sounds files as you describe them.

      My issue is that I can't find, and have not intentionally put an sms in the route, to call the "gen_urb1.wav". I have check all the ws files to confirm.

      I was hoping that the error report might give me an indication as to were to look.

      So I am mystified as to what is call this file, though I will dig a bit deeper.

      Thanks

      Peter

      Comment

      • OTTODAD
        1
        • Feb 2001
        • 32344
        • England
        • General

        #4
        Why does ORTS look for this file in:

        runactivity.exe : Error : 0 : System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Open Rails Train Simulator\SOUND\gen_urb1.wav'.

        I do not have such a folder anywhere on my computer. Is this a temporary folder ORTS has created ?

        O t t o

        Comment

        • twpol
          Senior Member
          • Oct 2009
          • 434
          • United Kingdom

          #5
          Originally posted by steamer_ctn
          I am trying to identify the file in my test route that is calling the "gen_urb1.wav" file. Is there a way to identify the calling file? Or is the call hard coded into OR?
          It is hard-coded in to OR but I have absolutely no idea why. What I do know is that you can create an empty (0 bytes) file in its place and OR will load.
          James Ross
          Open Rails Management Team
          sigpic

          Comment

          • kraus
            1000 Post Veteran

            • Jan 2001
            • 1086
            • Madison, Wisconsin
            • General

            #6
            In file Viewer3D.cs is the following code that calls for the sound file.

            if (Settings.SoundDetailLevel > 0)
            {
            ISound ambientSound = SoundEngine.Play2D(Simulator.BasePath + @"\SOUND\gen_urb1.wav", true); // TODO temp code
            if (ambientSound != null)
            ambientSound.Volume = 0.2f;
            }

            Removing this section of code did not result in any noted adverse affects and I was able to run an activity and hear sound.
            Last edited by kraus; 04-03-2011, 07:49.

            Comment

            • steamer_ctn
              Member
              • May 2010
              • 87

              #7
              James,

              Thanks for the confirmation of my suspicions.

              Based on your and Jeffrey's feedback is it possible in the next version to disable the call, or alternatively make it a warning message rather then a condition to stop loading OR?

              Thanks

              Peter

              Comment

              • twpol
                Senior Member
                • Oct 2009
                • 434
                • United Kingdom

                #8
                Originally posted by steamer_ctn
                Based on your and Jeffrey's feedback is it possible in the next version to disable the call, or alternatively make it a warning message rather then a condition to stop loading OR?
                If we can confirm (amongst the team) that it serves no useful purpose, we'll simply remove it. If not, it will be made conditional on the file existing.
                James Ross
                Open Rails Management Team
                sigpic

                Comment

                Working...