Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Work Order Bug  (Read 2625 times)

Colonel Sanders Lite

  • Bay Watcher
    • View Profile
Work Order Bug
« on: January 25, 2018, 10:11:12 pm »

This is a bug I've run into a few times.  I'm posting this, mostly in the hopes that somebody knows a workaround.

Imagine you have 4 Glass Furnaces.  You want two of these furnaces to be responsible for collecting sand, and 2 responsible for actually making goods.  You want all the dwarves who are not your good glassmakers to be allowed to collect sand, with only the good glassmakers being allowed to make goods.  The profile for the collector furnaces is set for max skill adequate, with the two production furnaces set to min skill competent.

Now, in this situation, if you want a work order to do something automatically, it must be assigned to that specific workshop profile.  If you want more than one workshop to do that specific task, you must set it up in the profile for each workshop.  For example, we'll look at the collect sand task.

At both sand collecting glass furnaces, you set up this work order:
Collect Sand
Quantity - 1

Condition 1
item type - boxes and bags
traits - empty, sewn-imageless
inequality - at least 30

Condition 2
item type - items
traits - sand bearing
inequality - at most 45


What should happen:
Assuming that the number of sand bags is <= 45 and the number of empty bags is sufficient, the sand collecting glass furnaces run collect sand jobs until there is more than 45 sandbags, resuming sand collection when the number of sandbags is 45 or less.

What actually happens:
The first glass furnace does what's expected.  The second glass furnace never stops collecting sand.
« Last Edit: January 25, 2018, 10:14:06 pm by Colonel Sanders Lite »
Logged

Colonel Sanders Lite

  • Bay Watcher
    • View Profile
Re: Work Order Bug
« Reply #1 on: January 25, 2018, 10:38:41 pm »

Yes.
Logged

Colonel Sanders Lite

  • Bay Watcher
    • View Profile
Re: Work Order Bug
« Reply #2 on: January 25, 2018, 11:07:00 pm »

The really bizarre thing is that this is a problem I have had intermittently, but sometimes it's not an issue.  Right now, I have two farmers workshops with process plant orders that are working fine.  There's got to be some kind of x factor, but I'm just having trouble figuring out what exactly that is.


Edit:
Actually, there's something going on.  I'm not sure what yet.  I have a one time order to make 10 shields and another to make 10 crossbows and each apparently has made like 50 of them...  Removed the bugged orders, waited a bit, and added new glass furnace orders and it seems to be working fine now.
« Last Edit: January 26, 2018, 12:08:02 am by Colonel Sanders Lite »
Logged

Sarmatian123

  • Bay Watcher
    • View Profile
Re: Work Order Bug
« Reply #3 on: January 26, 2018, 05:28:54 am »

The same happens with milking job. Same with shearing job. Games does not detect availability of the "infinite" raw resources. You need to set it to run periodically. Like every month perform this job x-times. Then you have quantified number of buckets with milk, wool yarns or sand bags available every month. You can order other works performed given availability of these resources then.

I experimented with monthly 1 job of milking and then following 1 job of cheese making in job manager. However, as your fortress is doomed to make cheese in [1] quantity, cheese high value does not translate into high value lavish food.

There is also some bug with encrusting. Game simply doesn't count it, as no new product is created due encrusting. You need to turn off those jobs in job manager manually. This bug fails also skilling Dwarves in glazing.

gl
« Last Edit: January 26, 2018, 05:31:56 am by Sarmatian123 »
Logged

Colonel Sanders Lite

  • Bay Watcher
    • View Profile
Re: Work Order Bug
« Reply #4 on: January 27, 2018, 06:07:12 am »

Well, here's my best guess at the moment:

There is some circumstance that can interrupt your manager in the process of validating a work order.  I'm not sure exactly what causes it, but I think it happens when your manager aborts a "manage work orders" job in favor of some other high priority job.  I believe that hauling trade goods and trading at the depot are among them.  After this happens, the manager will not willingly pick up the validate work orders job again.  I have been correcting this behavior by adding a new work order to the queue, causing him to validate all non-validated jobs in the queue.

My suspicion is that one of these steps causes some sort of work order queue corruption.


Quite possibly something like this:
Add 3 jobs to the work order queue..
Manager goes to verify the jobs but aborts this in favor of something else.
Manager is done with high priority job so you add 1 new job to the work order queue.
The manager verifies the work order queue, but only the first job added is fully added correctly.  The rest show up correctly, but will never actually decrement the remaining to be produced counter as goods are made.

I'll see about doing some !!SCIENCE!! on this next time I fire up the fort.


@Sarmatian123
The first thing is definitely not the same problem.  The problem there is that milk-able and shear-able creatures are actually limited, periodically renewing resources.  Sand is not.  It's truly unlimited.

I've never tried encrusting or glazing through the manager, so I don't know what's up there.  Might be related, might not be.  I'm going to guess no though, as I got the sand collection fully working.
« Last Edit: January 27, 2018, 06:11:52 am by Colonel Sanders Lite »
Logged

Sarmatian123

  • Bay Watcher
    • View Profile
Re: Work Order Bug
« Reply #5 on: January 27, 2018, 04:54:49 pm »

@Sarmatian123
The first thing is definitely not the same problem.  The problem there is that milk-able and shear-able creatures are actually limited, periodically renewing resources.  Sand is not.  It's truly unlimited.

I've never tried encrusting or glazing through the manager, so I don't know what's up there.  Might be related, might not be.  I'm going to guess no though, as I got the sand collection fully working.

From your description, I judged it is exactly this problem. You are wrong. Even if this looks like different issue. It is basically same issue, just with turned around head to look differently.

I tried one-time production orders. 3 green glass window non-magma workshop and 20 clear glass coffin magma glass workshop. It worked perfectly like designed.

So what did not work? Setting conditions for sand collection failed. On stock 0 sand bags, setting item conditions (product and reagent does not work) to produce 10 sand bags, where there is less then 10 sand bags give those results:

