Editor: Saved random map does segfault on load if no tribe is explicitly set

Bug #1783878 reported by kaputtnik on 2018-07-26
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
widelands
Undecided
Unassigned

Bug Description

Steps to reproduce:

1. Start Editor
2. create random map with default values
3. Check player positions. The player menu shows for all players: "Random Player; Tribe Barbarian". Do not change the tribe!
4. Save the map
5. Load the saved map

Result: Widelands exits with a segfault. gdb says:

Thread 1 "widelands" received signal SIGSEGV, Segmentation fault.
0x0000555556105d8a in std::_Rb_tree<unsigned char, unsigned char, std::_Identity<unsigned char>, std::less<unsigned char>, std::allocator<unsigned char> >::_M_begin
    (this=0x110) at /usr/include/c++/8.1.1/bits/stl_tree.h:759
759 (this->_M_impl._M_header._M_parent);

Trying to load the map as a game shows the error (no segfault):

Game data error
The tribe ''' does not exist.

The error does not appear when a tribe for all players are set in step 3. It doesn't matter to select a different tribe. So when just clicking the tribe button and select barbarians for all players, the segfault doesn't happen.

Related branches

kaputtnik (franku) on 2018-07-26
tags: added: editor
GunChleoc (gunchleoc) on 2018-07-28
Changed in widelands:
milestone: none → build20-rc1
kaputtnik (franku) on 2018-07-30
summary: - Editor: Saved random map does segfault if no tribe is explicitly set
+ Editor: Saved map does segfault on load if no tribe is explicitly set
kaputtnik (franku) on 2018-07-31
summary: - Editor: Saved map does segfault on load if no tribe is explicitly set
+ Editor: Saved random map does segfault on load if no tribe is explicitly
+ set
kaputtnik (franku) on 2018-08-01
Changed in widelands:
assignee: nobody → kaputtnik (franku)
kaputtnik (franku) on 2018-08-11
Changed in widelands:
assignee: kaputtnik (franku) → GunChleoc (gunchleoc)
GunChleoc (gunchleoc) on 2018-08-13
Changed in widelands:
status: New → In Progress
GunChleoc (gunchleoc) on 2018-08-29
Changed in widelands:
status: In Progress → Fix Committed
assignee: GunChleoc (gunchleoc) → nobody
GunChleoc (gunchleoc) wrote :

Fixed in build20-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers