port without a portdock (game crashing)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Critical
|
TiborB |
Bug Description
When testing new seafaring AI I found that some ports might be without portdock. AI can skip such ports but the game still crashes sametimes with:
Program received signal SIGSEGV, Segmentation fault.
0x08b13ed3 in std::unique_
at /usr/include/
223 { return std::get<0>(_M_t); }
(gdb) bt
#0 0x08b13ed3 in std::unique_
at /usr/include/
#1 0x08b13148 in Widelands:
#2 0x08a7e727 in Widelands:
at /var/widelands/
#3 0x08a7da34 in Widelands:
at /var/widelands/
#4 0x08a975c0 in Widelands:
#5 0x08b5cf35 in Widelands:
at /var/widelands/
#6 0x08b5f0b3 in Widelands:
#7 0x08872758 in SaveHandler:
at /var/widelands/
#8 0x08872252 in SaveHandler::think (this=0xbfffc968, game=..., realtime=8253468)
at /var/widelands/
#9 0x08809504 in Widelands:
#10 0x089d880b in InteractiveBase
#11 0x0894d125 in UI::Panel::do_think (this=0xeab7de8) at /var/widelands/
#12 0x0894c7a7 in UI::Panel::run (this=0xeab7de8) at /var/widelands/
#13 0x08809187 in Widelands:
script_
#14 0x0890f7ba in NetHost::run (this=0xbfffd4e0, autorun=false) at /var/widelands/
#15 0x0874bdbe in WLApplication:
Though I admit that a problem might be with my code...
When you open window of such port, you can see there 'Portdock: 0'
Related branches
- SirVer: Approve
- GunChleoc: Approve
- TiborB: Needs Resubmitting
-
Diff: 3672 lines (+1690/-534)22 files modifiedsrc/ai/ai_help_structs.h (+58/-13)
src/ai/defaultai.cc (+946/-109)
src/ai/defaultai.h (+57/-2)
src/economy/fleet.cc (+7/-0)
src/economy/portdock.cc (+20/-0)
src/logic/game.cc (+2/-2)
src/logic/game.h (+2/-1)
src/logic/playercommand.cc (+34/-5)
src/logic/playercommand.h (+4/-3)
src/logic/productionsite.cc (+1/-1)
src/logic/ship.cc (+396/-382)
src/logic/ship.h (+21/-2)
src/logic/warehouse.cc (+53/-4)
src/logic/warehouse.h (+7/-0)
src/notifications/note_ids.h (+2/-1)
src/wui/shipwindow.cc (+5/-5)
test/maps/ship_transportation.wmf/scripting/init.lua (+17/-0)
test/maps/ship_transportation.wmf/scripting/test_rip_portdock_with_worker_and_ware_in_transit.lua (+54/-0)
tribes/atlanteans/bread/conf (+1/-1)
tribes/empire/bread/conf (+1/-1)
tribes/empire/meal/conf (+1/-1)
tribes/empire/ration/conf (+1/-1)
tags: | added: computerplayer crash seafaring |
tags: |
added: ai removed: computerplayer |
Changed in widelands: | |
status: | Fix Committed → Fix Released |
If you want to test it, you might use my branch seafaring-ai, watch the output to console for text ' port without portdock at ...x...', so you can pause and investigate the port.
It starts to appear after couple of hours of gameplay, and then after some time game crashes.
You can use new version of soutfall islands map in map section on the website, because there is not enough good maps for seafaring. One reason is that AI cannot work with maps with multiple waters.