Amount of item available is at least 10 - satisfied for next check (infinite satisfies it) (0 it can't be)
Amount of item available is at most 10 - NOT satisfied for next check (infinite satisfies it) (0 it can't be)
Amount of item available is greater then 10 - satisfied for next check (infinite satisfies it) (0 it can't be)
Amount of item available is less then 10 - NOT satisfied for next check (infinite satisfies it) (0 it can't be)
Amount of item available is exactly 10 - NOT satisfied for next check (infinite satisfies it) ( and 0 it could be this time)
Amount of item available is not 10 - satisfied for next check (infinite satisfies it) ( and 0 it could be this time)

So I figure it is about infinite sand check and not sand bag check.

So my work around stands pristine. Order collection of 5-10 sand bags daily, without any condition attached, but the frequency changed. You should have it working like clockwork on automation. 5-10 sand bags daily should be enough for 1 glass maker daily need at least. Anyhow good luck!
Logged

Colonel Sanders Lite

  • Bay Watcher
    • View Profile
Re: Work Order Bug
« Reply #6 on: January 27, 2018, 10:24:46 pm »

No, your problem is something else.  If I had to guess, it's probably an invalid item/material/trait combo.  Probably trying to use the SAND trait instead of the SAND-BEARING trait.

Observe the screenshots below.  I have exactly 47 sand bags in the stocks screen.  The manager conditions all provide expected results.






To be absolutely clear:  This has nothing to do with conditions.  The problem is specifically that the underlined where not correctly decrementing with a number of jobs:

« Last Edit: January 27, 2018, 10:34:15 pm by Colonel Sanders Lite »
Logged

Sarmatian123

  • Bay Watcher
    • View Profile
Re: Work Order Bug
« Reply #7 on: January 28, 2018, 05:49:37 am »

Weird. I never had this issue with job manager with exception of encrusting jobs. When I set 1000/1000 encrusting jobs, it always stays so in job manager no matter how many items got encrusted.

Furthermore your first description of issue was about the bug I was writing about and this bug produces the exactly same results as you claim you got afflicted with.

I always go for organizer/miner, broker/miner combos though, so they are not even military Dwarves, but I do not believe this is the issue, as you claim. There are no bugs reported on such a thing in DF's bug tracker. Organizer profession works perfectly as designed. Nothing gets bugged, though sometimes there are long delays, when I send my miners to dig something out far far away from fortress. Organizer/miner :)

There is some odd bug with workshops though. When you play around with individual settings something gets inexplicably sticky and workshop gets jammed. When checking workshop with "q", press "P" and then reset all accessibility settings with "1". It will solve immediately this issue of yours.
Logged

Colonel Sanders Lite

  • Bay Watcher
    • View Profile
Re: Work Order Bug
« Reply #8 on: January 29, 2018, 02:18:53 am »

I'm attempting to track down the work order issues, here's what I've spotted so far.

The first issue:
Create a work order.
Wait until the manager starts a "manage work orders" job.
Interrupt the "manage work orders" job by requesting the manager goes to the depot to trade.
The manager will not pick the manage work orders job back up until you create a new work order.

I have reproduced this multiple times and it happens 100% of the time.  LNP 0.43.03-r09.  It would be nice if someone that's playing the vanilla version of the game could verify it as well.

I suspect, but do not know for sure, that other high priority jobs, like sleep and eat, will do the same thing as well.  This is harder to reproduce on purpose though, simply due to the unpredictable nature of those jobs.

I guessed above that this problem caused some sort of corruption of the work order queue.  So far as I can tell at this moment, this guess was incorrect.  I have a clear example of some work order queue wonkiness (see below), but this issue seems to be unrelated.




The second issue:
There is definitely something that can cause some sort of issue with the way work orders track when a job is completed.  I'm still trying to track the exact cause down, but here is an experiment I've run.

I have 3 magma glass furnaces.  I added an identical work order to each one:
Collect Sand
Quantity - 2

Condition 1
item type - boxes and bags
traits - empty, sewn-imageless
inequality - at least 30

Condition 2
item type - items
traits - sand bearing
inequality - at most 45

Here, we can see the first collect sand jobs being done, who is doing each of those jobs, and which workshop that job is being done for:


Here, we see Erib collecting the first bag of sand for Sand Collector 1:


Checking the job manager immediately after, we can see that the manager considers one bag of sand collected for every collect sand order, but it's about to get even stranger!


Here, we can see Ber collecting the first bag of sand for Sand Collector 2:


Checking the job manager immediately after, we can see that it changed the quantities for sand collector 1, but not sand collectors 2 and 3...


Here, we can see Zulban collecting the first bag of sand for Sand Collector 3:


Checking the job manager immediately after, we can see that it changed the quantities for sand collectors 1 and 2, but not sand collector 3.



These are certainly very strange behaviors.


My guess at the moment is that this has something to do with deleting and/or reordering work orders messing up the array the game uses to track what is what.  I'm also wondering if this has to do with deleting/reordering work orders while some remain invalidated.  I think I need to try some experiments along these lines...
Logged

Colonel Sanders Lite

  • Bay Watcher
    • View Profile
Re: Work Order Bug
« Reply #9 on: January 29, 2018, 02:31:16 am »

Weird. I never had this issue with job manager with exception of encrusting jobs. When I set 1000/1000 encrusting jobs, it always stays so in job manager no matter how many items got encrusted.
Did that happen once or multiple times over the course of multiple fortresses?  I'm not 100% sure, but I'm fairly sure that I have had work orders for encrust jobs complete correctly.  I suspect that you're overemphasizing the job that was being done there, and it was really the same issue I'm having where a job does not get tracked correctly.  To be clear, a bug with the manager system, not the job.  I will try a work order for encrusting to see what happens though.

Furthermore your first description of issue was about the bug I was writing about and this bug produces the exactly same results as you claim you got afflicted with.
Yes.  My initial assessment was completely wrong, which is why I reassessed in my first followup post.


There are no bugs reported on such a thing in DF's bug tracker. Organizer profession works perfectly as designed.
I'm guessing you meant "Manager".  If so, try what I tried.  I got a 100% reproduction rate on that bug.  It's not a long delay issue.  It's a this job will never be picked back up issue.  It's pure conjecture, but I wonder if this is actually related to issues like injured dwarves cancelling their hospital visit and never going back for treatment.

There is some odd bug with workshops though. When you play around with individual settings something gets inexplicably sticky and workshop gets jammed. When checking workshop with "q", press "P" and then reset all accessibility settings with "1". It will solve immediately this issue of yours.
Not related.
Logged

Sarmatian123

  • Bay Watcher
    • View Profile
Re: Work Order Bug
« Reply #10 on: January 29, 2018, 06:36:34 am »

Weird. I never had this issue with job manager with exception of encrusting jobs. When I set 1000/1000 encrusting jobs, it always stays so in job manager no matter how many items got encrusted.
Did that happen once or multiple times over the course of multiple fortresses?  I'm not 100% sure, but I'm fairly sure that I have had work orders for encrust jobs complete correctly.  I suspect that you're overemphasizing the job that was being done there, and it was really the same issue I'm having where a job does not get tracked correctly.  To be clear, a bug with the manager system, not the job.  I will try a work order for encrusting to see what happens though.

Well, encrusting bug happens always, on every embark, like a clockwork, but then I am playing vanilla client without any skins, mods or DFHack. See?

There are no bugs reported on such a thing in DF's bug tracker. Organizer profession works perfectly as designed.
I'm guessing you meant "Manager".  If so, try what I tried.  I got a 100% reproduction rate on that bug.  It's not a long delay issue.  It's a this job will never be picked back up issue.  It's pure conjecture, but I wonder if this is actually related to issues like injured dwarves cancelling their hospital visit and never going back for treatment.

Yes, the skill is "organizer" and the nobility screen shows title "manager".

It could be connected with this medical bug, true, but I never had encounter with this medical bug in my vanilla client for entirety of the last 2 years. DF v42-v44. Medical services always worked perfectly like clockwork for me, like designed on Wiki, to be honest. Never ever healing job ever was broken for me for any reason. Even if it took a while to set hospital after a fact, correct Dwarf by himself came to hospital or was carried there to receive diagnosis. Specially once when Dwarf healed with broken bone. Medics broke him again creating few blood pools around his bed, set bones correctly and patched him up. Though before he was running with that broken bone around whole fortress, he was fixed for a while on traction bench. Then he goes healed in 100% like a miracle. I didn't have to injure him to get him fixed. I never needed to injure or re-injure any Dwarf to get them to medical treatment. The only time I lost Dwarf, I had everything setup then btw, was when a miner lost his pinky finger in a freaky mining accident and then didn't get any treatment for the finger what so ever, because nothing was broken on hand! This miner then got infection and died like 1 year later. Grr... However I always played plain vanilla DF client. See the difference?

Did you try DFHack's bug reports forum/page?

There is some odd bug with workshops though. When you play around with individual settings something gets inexplicably sticky and workshop gets jammed. When checking workshop with "q", press "P" and then reset all accessibility settings with "1". It will solve immediately this issue of yours.
Not related.

I see. It happens rarely in my vanilla client, but it still does from time to time. The "1" is savior there. :)

Well, there is a rather obvious work around to all your issues...
1. Check up on DFHack's bug reports forum. Report the bug, if it is not reported there yet. I doubt this is vanilla client issue tbh.
2. Split manager from broker. Make sure manager is a civilian, so he won't get drafted into army.
3. Make sure all your medics are civilians without any other assignments, then CMO.
Good luck!
Logged

Colonel Sanders Lite

  • Bay Watcher
    • View Profile
Re: Work Order Bug
« Reply #11 on: January 29, 2018, 06:54:46 am »

well shit...

A good portion, or maybe all, of what I'm actually trying to track down is probably tied into this:

http://www.bay12games.com/dwarves/mantisbt/view.php?id=9792

Resolved in the very next game version.....


@Sarmatian123
I tried encrusting furniture, and yeah, confirmed as an issue in 43.03 anyways.

I've seen that bug with the medical system a couple of times, but pretty rare.  I don't worry about it too much.

Nope, still trying to figure out the exact behaviour.  I'm betting it's probably a moot point now though. Will just have to wait and see how 43.05 goes.
Logged

mikekchar

  • Bay Watcher
    • View Profile
Re: Work Order Bug
« Reply #12 on: January 30, 2018, 07:15:15 am »

For what it's worth, I have seen issue #1 in vanilla.  It rarely happens because management is pretty quick, but every now and again the manager gets stuck exactly as you described.

For issue #2, I agree that the reported bug seems to be exactly what you witnessed.

@Sarmatian123 I've encrusted gems many times with manager orders.  The only problem I have had is a known problem with gems in boxes not being "available".  I'm not sure what problem you are running into.  One thing that confuses me is that because you have to specify the type of gem to encrust in the order, why are you setting it to do a quantity of 1000?  You won't have that many gems of one type.  I wonder if it is possible that the manager is *never* doing that job (because of box issues, for instance), but that you are encrusting due to a completely different job order that *is* working.

With the sand bags, though, as Colonel Sanders Lite mentioned, setting up the conditions for sand bags is completely ridiculous: first you need to specify "Sand Bearing" and second you have to specify something that reduces to a bag (*not* a bag or box)  Colonel Sanders Lite uses "empty, sewn imageless" (you can't sew images on a box, so it reduces to a bag), which is probably the easiest.  I tend to use  one particular material for all my sand bags.  For example "empty, pig tail thread" (boxes can't be made out of pig tail thread, so it reduces to a bag).  If you get either of the parts of the conditions wrong (not using "Sand Bearing" or not using something that reduces down to a bag), then it will never match -- which is what you are observing.
Logged

Sarmatian123

  • Bay Watcher
    • View Profile
Re: Work Order Bug
« Reply #13 on: January 30, 2018, 09:20:48 am »

I leveled a part of a hill. I have like 5000 claystones. I just ordered 1000/1000 cut of those. Manager does that ok. However order of 1000/1000 encrusting furniture or finished goods never gets count down. It stays always 1000/1000. When I run out of cut claystones, I am just canceling the order. It skills my gem cutters and gem setters a lot. Overflow gets sold usually, but I atom smash sometimes non-master quality stuff. Good use for the stones, don't you think?
Logged

Colonel Sanders Lite

  • Bay Watcher
    • View Profile
Re: Work Order Bug
« Reply #14 on: January 30, 2018, 11:36:25 am »

I migrated my fort to 43.05 and yeah, issue #2 seems to be completely resolved.  At least I have noted no further occurrences over the course of a few hours play time.

Colonel Sanders Lite uses "empty, sewn imageless" (you can't sew images on a box, so it reduces to a bag), which is probably the easiest.  I tend to use  one particular material for all my sand bags.  For example "empty, pig tail thread" (boxes can't be made out of pig tail thread, so it reduces to a bag).

My way won't count bags that are decorated with images.  Your way won't count any bags that aren't made out of that specific material (imports from merchants probably being the most common).  Neither way is perfect.  You've just got to pick your poison there.  Whichever way you go about it, it's probably a good idea to make sure that your manager job responsible for the creation of more bags works on the exact same condition or the production chain may fail.


« Last Edit: January 30, 2018, 11:39:32 am by Colonel Sanders Lite »
Logged
Pages: [1] 2