Segfault in launch_mpg.cc while trying to join an internet game

Bug #1645842 reported by GunChleoc on 2016-11-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Critical
Unassigned

Bug Description

Something went wrong with loading the win condition. Server was hosting an artifacts game.

Related branches

Klaus Halfmann (klaus-halfmann) wrote :

WordSavior hosted a game with Checkmate A2.wmf and the Artifacts Win-Condition.
when I tried to join his game crashed immeditaley. We tried again but it failed
in the same way. I the hosted a build19 debug version with the same Map and
Win-Condition. This was ok anw e had a nice game (which he did win ...)

At this Time my ISP had some DOS conditons that ruined DNS-Queries.

We retried this today, but it was ok (did not check the win-condition, though)

WorldSavior was on Linux (not sure whhich kind) I am on OSX 10.12.1.

At the time I played I kind of fixed the Issued by using the Goolge DNS Server at 8.8.8.8

SirVer (sirver) wrote :

This is the part in the code where the crash happened: http://bazaar.launchpad.net/~widelands-dev/widelands/casern_workersqueue/view/7437/src/ui_fsmenu/launch_mpg.cc#L302

So this is my guess what happened and I think it is independent of the win condition chosen: Since this was not a default map, it needed to be downloaded from the site. If a player does not have a map downloaded, the host will send it to the player when she joins the game.

Gun did join the game and received the meta information (settings_->settings() in this case), containing win condition and map filename. win_condition_load() assumes that if !settings_->settings().mapfilename.empty() this contains a valid map filename. map.get_correct_loader(settings_->settings().mapfilename) probably returns nullptr (did not check this), because the map is not yet there - the host did not send it yet. And so the code crash.

Most of this menu stays blank until the map has been received and this logic needs to be implemented at this place too.

GunChleoc (gunchleoc) on 2016-11-30
Changed in widelands:
importance: High → Critical
SirVer (sirver) wrote :

I actually revise my statement from above: there is this check in here: t->has_key("map_tags"), so this only happens if

1) a map that the joining player has not yet on her disk is chosen
2) a win condition that has "map_tags" is chosen. The only one we have so far is "artifacts".

This can be circumvented by hosting the game, choosing "endless game" until all players have the map, then switch to artifacts.

GunChleoc (gunchleoc) on 2017-02-18
Changed in widelands:
status: Confirmed → In Progress
assignee: nobody → GunChleoc (gunchleoc)
GunChleoc (gunchleoc) on 2017-05-07
Changed in widelands:
status: In Progress → Fix Committed
assignee: GunChleoc (gunchleoc) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers