FS#177 - Bug when loading transferred cargo

Attached to Project: OpenTTD
Opened by Tekky (Tekky) - Wednesday, 17 May 2006, 23:43 GMT
Last edited by Celestar (Celestar) - Friday, 19 May 2006, 13:47 GMT
Type Bug
Category Core
Status Closed
Assigned To Celestar (Celestar)
Operating System Windows
Severity Medium
Priority Normal
Reported Version 0.4.7
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


In the attached screenshot and savegame, I pick up passengers in Smallville and drop them off ("transfer and leavy empty") in Marctown, so the trains arriving in Marctown can also transport the passengers from Smallville. This works fine if the bus drops the passengers from Smallville in Marctown while there is no train waiting in the station.

However, if a train is already waiting in the station (the trains are set to "Load"), it will still load the passengers from the bus from Smallville, but a split second later the train delivers these passengers from Smallville to the station of Marctown, altough the train is set to "Load". Therefore, the train doesn't transport these passengers from Smallville and I am only paid for the short bus trip from Smallville to Marctown.

I have reproduced this bug in Version 0.4.7 and in the latest nightly build.
   loadbug.png (214.1 KiB)
This task depends upon

Closed by  Darkvater (Darkvater)
Thursday, 02 November 2006, 15:49 GMT
Reason for closing:  Duplicate
Additional comments about closing:  251, please continue there
Comment by Tekky (Tekky) - Wednesday, 17 May 2006, 23:55 GMT
This bug report is probably related to bug report  FS#140 , although the described symptoms are not quite the same.

@admins: If possible, please correct my typo in the task description (casrgo = cargo). Thanks.
Comment by PandaMojo (PandaMojo) - Sunday, 20 August 2006, 03:44 GMT
Duplicates of this:  FS#251   FS#218  (which contains a failed patching attempt).

Made a patch which fixes this, and I'm pretty sure this version is finally bug free. Should probably still be proofread though. Patch against R5962 attached - main thing I'm worried about is that I'm modifying v->current_order.flags, but it seems to have the exact desired effect with no ill effects... so this is sane, right? right? *hopes*

I've tested it against the savegame in this thread and the duplicates, as well as two affected savegames of my own. Works for them all. No idea it's effect on  FS#140  without a savegame to test, though. I'd attempt to reproduce it if my left hand hadn't started hurting.
Comment by PandaMojo (PandaMojo) - Sunday, 20 August 2006, 16:42 GMT
Now that I remember the correct difference between transfer and transfer + full load, yet again fixed patch (against 5986, tested against all savegames once more, seems to work AOK)
Comment by TubularBell (TubularBell) - Monday, 28 August 2006, 22:09 GMT
Patch seems to work OK... However, after some time the game crashed ('!invalid string id 0 in GetString') which it didn't do before. Can't say if it's because of something in the patch or just it in the revision I patched...
Comment by PandaMojo (PandaMojo) - Tuesday, 29 August 2006, 04:41 GMT
Are you able to reproduce it? What revision was used? I've not experienced this playing with this patch this past week with various revisions.