OpenRails error, suddenly not working due to divide by zero?!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • VishalVV
    New Member
    • May 2021
    • 4

    #1

    OpenRails error, suddenly not working due to divide by zero?!

    The error part -
    Code:
    Error: System.DivideByZeroException: Attempted to divide by zero.
       at Orts.Viewer3D.RoadCar..ctor(Viewer viewer, RoadCarSpawner spawner, Single averageSpeed, Int32 carSpawnerListIdx) in C:\Jenkins\jobs\Open Rails Stable\workspace\Source\RunActivity\Viewer3D\RoadCars.cs:line 226
       at Orts.Viewer3D.RoadCarSpawner.Update(ElapsedTime elapsedTime) in C:\Jenkins\jobs\Open Rails Stable\workspace\Source\RunActivity\Viewer3D\RoadCars.cs:line 102
       at Orts.Viewer3D.WorldFile.Update(ElapsedTime elapsedTime) in C:\Jenkins\jobs\Open Rails Stable\workspace\Source\RunActivity\Viewer3D\Scenery.cs:line 629
       at Orts.Viewer3D.SceneryDrawer.Update(ElapsedTime elapsedTime) in C:\Jenkins\jobs\Open Rails Stable\workspace\Source\RunActivity\Viewer3D\Scenery.cs:line 194
       at Orts.Viewer3D.World.Update(ElapsedTime elapsedTime) in C:\Jenkins\jobs\Open Rails Stable\workspace\Source\RunActivity\Viewer3D\World.cs:line 170
       at Orts.Viewer3D.Viewer.Update(RenderFrame frame, Single elapsedRealTime) in C:\Jenkins\jobs\Open Rails Stable\workspace\Source\RunActivity\Viewer3D\Viewer.cs:line 835
       at Orts.Viewer3D.Processes.GameStateViewer3D.Update(RenderFrame frame, Double totalRealSeconds) in C:\Jenkins\jobs\Open Rails Stable\workspace\Source\RunActivity\Viewer3D\Processes\GameStateViewer3D.cs:line 122
       at Orts.Viewer3D.Processes.UpdaterProcess.Update() in C:\Jenkins\jobs\Open Rails Stable\workspace\Source\RunActivity\Viewer3D\Processes\UpdaterProcess.cs:line 128
       at Orts.Viewer3D.Processes.UpdaterProcess.DoUpdate() in C:\Jenkins\jobs\Open Rails Stable\workspace\Source\RunActivity\Viewer3D\Processes\UpdaterProcess.cs:line 108
       at Orts.Viewer3D.Processes.UpdaterProcess.UpdaterThread() in C:\Jenkins\jobs\Open Rails Stable\workspace\Source\RunActivity\Viewer3D\Processes\UpdaterProcess.cs:line 74
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
    Kindly help me, and if you do need the whole testing log, let me know in the thread. I want to test it out so bad (took some time to download ) so am asking for help here pls help
  • crstagg
    4500 Post Veteran


    • Nov 1999
    • 4885
    • Huntsville, AL
    • Texan
    • MSOR

    #2
    Originally posted by VishalVV
    The error part - [CODE]Error: System.DivideByZeroException: Attempted to divide by zero.
    .......
    Kindly help me, and if you do need the whole testing log, let me know in the thread. I want to test it out so bad (took some time to download ) so am asking for help here pls help

    Can't help without the log file. If large, zip before uploading.
    Charles

    Comment

    • ZachBell4400
      Senior Member


      • Jul 2017
      • 480
      • Little Falls, MN
      • American English
      • ORTS

      #3
      Happened to me before

      Carspawner issue. Try deleting the carspawners and interactives and reinserting interactives before you re-add the carspawner on the roads at crossings. Some interactives might be hung (such as trackside signals or xing signals)

      Comment

      • ZachBell4400
        Senior Member


        • Jul 2017
        • 480
        • Little Falls, MN
        • American English
        • ORTS

        #4
        Also, to add, if this is a custom route you built, try to delete the carspawners first, that way you don't corrupt the RDB

        Comment

        • VishalVV
          New Member
          • May 2021
          • 4

          #5
          Hi, thanks for the help. I have attached the ghostbin of my code as I am unable to figure out how to add in the file here - https://ghostbin.com/023Mw/trainsimviewer
          Hope this helps @crstagg
          Also, to add, if this is a custom route you built, try to delete the carspawners first, that way you don't corrupt the RDB
          No @ZachBell4400, not my route. It's the Western Railway v7 route from India, and how to delete the carspawners as you mentioned? Would try that in this route to see for any changes.

          Comment

          • derekmorton
            5500 Post Veteran



            • Nov 1999
            • 5699
            • Eltham, Victoria, Australia.
            • ORTS

            #6
            To attach a file:-

            reply,
            go advanced,

            Attachments at the bottom of the page.

            Comment

            • VishalVV
              New Member
              • May 2021
              • 4

              #7
              I have now attached the ZIP file, kindly help out with this issue - TestingLogWRv7.zip

              Thanks.

              Comment

              • VishalVV
                New Member
                • May 2021
                • 4

                #8
                Western Railways v7 Indian Route is linked.

                Hope this brings a bit more clarity.

                Comment

                Working...