Results 1 to 8 of 8

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

  1. #1

    Post 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

  2. #2
    Join Date
    Nov 1999
    Location
    Huntsville, AL
    Posts
    4,839

    Default

    Quote Originally Posted by VishalVV View Post
    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

  3. #3
    Join Date
    Jul 2017
    Location
    Little Falls, MN
    Posts
    237

    Default

    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)

  4. #4
    Join Date
    Jul 2017
    Location
    Little Falls, MN
    Posts
    237

    Default

    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

  5. #5

    Default

    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.

  6. #6
    Join Date
    Nov 1999
    Location
    Eltham, Victoria, Australia.
    Posts
    7,181

    Default

    To attach a file:-

    reply,
    go advanced,

    Attachments at the bottom of the page.
    Cheers
    Derek

  7. #7

    Default

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

    Thanks.

  8. #8

    Default

    Western Railways v7 Indian Route is linked.

    Hope this brings a bit more clarity.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •