Assertion fails on expedition from before the dawn of time

Bug #1629685 reported by Steven De Herdt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Medium
Unassigned

Bug Description

I've letting the AI take over my (blue) tribe again (like in cfr. #1627767). This time an assertion failed, which seems to indicate some kind of prehistoric expedition. Blue has an expedition going on with a ship that was loaded a rather long time ago.

ComputerPlayer(1): initializing as type 2
ComputerPlayer(2): initializing as type 2
widelands: ../src/ai/defaultai.cc:3747: void DefaultAI::check_ship_in_expedition(Widelands::ShipObserver&, uint32_t): Controletest 'persistent_data->expedition_start_time > 0' faalt.

Thread 1 "widelands" received signal SIGABRT, Aborted.
[Switching to Thread 0xb47c4a40 (LWP 7179)]
0xb7fd9dad in __kernel_vsyscall ()
(gdb) bt
#0 0xb7fd9dad in __kernel_vsyscall ()
#1 0xb75bac19 in __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#2 0xb75bc117 in __GI_abort () at abort.c:89
#3 0xb75b3bd7 in __assert_fail_base (fmt=0xb46143d3 "%s%s%s:%u: %s%sControletest '%s' faalt.\n%n",
    assertion=0x8ec71d8 "persistent_data->expedition_start_time > 0", file=0x8ec666f "../src/ai/defaultai.cc", line=3747,
    function=0x8ec81c0 <DefaultAI::check_ship_in_expedition(Widelands::ShipObserver&, unsigned int)::__PRETTY_FUNCTION__> "void DefaultAI::check_ship_in_expedition(Widelands::ShipObserver&, uint32_t)") at assert.c:92
#4 0xb75b3c5b in __GI___assert_fail (assertion=0x8ec71d8 "persistent_data->expedition_start_time > 0", file=0x8ec666f "../src/ai/defaultai.cc", line=3747,
    function=0x8ec81c0 <DefaultAI::check_ship_in_expedition(Widelands::ShipObserver&, unsigned int)::__PRETTY_FUNCTION__> "void DefaultAI::check_ship_in_expedition(Widelands::ShipObserver&, uint32_t)") at assert.c:101
#5 0x08b8cffa in DefaultAI::check_ship_in_expedition (this=0xdecac68, so=..., gametime=90495463) at ../src/ai/defaultai.cc:3747
#6 0x08b8c87e in DefaultAI::check_ships (this=0xdecac68, gametime=90495463) at ../src/ai/defaultai.cc:3626
#7 0x08b7ed3d in DefaultAI::think (this=0xdecac68) at ../src/ai/defaultai.cc:407
#8 0x089d8dcc in NetHost::think (this=0xbfffe0a0) at ../src/network/nethost.cc:807
#9 0x088b487e in Widelands::Game::think (this=0xbfffbf20) at ../src/logic/game.cc:548
#10 0x08a97c7e in InteractiveBase::think (this=0xbadf1c8) at ../src/wui/interactive_base.cc:306
#11 0x08a0fc48 in UI::Panel::do_think (this=0xbadf1c8) at ../src/ui_basic/panel.cc:441
#12 0x08a0f631 in UI::Panel::do_run (this=0xbadf1c8) at ../src/ui_basic/panel.cc:183
#13 0x087d2007 in UI::Panel::run<UI::Panel::Returncodes> (this=0xbadf1c8) at ../src/ui_basic/panel.h:96
#14 0x088b45c6 in Widelands::Game::run (this=0xbfffbf20, loader_ui=0x9c86140, start_game_type=Widelands::Game::Loaded, script_to_run="", replay=false,
    prefix_for_replays="nethost") at ../src/logic/game.cc:525
#15 0x089d85d5 in NetHost::run (this=0xbfffe0a0) at ../src/network/nethost.cc:749
#16 0x087cc81b in WLApplication::mainmenu_multiplayer (this=0x91b6570) at ../src/wlapplication.cc:1159
#17 0x087cbe55 in WLApplication::mainmenu (this=0x91b6570) at ../src/wlapplication.cc:997
#18 0x087c894b in WLApplication::run (this=0x91b6570) at ../src/wlapplication.cc:441
#19 0x087c710b in main (argc=1, argv=0xbffff324) at ../src/main.cc:49
(gdb)

Related branches

Revision history for this message
Steven De Herdt (stdh) wrote :
Revision history for this message
TiborB (tiborb95) wrote :

Indeed - it is a corner case, AI finds a ship in expedition in initialization, but expedition start time is not set in persistent data.
Fix prepared...
I must say that switching AI<->Human on one slot is bit fragile due to persistent data....

Changed in widelands:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → TiborB (tiborb95)
milestone: none → build19-rc1
GunChleoc (gunchleoc)
Changed in widelands:
status: Confirmed → In Progress
GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Fix Committed
assignee: TiborB (tiborb95) → nobody
GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

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.