Bug in -devel: "Replace all in line" doesn't always work. July 09, 2010, 05:51:02 pm Sometimes it finds everything in the line, sometimes it seems to only find some of them. I think the procedure for getting the list of all convois in the line is broken; my first guess, without looking at the code, at what's happening is that it finds all the convois in the list "after" the one which you're currently working with, but not the ones "before" it. Check your iteration bounds. Quote Selected
Re: Bug in -devel: "Replace all in line" doesn't always work. Reply #1 – July 09, 2010, 11:27:48 pm The convoy replacer will replace all convoys in the line with the same vehicles as the original convoy: this is how it was originally designed, I think. Do you think that it would be better if it replaced all in the line regardless of their type, and/or if there was a new "replace all like in line" option? Quote Selected
Re: Bug in -devel: "Replace all in line" doesn't always work. Reply #2 – July 10, 2010, 04:32:54 pm Quote from: jamespetts – on July 09, 2010, 11:27:48 pmThe convoy replacer will replace all convoys in the line with the same vehicles as the original convoy: this is how it was originally designed, I think.No, it doesn't. This is the exact problem. My lines always have all-identical consists running. (Sometimes the carriages and locomotives were bought in different years, but they're always the same models and the same number of each carriage) Apparently some check is not working right, and is claiming that there's only 1 (or 2) to replace in a line with three or four identical consists. Starting the replacer on a *different* consist may find all 4 of them. On the other hand, sometimes it claims there are 3 of them, and then proceeds to set only 2 of them to be replaced....It used to work, and broke only recently in -devel.These are some serious bugs in the replacer which have developed recently, and they all look like "fencepost errors". Where is the code where the replacer attempts to figure out which convoys to replace, and counts them?QuoteDo you think that it would be better if it replaced all in the line regardless of their type, and/or if there was a new "replace all like in line" option?Well, actually, if it would make simpler (and easier to debug) code, I think it would be better to replace all in the line regardless of type -- it might be less prone to "fencepost errors".1 - How many people run a mix of different consists on the same line?2 - There's already a different option to replace all convois in the WORLD with a given consist, which would likely handle most of the cases where people do run a mix of different consists on the same line. Quote Selected
Re: Bug in -devel: "Replace all in line" doesn't always work. Reply #3 – July 11, 2010, 05:37:47 pm Hmm, I have been trying to test commenting out the part checking for like convoys, but it seems that the entire dialogue is broken: none of the buttons that are unique to the replacer dialogue work... :-( Quote Selected
Re: Bug in -devel: "Replace all in line" doesn't always work. Reply #4 – July 11, 2010, 10:52:49 pm Quote from: jamespetts – on July 11, 2010, 05:37:47 pmHmm, I have been trying to test commenting out the part checking for like convoys, but it seems that the entire dialogue is broken: none of the buttons that are unique to the replacer dialogue work... :-(How disturbing. It was all working not that many weeks ago.... Quote Selected
Re: Bug in -devel: "Replace all in line" doesn't always work. Reply #5 – July 12, 2010, 09:44:35 pm I suspect that this may be to do with the GUI overhaul in Standard and dialogues that are not present in Standard not being updated in the merges. Quote Selected
Re: Bug in -devel: "Replace all in line" doesn't always work. Reply #6 – July 13, 2010, 10:05:54 am Quote from: neroden – on July 10, 2010, 04:32:54 pm1 - How many people run a mix of different consists on the same line?2 - There's already a different option to replace all convois in the WORLD with a given consist, which would likely handle most of the cases where people do run a mix of different consists on the same line.I frequently do... especially in the early early years when there f ex is no sensible road transport for both pax and mail (yes I do mail runs early on too...) and where my routes are set up for both pax and mail (to be able to use them later on as well...). I would not like my mail carriages to be upgraded to gardenseats once these are available... Similarly, it quite often makes sense to not include mail service on each and every train servicing a specific route even quite late in the game, since that will leave pax waiting while running empty mail coaches.... Quote Selected
Re: Bug in -devel: "Replace all in line" doesn't always work. Reply #7 – July 13, 2010, 08:21:02 pm Quote from: sanna – on July 13, 2010, 10:05:54 amI frequently do... especially in the early early years when there f ex is no sensible road transport for both pax and mail (yes I do mail runs early on too...) and where my routes are set up for both pax and mail (to be able to use them later on as well...). I would not like my mail carriages to be upgraded to gardenseats once these are available... With road transport, I always end up running a separate pax line and mail line, even if they have the same route, because I set different waiting time standards for them; also, it often turns out to be desirable to add a 'shuttle service' in order to add a stop to pax traffic, but to simply extend the existing mail line by one stop. I do end up with trains with (and without) mail cars on the same line, though, that's true.Similarly, it quite often makes sense to not include mail service on each and every train servicing a specific route even quite late in the game, since that will leave pax waiting while running empty mail coaches....[/quote] Quote Selected
Re: Bug in -devel: "Replace all in line" doesn't always work. Reply #8 – July 13, 2010, 09:46:53 pm Evidently, some people tend to use different convoys in the same line more than others. The original intention of the code should be preserved, I think. Quote Selected
Re: Bug in -devel: "Replace all in line" doesn't always work. Reply #9 – July 14, 2010, 04:17:44 am I run mixed consists in all my road and train pax/mail lines.One thing I've realized is that when the convoy, train, is in 'reverse' the consist is also reversed after the engine(s) and the 'replace' function will separate the two, despite being part of the same batch.For cargo trains, the function is quite consistent with "replace all" and "replace all in line". It's just the "reverse" directions in pax/mail trains that seem to cause a problem.For road vehicles "replace all" and "replace all in line" works fine for me. Quote Selected Last Edit: July 14, 2010, 04:20:53 am by AEO
Re: Bug in -devel: "Replace all in line" doesn't always work. Reply #10 – July 14, 2010, 04:50:02 am Quote from: AEO – on July 14, 2010, 04:17:44 amFor road vehicles "replace all" and "replace all in line" works fine for me.Have you tested -devel? Quote from: AEO – on July 14, 2010, 04:17:44 amI run mixed consists in all my road and train pax/mail lines.One thing I've realized is that when the convoy, train, is in 'reverse' the consist is also reversed after the engine(s) and the 'replace' function will separate the two, despite being part of the same batch.Does this happen even when the consist is Engine-Tender-(lots of identical cars)? If so it's seriously a bug. It may also be related to the problems I'm seeing.QuoteFor road vehicles "replace all" and "replace all in line" works fine for me.I'm having trouble with hackneys and single horses in -devel! Are you sure you're running -devel? If so, what git commit number? That might help us track this down.... Quote Selected
Re: Bug in -devel: "Replace all in line" doesn't always work. Reply #11 – July 14, 2010, 06:11:22 am I'm running 7.2, so that's not -devel.I haven't tried engine-tender-identical cars yet. Usually I like to throw in a brake carriage and TPO or dining car.replace works perfectly for freight, no matter what is thrown in since the consist doesn't reverse. Quote Selected
Re: Bug in -devel: "Replace all in line" doesn't always work. Reply #12 – July 14, 2010, 10:13:03 pm AEO, thank you for that report. As Neroden points out, this may well be a bug that needs fixing. However, there have been a number of changes since 7.2 to the replacer feature - can you test this in 8.2 first? Also, may I ask: is there a particular reason that you are using 7.2 instead of 8.2? If there is some problem in 8.2 that puts you off using it, I'd very much like to know so that I can try to address the issue :-) Quote Selected
Re: Bug in -devel: "Replace all in line" doesn't always work. Reply #13 – July 14, 2010, 10:54:23 pm did I say 7.2?sorry, I meant 8.2.oops So far, I haven't really found any game breaking faults with 8.2 Quote Selected
Re: Bug in -devel: "Replace all in line" doesn't always work. Reply #14 – July 14, 2010, 11:36:33 pm Ahh, that makes more sense! Can you elaborate, in that case, on what you mean when you write,Quotewhen the convoy, train, is in 'reverse' the consist is also reversed after the engine(s) and the 'replace' function will separate the two, despite being part of the same batch?Perhaps some screenshots would illustrate the problem? Quote Selected
Re: Bug in -devel: "Replace all in line" doesn't always work. Reply #15 – July 15, 2010, 01:39:53 am Found and fixed on my jp-devel branch. When checking for "identical" status, convoys are now compared both "forwards" and "backwards", no matter what.This solves all the really perplexing cases of "miscounting" on my game. Obviously, if you have a TPO or something and it's in a different position on each convoy, it's going to be considered different, but engine-tender-identical cars-brake van and push-pull sets with identical cars should work right now. I think players can at least understand *why* sets arranged in a different order will count as different, but not "purely reversed" sets.There was a second subtler bug where some convoys were *counted* as being replaceable but then weren't replaced, but we'll see if that's still around now that the primary bug is fixed (it might have been a symptom of the same thing). Quote Selected Last Edit: July 15, 2010, 01:44:50 am by neroden
Re: Bug in -devel: "Replace all in line" doesn't always work. Reply #16 – July 15, 2010, 03:58:31 am Quote from: jamespetts – on July 14, 2010, 11:36:33 pmAhh, that makes more sense! Can you elaborate, in that case, on what you mean when you write,?Perhaps some screenshots would illustrate the problem?By 'reverse' being separated, I mean if my convoy consists of:Engine-Tender-dining-coach-coach-TPO-mail-mail-brakeI'll make a batch 2 or more of these to run on different lines.When the train turns around at the end of the line, it'll now have:Engine-Tender-brake-mail-mail-TPO-coach-coach-diningWhen I go to replace the convoy through the replace function, if some convoys are facing in the 'reverse' direction, I will only get to replace convoys facing the same direction, as the 'replace all or 'replace all in line' function will treat the forward facing and reverse facing convoys as two different convoy consists.seems like neroden fixed it already. That was quick Quote Selected
Re: Bug in -devel: "Replace all in line" doesn't always work. Reply #17 – July 15, 2010, 04:21:21 am Quote from: AEO – on July 15, 2010, 03:58:31 amBy 'reverse' being separated, I mean if my convoy consists of:Engine-Tender-dining-coach-coach-TPO-mail-mail-brakeI'll make a batch 2 or more of these to run on different lines.When the train turns around at the end of the line, it'll now have:Engine-Tender-brake-mail-mail-TPO-coach-coach-diningWhen I go to replace the convoy through the replace function, if some convoys are facing in the 'reverse' direction, I will only get to replace convoys facing the same direction, as the 'replace all or 'replace all in line' function will treat the forward facing and reverse facing convoys as two different convoy consists.seems like neroden fixed it already. That was quick No, no, I didn't fix that. I fixed a worse problem, where two convoys which looked positively *identical* were showing up as "not the same". Incidentally, if I'm not mistaken (James please confirm) in -devel when you reverse the train you'll getEngine-Tender-mail-mail-TPO-coach-coach-dining-brake:-) Quote Selected