Remove ware removes wares without placing them outside the building (can trigger crash)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Critical
|
Nicolai Hähnle |
Bug Description
(Originally reported by destrier on irc. Thank you :) )
Steps to reproduce:
1. Start a new game.
2. Open your HQ and pick some random ware like Axes
3. Mark it "Remove ware"
4. Build a flag and connect it with a road to your HQ
5. Wait a while after the ware counter has hit zero, then attempt to exit the game.
Expected result:
The wares should be placed by the flag outside your HQ. When quiting the game, you should end up back at the main menu.
Actual result:
First of all, the wares are not placed by the flag, the counter is merely deincremented.
Secondly, when quiting in this state, the game will crash (see attached backtrace).
I've experimented a bit and it seems like the road is somehow needed to trigger the crash, because there are ways where it will not crash. Still no wares by the flag in any case though. This might in fact be two different bugs, since it sometimes crash and sometimes doesn't, but they are likely too related to be fixed separately.
The original reporter was running Widelands build 17 on Windows 7, and I was able to reproduce it on Ubuntu 12.10 with Widelands r6465.
Related branches
- SirVer: Approve
- Tino: Approve
-
Diff: 690 lines (+216/-116)16 files modifiedsrc/economy/economy.cc (+60/-33)
src/economy/economy.h (+22/-4)
src/economy/fleet.cc (+12/-4)
src/economy/portdock.cc (+1/-1)
src/economy/request.cc (+1/-1)
src/economy/routeastar.h (+9/-1)
src/economy/shippingitem.cc (+6/-2)
src/economy/transfer.cc (+7/-15)
src/economy/ware_instance.cc (+73/-30)
src/economy/ware_instance.h (+13/-6)
src/graphic/render/gamerenderer_gl.cc (+1/-1)
src/logic/carrier.cc (+3/-4)
src/logic/map.h (+3/-3)
src/logic/productionsite.cc (+0/-1)
src/logic/warehouse.cc (+2/-7)
src/logic/worker.cc (+3/-3)
Changed in widelands: | |
status: | New → Confirmed |
importance: | Medium → High |
Changed in widelands: | |
status: | Confirmed → In Progress |
Very strange, I know this feature has worked at some point in development. Anyway I can confirm at least the first part of the bug (ware not beeing carried out) for build17 and current development snapshot. This is a major problem and I think we should even treat it as a blocker for build18-rc1