Thread hang exception on circle loops (case 3)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Open Rails |
Fix Released
|
Undecided
|
r.roeterdink |
Bug Description
This route http://
I got another type of thread hang exception in such route.
The loop occurs in this section of GetDistanceBetw
while (thisSectionIndex != endSectionIndex && thisSectionIndex > 0)
{
if (thisSectionIndex > 0)
}
As can be seen, if thisSectionIndex remains >0, this while can be endless if the switches are thrown in a way that a circular loop is generated. This method is indirectly called by line 3052 of signals.cs
I wonder if it is correct to use this way to compute the distance here (as we are computing distance along the train path), or if it would be more correct to add the route section lengths without looking at the state of the switches.
Attached: logfile and route. The hang was obtained by using Autopilot, but I didn't check if it was caused by the player train or by one of the AI trains (that have all the same service).
Changed in or: | |
status: | New → Fix Committed |
Changed in or: | |
assignee: | nobody → r.roeterdink (r-roeterdink) |
milestone: | none → 1.0 |
Changed in or: | |
status: | Fix Committed → Fix Released |
The hang occurs about after 5 minutes of game.