openrails / test-launchpad-bugs

TEST repository for Launchpad bug migration exploration
0 stars 0 forks source link

[BUG 1636010] System.OverflowException at Orts.Simulation.Physics.Train.UpdateSectionState (1.1.1.3487, sob, Zug 23461) #1794

Open twpol opened 8 years ago

twpol commented 8 years ago

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

Property Value
Reported by Martin Chovanec (chovanecm)
Date reported Sun, 23 Oct 2016 20:19:28 GMT
Tags crash, physics

I'm having some problems both with stable and latest version of OpenRails.

The game crashes when something related to AI trains happens (in activity).

    public void UpdateSectionState(int backward)
    {

        List<int[]> sectionList = new List<int[]>();

        int lastIndex = PreviousPosition[0].RouteListIndex;
        int presentIndex = PresentPosition[0].RouteListIndex;

        int lastDTM = Convert.ToInt32(PreviousPosition[0].DistanceTravelledM);
        TrackCircuitSection lastSection = signalRef.TrackCircuitList[PreviousPosition[0].TCSectionIndex];
        int lastDTatEndLastSectionM = lastDTM + Convert.ToInt32(lastSection.Length - PreviousPosition[0].TCOffset);

        int presentDTM = Convert.ToInt32(DistanceTravelledM); <<<<<<<<<<<< Exception

Logfile is included.

By the way, I wanted to debug the game and followed instructions here http://openrails.org/contribute/developing-code/

Visual C# 2010, 2012, 2013 - any edition, including the Express Edition, which is free XNA Game Studio 3.1

so I downloaded VC#2010 and XNA Game Studio 3.1, but it fails to install due to missing dependency (VC# 2008).

twpol commented 8 years ago

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

Property Value
Posted by Martin Chovanec (chovanecm)
Date posted Sun, 23 Oct 2016 20:19:28 GMT
twpol commented 8 years ago

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

Property Value
Posted by Carlo Santucci (carlosanit1)
Date posted Wed, 26 Oct 2016 12:19:06 GMT

Please try with an up to date version of Open Rails and attach here the log file if you still get the error. Pls. also uncheck experimental option "Show shape warnings".

twpol commented 8 years ago

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

Property Value
Posted by Martin Chovanec (chovanecm)
Date posted Thu, 27 Oct 2016 19:40:26 GMT

Unfortunately, the problem still persists even in today's build. (see the log) And the shape warnings checkbox is unchecked, but I think the warnings are still present in the log, sorry for that.