Bug: Wares not being delivered

Bug #985100 reported by Patrick H. on 2012-04-18
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
widelands
Invalid
High
Unassigned

Bug Description

I am playing build17rc2 on a windows vista machine, but have also experienced the same problem on win7.

I having issues with wares not being delivered to sites, both buildings being built and also bread not being delivered to training site. This is occuring even though there is an abundance of resources and there are no obvious blockages. It is as if the assigned ware has gotten stuck somewhere.

I am attaching the savefile. The area of concern is by the two trainingsites next to the port. The trainingsites are not getting the food even though a warehouse close by is fully supplied. The two warehouses to the left of the trainingsites haven't been finished and they have been waiting a long time.

Please let me know if you need additional information.

Thanks!

Patrick H. (daggeteo) wrote :
_aD (ad-simplypeachy) wrote :

Thought this had been fixed! https://bugs.launchpad.net/widelands/+bug/536367

What version were you using when you started this game? Has it been played on any version other than build 17 rc2?

_aD (ad-simplypeachy) wrote :

If you look to the north-west port from the target area, off it's west coast is a stationary ship full of bread and some meat. This may have the "requested" bread in it. This doesn't explain why the partially-built warehouses haven't been fulfilled from the warehouse to the east. Maybe the stuck "food ship" was going to collect the required building materials but never got there?

After stopping /everything/ (what an incredible economy!) I found that the port nearest to your four troublesome buildings eventually delivered the required wares to both training sites and the warehouses. It was so busy fulfilling the "eject bread" order that it the other wares must have been sat in a queue. n.b. I did not make any changes to flags, roads or wares in any sites at all, just stopped the production of all sites.

_aD (ad-simplypeachy) wrote :

Even if this isn't a bug, but merely a choked ware queue, I would certainly prefer that removal of wares from a warehouse via the "Remove wares" order should take the lowest precedence compared to sites requesting wares for production/construction.

Patrick H. (daggeteo) wrote :

Wow I never thought of testing that! Much appreciated solution, this has been bugging me multiple times and I just couldn't seem to understand what went wrong.

i am still not entirely sure what you mean but I will read this once my meds go out the system... The bread ejecting from ther port or the warehouse next to the port was only done in late stages as a way to for me to see if I could fix the problem. Hence i doubt fulfulling the eject bread order was the root of the problem. I must have just messed up the entire economy somehow.

At least now I have some sort of way to deal with this, also I agree with your point, ejecting wares should have lower precendence.

Patrick H. (daggeteo) wrote :

@#2
I was using rc2 ffrom the start of this game.

SirVer (sirver) wrote :

Were ships involved? They are terribly inefficient (in fact, the whole economy code is) and can have huuuuuuuge delays in delivering wares. maybe this was the problem here. I agree about the eject bug though as well. I set this to incomplete in case more information about the problem is available - otherwise I suggest renaming this bug to reflect the eject issue more clearly.

Changed in widelands:
status: New → Incomplete
Patrick H. (daggeteo) wrote :

It was a seafaring map and yes I had built ships. But I would not say that they were involved because:
a)The second attempt to build a warehouse was made after establishing that there were sufficient wares in the warehouse with building wares. The amount of wares exceeded the needs by far.
b) The meat production was on the same "island"/"region" as the training sites so there was not ship transportation for that. Still the meat was not being sufficiently delivered to the the inns or the trainingssites. Upon discovering that I tried ejecting 1500+ meat to no avail so I aborted the attempt.

I have also seen huge delays and posted a suggestion regarding that in the Seafaring thread in the forum. Here's what I wrote:
"I've been playing around with the seafaring capabilities a bit more and I have some additional ideas/wishes.

I noticed that at a certain point some wares were laying in wait for a long time, ie buildings weren't built and things weren't happening as they were supposed to. The cause of this was multiple ports and to few ships. Here I'm thinking of two solutions:

1) the previously mentioned dedicated route, hehe yes I can't let it go

2) Some kind of warning or indication that you have to few ships. Each time a ware is sent to the port for ship transport it could have a timestamp and when that timestamp exceeds a certain amount of time give the player a message that wares are waiting a long time in the ports and that the player should consider building additional ships. This timestamp could be useful in the boat statistics window to see the average waittime at each harbor.

Regarding how the wares being transported I think that instead of showing each ware seperatly that they could be grouped. Example A coal icon X 10 or whatever ware/worker it may be. Or maybe you are working on something already. As it is right now is not very informative."

I fail to see how this is a eject bug. At the late stages, yes I was ejecting wares but only as a troubleshooting method. I had been experiencing this issue for a while without the ejection of wares.

>a)The second attempt to build a warehouse was made after establishing that there were sufficient wares in the warehouse with building wares. The amount of wares exceeded the needs by far.
You assume here that wares are taken from the nearest supplier - this is
not the case. Even if there are enough wares on your island it could be
that wares from another island are assigned to be delivered - which can
take a loooong time.

>b) The meat production was on the same "island"/"region" as the training sites so there was not ship transportation for that. Still the meat was not being sufficiently delivered to the the inns or the trainingssites. Upon discovering that I tried ejecting 1500+ meat to no avail so I aborted the attempt.
See a).

[Your text]
At this point in time, I see more need to improve the routing of wares
(e.g. rescheduling wares to make routes shorter, to avoid that wares
cross wares of the same kind on roads and so on. There is a lot that can
be done right now - if the situation does not improve, your suggestions
become valid to consider.

>I fail to see how this is a eject bug. At the late stages, yes I was
>ejecting wares but only as a troubleshooting method. I had been
>experiencing this issue for a while without the ejection of wares.
The eject bug is that *important* wares are not launched from your
warehouse when an manual ejection of wares is going on. This should not
be the case - manual ejected wares should not choke the delivery of
other wares.

SirVer (sirver) wrote :

ooh i forgot: it would be interesting to see this bug triggered in a
game without ships.

_aD (ad-simplypeachy) wrote :

I'd like to clarify that when I mentioned the behaviour may be caused by ejection of the bread, this isn't necessarily a "bug". If the warehouse has 100 bread and you ask it to eject them, I assume the engine just puts all 100 into a queue. If you then request one marble, the marble sits at the end of the queue. Certainly far from optimal, but not a bug per se.

_aD (ad-simplypeachy) wrote :

Tested an empire HQ and warehouse on build 17 rc 2 to try to trigger this on a non-seafaring map. Both buildings were ejecting wares (two individual tests), and a construction site was made. Both buildings stopped "eject order" wares and let out the required construction wares then continued with the eject order.

_aD (ad-simplypeachy) wrote :

I didn't realise that there was also a large pending fish ejection order for a warehouse to the north. I re-loaded the game and again, after stopping all of the warehouse ejection queues, the bread and construction materials were finally delivered. I don't think this is a problem with ejected wares getting a higher priority. I found ships carrying fish and beer from one port to another for no discernible reason. The wares would arrive at the port (neither had eject/prefer set) and then stay in the destination port. There were no production sites requiring either ware, and no other warehouses/ports with preference for either of these.

The port also acted strangely with the warehouse beside it. Both had all wares set to neutral, yet the port would keep sending fish to the warehouse. Are ports misbehaving when used with warehouses maybe?

Patrick H. (daggeteo) wrote :

@#9
Thank you for your patience trying to explain this to me!

>You assume here that wares are taken from the nearest supplier - this is
not the case. Even if there are enough wares on your island it could be
that wares from another island are assigned to be delivered - which can
take a loooong time.
Well for the longest time I only had meat production at one place, that one island. But this is easy to test with simplypeachy's method by stopping production.

>At this point in time, I see more need to improve the routing of wares
(e.g. rescheduling wares to make routes shorter, to avoid that wares
cross wares of the same kind on roads and so on. There is a lot that can
be done right now - if the situation does not improve, your suggestions
become valid to consider.

Yes I can see that this would take a lower priority, I could also see it being a part of the solution, especially suggestion no. 2 An message like that would indicate that something is wrong with your transportation needs and that this needs to be overlooked, hence fixed.

Now I understand what you meant. But I don't believe that I was ejecting prior to my troubleshooting which had been going on for a while due to poor food delivery to the trainingsites. Which is why I still don't consider this so be an ejecting issue. However, I am going to try this again, testing two things:

1. continue the savegame, cancell all the ejecting orders
2. replay the map at one point without seafaring *sad face*. I have a gut feeling telling me that the problem won't be reproduced.

@#11
The one warehouse where I keept the building material there was never any ejecting order done. But Like Sirver said, not always the closest route is taken. So I guess I should try to consolidate my building stock.

#12
Interesting, I'm still gonna stop all ejecting orders in my warehouses and see if that makes any difference.

@13
Again, that fish ejection was a recent one, Just an attempt to try to move the fish to the warehouse closest by. But nor I understood why the boats kept transportning fish between the south and the north harbor. They were boath well supplied.

I think that before this is deemed a bug I need to test out my way of playing WL again, but make sure not to eject any wares at any point. With the exception of soldiers that wouldn't affect wares anyway.
I'll make two experiments, doing this with once with ships and once without.

Patrick H. (daggeteo) wrote :

Update:
I figured that I try fixing testing simplypeachy's method of stopping the ejecting procedure att all the warehouses.

With some starting and stopping of productions facilties and also no more ejecting I got the problem solved with the noncompleted buildings aswell as bread delivery to trainingsites.

I should also mention that I removed the ports, not all of them but they are not longer being used to transport as everything now is connected by road.

However I am still having issues with delivery of wares. The inns are not receiving the bread that they are supposed to. Even though the warehouse right next them is filled up with the economy quote (ie. there is not a lot of bread production going on). So my once great economy is completely lacking meals. I have some inns further north, that if I start them they start producing. But what I find weird is why the south ones do not.

Patrick H. (daggeteo) wrote :

My apologies, forgot to upload the save file.

_aD (ad-simplypeachy) wrote :
_aD (ad-simplypeachy) wrote :

Attachment #17: the original save with all production sites stopped and warehouses priorities re-set to default.

This save shows the southern-most port (next to warehouse) ejecting mostly fish and coal, with some bread and meat. The port has no meat, coal or fish in stock or in dock. All boats in the dock are empty. When the bread is ejected, the bread count does not decrement.

The global stocks counter increments for each of these wares when they are ejected. Thus, the port is either not reporting it's contents correctly or is magically creating these wares.

_aD (ad-simplypeachy) wrote :

Note on #18: Only the "Wares in warehouses" stock figure seems to be increasing. It is also slowly getting some extra iron ore and rations.

_aD (ad-simplypeachy) wrote :

To clarify entry 15, working on save #16:

Please ignore comments regarding the taverns, they are working as expected.

The training sites / arenas to the north-east of the problem port have empty bread slots. The warehouse beside the port has bread. It is delivering this bread in small amounts - one ware at a time - to the sites.

After emptying the bread slots in the training sites to zero, then filling them, bread is delivered correctly. I assume that the bread they requested was in the problem port at some point, and was tainted by the bug affecting it. The bread may still exist, and the sites are still waiting for it, but the bread cannot be accessed by anything.

Once the sites' bread counters are set to zero, and re-set to maximum, they issue new requests which are fulfilled.

Patrick H. (daggeteo) wrote :

I would like to add that I concur with the above posts. The fault seems to have been with magic bread/misc wares in the ports.

SirVer (sirver) wrote :

Note that port != dock. The port is essentially a headquarters which has
a dock associated with it. The dock requests wares that should be packed
on ships - when they are delivered to the dock the carrier carries them
into the port but the warecounter in the *dock* is increased - not in
the warehouse. A dock can also be full which can lead to traffic jams in
front of ports.

So those wares are (likely) not magic. They come from the dock - not
from the warehouse. Also the increasing counters for the warehouse are
because the dock transfers wares into the warehouse - which is not
made visible for the user with a graphic.

Does this make sense?

_aD (ad-simplypeachy) wrote :

I did check the "Wares in dock" - all are zero. As each "magic" ware comes out, the global ware counter increments. Is there any way to analyse the save file to see if the wares are actually in the dock, but the counters are incorrect?

Patrick H. (daggeteo) wrote :

Please ignore my poor judgement of words of choosing, I keep getting terms mixed up. _aD-simplypeachy presented it much better.

SirVer (sirver) wrote :

#23: not at this point in time. There is also no Lua wrapping for ports and docks yet - therefore debugging is not really possible.

Launchpad Janitor (janitor) wrote :

[Expired for widelands because there has been no activity for 60 days.]

Changed in widelands:
status: Incomplete → Expired
SirVer (sirver) wrote :

Do I see this correctly that this bug has not been confirmed, but that it has definitively to do with ships? I am quite unsure what state I should assign to this. Setting to incomplete for another 60 days.

Changed in widelands:
status: Expired → Incomplete
_aD (ad-simplypeachy) wrote :

I'm certain this was to do with the ship code in some way, but not sure if it was the ships themselves or the way they interact with the docks. The root of all this was that wares were being created from nowhere at the dock.

Launchpad Janitor (janitor) wrote :

[Expired for widelands because there has been no activity for 60 days.]

Changed in widelands:
status: Incomplete → Expired
SirVer (sirver) wrote :

I have not been able to reproduce this one yet. Granted, I have not played for a while though. Is there a reliable way to reproduce this known by now?

Changed in widelands:
status: Expired → Confirmed
_aD (ad-simplypeachy) wrote :

I do not know how to reproduce it - I have only seen it happen in the attached saved game.

Patrick H. (daggeteo) wrote :

I haven't reproduced this error in a while. I haven't played the game though for a long time.

Nasenbaer (nasenbaer) wrote :

Another bug was reported (bug #1191889 ), which was about a different topic, but the real underlying problem was the same as this bug.
I could track the problem down to a 0 pointer of the next transportation step. Maybe WareInstance::get_next_move_step is returning a 0 pointer under some circumstances, although it should not???

Changed in widelands:
importance: Undecided → High
SirVer (sirver) wrote :

Setting to incomplete for bug sweeping.

Changed in widelands:
status: Confirmed → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for widelands because there has been no activity for 60 days.]

Changed in widelands:
status: Incomplete → Expired
SirVer (sirver) wrote :

setting to invalid as we were unable to track the issue down and reproduce :(.

Changed in widelands:
status: Expired → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers