Editor: Saved random map does segfault on load if no tribe is explicitly set
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
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_
(this=0x110) at /usr/include/
759 (this->
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
- Klaus Halfmann: Approve (compile, review, test,)
- Notabilis: Needs Fixing
- GunChleoc: Needs Resubmitting
-
Diff: 139 lines (+25/-16)5 files modifiedsrc/editor/editorinteractive.cc (+5/-2)
src/editor/map_generator.cc (+2/-2)
src/editor/ui_menus/player_menu.cc (+10/-9)
src/editor/ui_menus/player_menu.h (+0/-2)
src/ui_fsmenu/launch_spg.cc (+8/-1)
tags: | added: editor |
Changed in widelands: | |
milestone: | none → build20-rc1 |
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 |
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 |
Changed in widelands: | |
assignee: | nobody → kaputtnik (franku) |
Changed in widelands: | |
assignee: | kaputtnik (franku) → GunChleoc (gunchleoc) |
Changed in widelands: | |
status: | New → In Progress |
Changed in widelands: | |
status: | In Progress → Fix Committed |
assignee: | GunChleoc (gunchleoc) → nobody |
Fixed in build20-rc1