F/A .s file won't load in OR

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • apco25
    1500 Post Veteran
    • Jan 2008
    • 1827
    • Home is the Chicago suburbs

    #1

    F/A .s file won't load in OR

    Trying to decypher the actual problem here. OR doens't like this F/A shapefile, reports the following error message and won't display. Bad .s file coding?

    Information: e:\msts\train sim\train simulator\trains\trainset\csx_sd40-3_4000\parts.s

    Error: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
    at System.Collections.ArrayList.get_Item(Int32 index)
    at MSTS.shader_names.get_Item(Int32 i)
    at ORTS.SharedShape.SubObject..ctor(Viewer3D viewer, String filePath, TextureFlags textureFlags, SFile sFile, sub_object sub_object, Int32[] hierarchy, Int32& dLevelPrimCount)
    at ORTS.SharedShape.DistanceLevel..ctor(Viewer3D viewer, String filePath, TextureFlags textureFlags, SFile sFile, distance_level MSTSdistance_level)
    at ORTS.SharedShape.LodControl..ctor(Viewer3D viewer, String filePath, TextureFlags textureFlags, SFile sFile, lod_control MSTSlod_control)
    at ORTS.SharedShape.LoadContent(String filePath)
    at ORTS.SharedShape..ctor(Viewer3D viewer, String filePath)
    at ORTS.SharedShapeManager.Get(Viewer3D viewer, String path)
    at ORTS.ORTraceListener.TraceEventInternal(TraceEvent Cache eventCache, String source, TraceEventType eventType, Int32 id, String format, Object[] args)
    at ORTS.ORTraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String format, Object[] args)
    at System.Diagnostics.TraceInternal.TraceEvent(TraceE ventType eventType, Int32 id, String format, Object[] args)
    at System.Diagnostics.Trace.TraceError(String format, Object[] args)
    at ORTS.ORTraceListener.WriteLine(Object o)
    at System.Diagnostics.TraceInternal.WriteLine(Object value)
    at System.Diagnostics.Trace.WriteLine(Object value)
    at ORTS.SharedShapeManager.Get(Viewer3D viewer, String path)
    at ORTS.StaticShape..ctor(Viewer3D viewer, String path, WorldPosition position, ShapeFlags flags)
    at ORTS.PoseableShape..ctor(Viewer3D viewer, String path, WorldPosition initialPosition, ShapeFlags flags)
    at ORTS.AnimatedShape..ctor(Viewer3D viewer, String path, WorldPosition initialPosition, ShapeFlags flags)
    at ORTS.MSTSWagonViewer..ctor(Viewer3D viewer, MSTSWagon car)
    at ORTS.MSTSLocomotiveViewer..ctor(Viewer3D viewer, MSTSLocomotive car)
    at ORTS.MSTSDieselLocomotiveViewer..ctor(Viewer3D viewer, MSTSDieselLocomotive car)
    at ORTS.MSTSDieselLocomotive.GetViewer(Viewer3D viewer)
    at ORTS.TrainDrawer.GetViewer(TrainCar car)
    at ORTS.Viewer3D.GetPlayerLocomotiveViewer()
    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(UserSettings settings, String[] args)
    at ORTS.Program.Main(String[] args
    sigpicJust say NO to Fictional Railroad Foaming...
  • GoGoran
    Senior Member
    • Jun 2010
    • 880

    #2
    Originally posted by apco25
    Trying to decypher the actual problem here. OR doens't like this F/A shapefile, reports the following error message and won't display. Bad .s file coding?
    Without decyphering the error message, some things to check:

    - Are you sure it is the FA which causes the error message in OR ?

    - Does the FA work and display correctly in ShapeViewer ?

    - has the *.s file of the FA been compressed, or is it uncompressed ? You should always compress shape files for use in the sims, that prevents some errors and saves memory.

    - does the FA work and display correctly in OR, when you set it up as the main shape of a locomotive or wagon (yes, you can do that, no bogies or wheels are required) ?
    sigpic

    Comment

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

      #3
      Originally posted by apco25
      Trying to decypher the actual problem here. OR doens't like this F/A shapefile, reports the following error message and won't display. Bad .s file coding?

      Information: e:\msts\train sim\train simulator\trains\trainset\csx_sd40-3_4000\parts.s

      Error: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
      Parameter name: index
      at System.Collections.ArrayList.get_Item(Int32 index)
      at MSTS.shader_names.get_Item(Int32 i)
      at ORTS.SharedShape.SubObject..ctor(Viewer3D viewer, String filePath, TextureFlags textureFlags, SFile sFile, sub_object sub_object, Int32[] hierarchy, Int32& dLevelPrimCount)
      A cryptic error to be sure, but I believe this is caused by the shape having an unexpected or incorrect list of shader names. Each shape file has a list of shader names it uses, then references them all by number in the actual data - in this case, the number is outside of the bounds of the list.

      Can we publically get this shape file? It'd be good to check whether this is actually invalid shape data (which OR can then report an error on instead of crashing) or a problem with OR's interpretation of the shape data.
      James Ross
      Open Rails Management Team
      sigpic

      Comment

      • apco25
        1500 Post Veteran
        • Jan 2008
        • 1827
        • Home is the Chicago suburbs

        #4
        I'm sure this is the shapefile causing this error.
        Yes it is compressed.
        Yes it displays properly in shapeviewer.

        The shapefile in question is here in the F/L part of the CSX SD40-3 rebuilds. https://www.trainsim.com/vbts/tslib....ight&fid=27944
        sigpicJust say NO to Fictional Railroad Foaming...

        Comment

        Working...