News:

Want to praise Simutrans?
Your feedback is important for us ;D.

The departure board ignores certain convoys

Started by Ranran, June 19, 2021, 08:52:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran

The departure board is broken and keeps ignoring certain convoys.  ::-\

Confirmation procedure:

(1) Open the demo.sve
(2) Open the halt info dialog of Christminster Central railway station to check the departure board.
(3) Check Line "Train Commuter Christminster".
  Two convoys (43) and (97)  LNER Tyneside EMU belong to it that departs and arrives at Christminster Central railway station.
  However, they are never displayed on the departure board and are ignored.

Watch those convoys. When they approach the station, it must be at the top of the arrival list.
And when they arrive at the station, it must be at the top of the departure list.
Therefore we cannot trust the departure board... (´・ω・`)

Ranran

I have identified the cause.

const uint32 max_listings = 12;
uint32 listing_count = 0;

FOR(arrival_times_map, const& iter, arrival_times)
{
if(listing_count++ > max_listings)
{
break;
}

If the number of convoys exceeds max_listings, the 13th and subsequent convoys will be ignored regardless of arrival or departure order to exit the search loop.
This seems to be a bug that has been around for 7 years.
I have now resumed work on halt_info to support the auto-aligned GUI, and I plan to fix this in that work.

freddyhayward

Is there any reason for max_listings to be so low?