Crash in player command

Bug #1834151 reported by GunChleoc on 2019-06-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Won't Fix
Critical
Unassigned

Bug Description

Reported in https://code.launchpad.net/~widelands-dev/widelands/fix-dropdowns/+merge/368223/comments/964582

FATAL ERROR - game crashed. Attempting emergency save.
...
InternetGaming: logout(SERVER_CRASHED)
[NetClient] Closing network socket connected to 2a03:4000:32:524:48cb:feff:feae:b0c6:7395.
Warning: Economy still has requests left on destruction
Warning: Economy still has flags left on destruction
Warning: Economy still has warehouses left on destruction
WareList: 125 items of 30 left.
WareList: 2 items of 33 left.
...
WareList: 1 items of 102 left.
Warning: Economy still has requests left on destruction
Warning: Economy still has flags left on destruction
Warning: Economy still has warehouses left on destruction
WareList: 127 items of 0 left.
...
WareList: 12 items of 102 left.
ObjectManager: ouch! remaining objects
lastserial: 2499
[NetRelayConnection] Closing network socket connected to 2a03:4000:32:524:48cb:feff:feae:b0c6:7397.
InternetGaming: logout(SERVER_CRASHED)
libc++abi.dylib: terminating with uncaught exception of type WException: [../src/logic/playercommand.cc:1070] Unreachable code was reached.
Abort trap: 6
ObjectManager: ouch! remaining objects
lastserial: 2499
[NetRelayConnection] Closing network socket connected to 2a03:4000:32:524:48cb:feff:feae:b0c6:7397.
InternetGaming: logout(SERVER_CRASHED)

Related branches

Klaus Halfmann (klaus-halfmann) wrote :

Was able to reproduce this on trunk with a replay (just let the replay run another tick)

libc++abi.dylib: terminating with uncaught exception of type WException: [../src/logic/playercommand.cc:1070] Unreachable code was reached.
Abort trap: 6

Klaus Halfmann (klaus-halfmann) wrote :

Rest of the replay

Klaus Halfmann (klaus-halfmann) wrote :

For the record, this is bzr9158[trunk]

GunChleoc (gunchleoc) wrote :

The function that triggers this - it's the NEVER_HERE(); line.

void CmdSetWarePriority::execute(Game& game) {
 MapObject* mo = game.objects().get_object(serial_);
 if (upcast(ConstructionSite, cs, mo)) {
  if (upcast(ProductionsiteSettings, s, cs->get_settings())) {
   for (auto& pair : s->ware_queues) {
    if (pair.first == index_) {
     pair.second.priority = priority_;
     return;
    }
   }
   NEVER_HERE();
  }
 } else if (upcast(Building, psite, mo)) {
  if (psite->owner().player_number() == sender()) {
   psite->set_priority(type_, index_, priority_);
  }
 }
}

Changed in widelands:
assignee: nobody → Benedikt Straub (nordfriese)
Benedikt Straub (nordfriese) wrote :

Do you get this also in the branch I have in review? It should be fixed there already

Changed in widelands:
status: New → In Progress
Changed in widelands:
assignee: Benedikt Straub (nordfriese) → nobody
status: In Progress → Fix Committed
GunChleoc (gunchleoc) wrote :
Changed in widelands:
status: Fix Committed → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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