Wares are not delivered to construction or production sites

Bug #536367 reported by astuur
82
This bug affects 10 people
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Critical
Unassigned

Bug Description

This is the precompiled SVN 4986 on Win32
I came upon a rather strange bug. In one specific place on the map (the green plateau) every building I try to erect never gets finished.
I tried 3 time with a farm (one trunk missing) and once with a bakery (2 trunks missing). Buildings elsewhere are not affected.
It's reproducible.
I attach a savegame and replay. The spot in question is on the green plateau itsself south-southwest of the center - barbarian farm 87% built..

Tags: economy
Revision history for this message
astuur (astuur) wrote :

The file _farm_constr_bug.7z was added: construction material not arriving

Revision history for this message
astuur (astuur) wrote :

I had a similar incident again and it shows I have probably drawn the wrong conclusions.
It may not be the spot, that is the problem, but the route construction material is sent.
I have this time identified the missing material lying at a flag and being ignored.
I think there may be a relation to the discussed "carriers do not enter fighting areas"
Is this now implemented? It seems is is. (The changelog is not detailed in this).
Maybe carriers "forget" their orders somewhere in the process of running away and coming back.

Changed in widelands:
status: New → Confirmed
importance: Undecided → Low
tags: added: economy
Revision history for this message
Nicolai Hähnle (nha) wrote :

Analyzing the savegame I noticed that some wares got stuck due to inconsistencies in the game state. The problem is, your replay is incomplete: when I load it, I immediately get "end of replay reached" (note how the .wrpl file is only 43 bytes big). As a result, I cannot say for certain how those wares became stuck and I'm marking this bug as Incomplete.

Nevertheless, I did find one possible way the wares could have gotten stuck: note that some trunks are stuck at the flag on field 16,29 (one of the castles southwest of the problematic farm). Did you ever remove and rebuild one of the roads adjacent to this flag? If yes, then your problem is almost certainly caused by a bug that I have just fixed in trunk.

Otherwise, we may never know unless you can provide a full replay.

Changed in widelands:
status: Confirmed → Incomplete
Revision history for this message
Nicolai Hähnle (nha) wrote :

I forget to mention: at least with current trunk, if wares get stuck like this, you should always be able to un-stuck them by removing and rebuilding roads.

Revision history for this message
Astuur (wolfsteinmetz) wrote :

Great you found something in spite of the broken replay.
Too long ago, I cannot supply a complete one anymore.
So far, I have not seen this happen again since.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in widelands:
status: Incomplete → Expired
Revision history for this message
SirVer (sirver) wrote :

I've seen this bug lately, reattaching the road helped. I neither have a replay nor a savegame, but I can confirm it exists.

Changed in widelands:
status: Expired → Confirmed
Revision history for this message
_aD (ad-simplypeachy) wrote :

I have never seen this in build16, but since installing Timo's win32 6289 build I have experienced it at least 20 times in a four/five hour game. It has happened with many different construction sites of all sizes and it seemed to also happen rarely with a Mill and Brewery.

I only experienced the bug with production sites on two occasions, so may have just been impatient, but the construction sites had it quite often, especially in games where there are many buildings.

Revision history for this message
Nasenbaer (nasenbaer) wrote :

Country_Man_G posted a saved game that might be useful for reproducing the problem in bug #950754. Haven't it tested though.

-> https://bugs.launchpad.net/widelands/+bug/950754/+attachment/2854992/+files/Mission_3.wgf

Revision history for this message
_aD (ad-simplypeachy) wrote :

The work-around of removing the offending road is sometimes impossible (especially on larger maps) as the ware is not always visible - it can be behind a building or tree. Even when the ware is visible it can be very time consuming to find if you have a large economy. With this in mind, should the bug be left as low priority? I am fairly sure it has become much more frequent in recent games.

I can also confirm it definitely affects non-construction site wares - I have seen wheat affected by it.

David Allwicher (aber)
summary: - Building construction never finishes (trunks not delivered)
+ Wares are not delivered to construction or production sites
Changed in widelands:
importance: Low → Medium
Revision history for this message
SirVer (sirver) wrote : Re: [Bug 536367] Re: Building construction never finishes (trunks not delivered)

What happens when you reduce the max-wares indicator to 0 and then
increase it again?

Revision history for this message
_aD (ad-simplypeachy) wrote :

