Closed arbulgazar closed 1 year ago
Adding a save file with a minimalistic example, but this problem is consistent across all games. timetable_bug_save.zip
Update - the problem seems to be with Linux build specifically. Checked on Windows - works as intended. Moreover, this is probably nothing to do with timetables and more with shared orders. When you change the waiting times on one vehicle with shared orders - it's not updated on other vehicles. I thought that's the expected behaviour, but on Windows it is changing. So I guess the problem is with shared orders in general.
I can confirm this bug on Linux. I didn't test on Windows though. How can this sort of bug be platform-specific ? Any progress ?
Although I know too little about timetables to work on the essence of this bug, I did check if I could spot any difference in behaviour between Linux and Windows: I cannot. The way OpenTTD is build up, this is also not likely, which was why I was looking into that part specifically (as this would also cause multiplayer desyncs, in most cases).
Would you be able to test this again with 1.10.3 on both Linux and Windows, and let us know what exactly the difference is that you notice between the two?
For the bug itself, I leave that to someone who understands timetables, which might not be a lot of people, in all honesty. I just wanted to make sure this was not a desync-capable bug :)
Tnx!
Here I am running OpenTTD 1.10.3, on Linux (package from the Fedora distribution). I don't have right away a Windows VM to test and compare. What I'm saying on OpenTTD 1.10.3 in Linux is that Ctrl+click on the Start date doesn't do what the various tutorials say it should do: recalculate start dates for each vehicles sharing the same orders so that they are spread evenly on their route.
@tpetazzoni : I was not debating the bug yes or not :) I was asking @arbulgazar if he could retest with 1.10.3, as I am unable to reproduce any difference between the OSes.
In the meantime I got curious how timetables worked exactly, and what the behaviour should be. While doing so I found out that the steps listed above, when followed exactly, work fine for me. Including the ctrl+click
on both Windows and Linux on "Start date". Took me a while to figure out which button to ctrl+click
, but okay .. the UI likes to hide stuff, that's for sure.
From the above savegame, when stopping all vehicles, I have this in the timetables:
ctrl+click
"Start date", set to month in future:
On Linux and Windows, both 1.10.3 as latest nightly.
So that brings me to a question for you @tpetazzoni : as this works for me, I need some more information to debug your case. If I ctrl+click
on Start date, and put the date a month in the future, all shared vehicles get a new start date. If this is not working for you, is ctrl
working at all for you? So for example if you clone a vehicle by clicking clone vehicle
and holding ctrl
over another vehicle, does that create a shared order (instead of a copy of the order)?
Ctrl+Click definitely works for shared orders. I just built OpenTTD from Git, and added some debug messages in the Timetable code, and I definitely see _ctrl_clicked being true, and the window ID passed around having bit 20 set. And from my quick testing tonight, it seems like the start dates are indeed set on all vehicles sharing the order, so it seems like I'm not able to reproduce the bug with the OpenTTD I've built myself. I need to take a bit more to compare with the OpenTTD from Fedora, to see if there's really a behavior difference. I'll follow up later.
In the code the exact condition to set the timetable start date for all the vehicles with the same shared orders when the set start date button is pressed is v->orders->IsCompleteTimetable() && _ctrl_pressed
, which means that if some orders are not explicitly timetabled, Ctrl+Click silently falls back to setting the timetable start date of a single vehicle, with no user feedback.
This is explained in the relevant tooltip ("Ctrl+Click distributes all vehicles sharing this order evenly from the given date based on their relative order, if the order is completely timetabled"), but I still find it a bit counter-intuitive, and I suspect this is the root of this issue.
Superseded by #10289 - thanks to @nchappe for triaging!
Automatic spacing introduced since version 1.4.0 is not working and
ctrl-Start Date
clicking does not result in start date being offset for the vehicles sharing the same order.Version of OpenTTD
openttd-1.10.0-linux-ubuntu-bionic-amd64.deb
Expected result
The start date of each vehicle is increased by the "gap number" so that each vehicle starts the same number of days after the last.
Actual result
Only the first vehicle in the list (the one that "Start Date" was applied to) gets the start date. No other vehicles in the shared order get the start date. Vehicles end up in a usual catarpillar-style stacking after any amount of time.
Steps to reproduce
From wiki (see last section):