In some cases it fixes the problem but only in 75% of cases. Some times I have tried this method 5/6 times on a construction site and still nothing. I have tried setting it to 0 and waiting for 30 seconds, then increasing it again, or doing it quickly.

In one case with wheat I set all production sites that use wheat (mill, brewery, sheep farm, donkey farm, piggery) to 0 wheat, waited for existing wheat to be used up/removed, waited a further 30 seconds. Two wheat was still left on the road. I returned all sites to normal, they all filled up and began working at 100% and the two wheat was still on the road. I'll see if I still have a savegame of this, if it will be of use.

Revision history for this message
_aD (ad-simplypeachy) wrote :

Also: if the site is a long way from the source of the ware and you do not know where the ware is, you have to wait a suitable time to increase the max-ware from 0 to maximum. This means the work-around is not as simple as "spam the max-ware until it arrives" ;-)

Revision history for this message
Astuur (wolfsteinmetz) wrote :

Just came across another example of a building not getting finished, because a trunk is never delivered.

within the last 10 minutes (estimate), I dismantled a wood hardener west of the HQ and build a new one at some other place.
The plot west of the HQ I used to erect a new tavern, but it stopped at 85% and a trunk is missing.
I waited some minutes, deleted a segment of a road to the north, where a trunk lay, but it got carried away in the other direction.
I saved the game and exited.
I attach "no_delivery_bug.7z"
In there is Port_B_e_replay.wgf, Port_B_e_savegame.wgf, config and stdout.txt (both from from/widelands/).
There is no stderr.txt

Revision history for this message
Astuur (wolfsteinmetz) wrote :

While I was writing, the reloaded game has finished my tavern!
I cannot decide, whether reloading did the trick, or I had not waited long enough in the first place, sorry.

Revision history for this message
Daniel Santos (daniel-santos) wrote :

That's why I sometimes will just run my games in a separate X session (but launched from a debugger in my primary X session) so I don't have to actually stop them to do other stuff (send emails, etc.), I just switch CTRL-ALT-F8/F7. But mostly, it helps if it crashes while in full-screen mode. I just run:

X :3 -ac -once

Then I when I debug, I set the environment variable DISPLAY=:3 and I have my debugger in one X session and the game in another (you may want to run a window manager in the second X session however).

IMHO, it's better that you reported it than not :)

Nasenbaer (nasenbaer)
Changed in widelands:
importance: Medium → High
Revision history for this message
Nasenbaer (nasenbaer) wrote :

OKAY...

At the moment I have very little time for Widelands testing, so I just started Widelands two or three times to build up some buildings and take screenshots for the Website - and in every game there was at least one building (in the first there were three) with this problem. As I have never faced this problem before, I guess this is a recent regression. Maybe through the new "max ware filler" feature in building windows?

Anyway personally I see this as blocker for Build17, as it happens much too often and makes the economy unreliable - the bigger the econo,y gets, the harder will it be to find such problems...

Anyway at the moment I don't have the time to dig deeper into this bug, so anyone brave enough to tackle this? If yes, I vote for milestone->build17-rc1 and severity->critical

Revision history for this message
Astuur (wolfsteinmetz) wrote :

I fully agree that we cannot release this way.
It is getting worse and worse the longer my game lasts.
Carriers go on strike, houses do not get finished.
Traffic jams form.
You can tell which segments are involved
(carrieres idle vs. "walking on the spot")
but it's hard to corrects them all.
Hope, someone can correct this.....

Revision history for this message
Astuur (wolfsteinmetz) wrote :

I have a feeling that the second carriers (animals) are primarily involved in this bug.
I see many segments where my barbarians work, but not the oxen, thought they should.
But it may be just the effect that the wares that should trigger the second carrier to work are forgotten anyhow.
Forgotten by the human carriers as well, of course.
I had meanwhile reached the maximum allowed number on some flags.

Revision history for this message
Shevonar (shevonar) wrote :

In this case (#19) this bug might be connected with the changes in bug 920316. I just thought of what recently changed in the economy and transportation system.

Revision history for this message
Jens Beyer (qcumber-some) wrote :

@Shevonar/#20

The initial bugs on this topic are way older than the feature in bug#920316. However, your argument may be valid in the way that the current very heavy problems might indeed be caused by this feature implementation. From the changes made, it looks to me like the carrier gets released regardless if he is currently carrying wares or not; and the carrier (then fugitive on the search for a flag?) might be dropping the ware where he is at this very moment and returns to the HQ.

Revision history for this message
Angelo Locritani (alocritani) wrote :

changes in bug 920316 are only triggered if the road is not busy (m_busyness < 350).
those changes also add the value of "m_busyness" string to debug window: Astuur, can you please check the value of m_business written in the debug window that appear when you click debug button on a road with the problem?

Revision history for this message
Astuur (wolfsteinmetz) wrote :

Angelo, I don't have a debug version of the game, and would not know how to build or use one ....
(See my sig on the forum)
You can, however try with the attached savegame if you want.
It is an earlier state of the game that later ended in a huge traffic jam because of too many forgotten wares at some flags.
Check the mines on the red (me) player, but also on green (AI).
I hope it loads well, (my installation ran with endless resources and some non standard artwork, but it should not matter)

Revision history for this message
SirVer (sirver) wrote :

IIRC fugitive workers keep the ware they carry and drop it in the warehouse they eventually reach (easy to see: burn a lumberjacks house when the worker is on his way home with a trunk). I doubt it has to do with bug 920316.

There have been two features which have been touching on the economy code:
- The ships feature (I do not know how heavily, but I see this as the most likely)
- The max wares feature (does not touch on the economy code itself, but changes a lot of requests around).

Is there an absolute surefire way to reproduce this? I remembered a bug reporter that said something like "whenever a build a farm on this and this field it never finishes", but I was unable to find this bug report and its savegame. Currently, it is really hard to know if you have fixed the bug or not (I assume that fixing the bug is avoiding the game getting into a state where wares are forgotten - finding the cause for this from a savegame that only has the final state and not the transition will be quite hard).

Revision history for this message
Angelo Locritani (alocritani) wrote :

@Sirver:
I think you are talking about this same bug report, first description of Astuur. Savegame and replay is still attached to this bug report

Revision history for this message
Astuur (wolfsteinmetz) wrote :

I was just going to say, that it was an old bugreport I did.
This was one sigle instance, and I cannot even be sure it was the same.
But I have been playing quite a few games since then with an enormous amount of traffic on maps up tp 352 x352.
I had traffic jams, because my road system was no good, but _never_ again forgotten wares.
So I really doubt that we are witnessing the same thing.
The bug is really quite frequent. Just start a game, build some houses and you'll see that some of them won't get finsished as you expand further and have an industry going.
You can then look for the forgotten wares at the flags.
Or else load the savegame I provided today and play on with that.

I am running a new game now trying to see some seafaring action.
If I run into forgotten wares, you will get the replay, or savegame, or whatever you like.
What exactly would be best to analyse that bug?
What should I do, when I see a forgotten ware in the game?

Revision history for this message
SirVer (sirver) wrote : Re: [Bug 536367] Re: Wares are not delivered to construction or production sites

Right. Sorry for missing this 8).

I was playing an hour long game with Kristin recently and have not seen
this bug. I will try with your savegame.

Astuur, the ideal would be a small/short game with replay (note that you
must not have made any changes to conf files, otherwise the replay will
likely not play) would be ideal. Something that can be run over and over
quickly in a debug session.

SirVer (sirver)
Changed in widelands:
importance: High → Critical
milestone: none → build17-rc1
Revision history for this message
Astuur (wolfsteinmetz) wrote :

Hm... trouble is - that thing just does not happen in a short and small game, it seems.
Just had my first incident with the new game.
Upgraded an imperial fortress to a castle that got not finsished (1 stone missing)
I found the stone, renewed the road segament and got it fixed.
But that was the first in 12h game time ...

Revision history for this message
Astuur (wolfsteinmetz) wrote :

In the savegame I have uploaded this morning, I think all that was changed in the conf files is the 3rd parameter set to 100 for all mines and all tribes. I'm a bit fed up with rebuilding the mines over and over when testing . :)

Revision history for this message
SirVer (sirver) wrote :

Okay, I have investigated this a bit and indeed found an instance where a ware can become abandoned on a flag: a carrier promises a flag to pick up an item from it before starting to move there. The flag takes notice and informs no other carrier that it has pending wares. If the carrier is then released it did not tell the flag that he will never show up -> the item gets abandoned. The reason ripping roads/flags in the vicinity lead sometimes to a fix is that the item might reroute itself and marks itself pending again so that it will not be picked up and carried in the wrong direction.

I conjectured a fix but I am unable to properly test it. It will avoid this chain of events (theoretically) but nothing can be done for games in which the wares are already abandoned. The fix is in r6335. Please everybody, test over the weekend if possible! If the error is indeed gone we can stay with the plan to winter-time freeze on monday.

Revision history for this message
SirVer (sirver) wrote :

I have a game with 3 CPUs running for 5 in-game hours and didn't see the bug at all. I declare it fixed - please keep testing though.

Changed in widelands:
status: Confirmed → Triaged
status: Triaged → Fix Committed
Revision history for this message
ivh (ivh) wrote :

I just played a quick game and was able to build a large economy without encountering this issue any more. It seems fixed indeed. :)

Revision history for this message
_aD (ad-simplypeachy) wrote :

I've just done a 6 hour game with a large economy and did not encounter the bug once so consider this bug to be fixed.

Revision history for this message
Astuur (wolfsteinmetz) wrote :

50 h into a Atlantean game, designed to create a lot of traffic.
Tried every thing to provoke it, but all is fine!
Congrats Sirver, you must have eliminated this bug!
The only uncertainty is, that this time I played a map without seafaring.
So no ports, no ship building etc.

Revision history for this message
SirVer (sirver) wrote :

Thanks for all your playtesting. I think it warrants to move to
winter-time feature freeze without further delay.

Revision history for this message
SirVer (sirver) wrote :

Released in build17-rc1.

Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
Kovacs Zoltan (kz0313) wrote :

Hi there,

My problem is the same. And I don't know how can I download fix r6335 you mentioned above.

I've reinstalled the game several times but it couldn't help.

Construction is stopping, upgrade of buildings is stopping despite of change of
the building priority or change of max-wares indicator. I have lot of trunks and
stones.

It is a marvelous game and I would like to play with it.

Today is 2013-12-29 and the install file still contains that bug.

I have 64 bit windows 7 and 32 bit version (is there 64 bit version?) of the game.

Thank you for your help!

Revision history for this message
Gabriel Margiani (gamag) wrote :

Try a daily build from http://widelands.8-schuss.de/ and report if the problem reappears in current trunk (r6820).

Thanks

Revision history for this message
Kovacs Zoltan (kz0313) wrote :

Hi Gabriel,
Thank you for your suggestion. I've installed Widelands-bzr6820-nomusic-win32.exe
After installation I loaded my old save and the construction problem still existed.
After that I destroyed the half finished building (Toolsmithy) and tried to build a new one.
Unfortunatelly the construction stopped again at 83%. (always 83%)
Later I built a Fisher's House. The building completed without any problem.
After that I tried to build another Toolsmithy on another spot of the map.
The construction stopped again at 83%. :-(
Do you have any idea?

Revision history for this message
Gabriel Margiani (gamag) wrote :

Are you sure you have all needed materials? The your description sounds like there is something like cloth, planks or, depending on the tribe you are playing, marble missing.

If you have all materials, could you upload your savegame?

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Hi Kovacs and welcome to Launchpad! :)

>My problem is the same. And I don't know how can I download fix r6335 you mentioned above.

The fix should be included in build17, which version of Widelands were you running?

>After installation I loaded my old save and the construction problem still existed.

I can't say for certain how this issue was fixed, as I only skimmed the comments above now. It is possible that the issue was fixed so that the game will not get stuck like this again, though any games started before the fix (.i.e older save games) will not correct themselves in any way. Though, several of the comments above mentions rebuilding roads temporarily fixes it, have you tried this?

Revision history for this message
Kovacs Zoltan (kz0313) wrote :

Hi Hans and Gabriel,

Gabriel's idea solved my problem. I'm a beginner fan of this game and
I didn't noticed that wood and stone aren't the only materielas for building.

I thougth stone and wood enoght for construction. It was my inattention.
Evrerything works well and I enjoy this game.

Maybe a tooltip above the construction sites with a list of missing
materials would be a nice feature in future development. :-)

Thank you for your help and wish you happy new year!

Revision history for this message
Angelo Locritani (alocritani) wrote :

> Maybe a tooltip above the construction sites with a list of missing materials would be a nice feature in future development.

IIRC clicking on a construction building should display the list of needed wares. Items in the list should "disappear" as soon as needed wares arrive :)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.