Pressing Tab in message window leads to stack-overflow
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Starting a new game, opening the messages window and pressing the tab key leads to ASAN aborting the game:
AddressSanitize
=======
==15067==ERROR: AddressSanitizer: stack-overflow on address 0x7ffc017f9f98 (pc 0x563d5c63fab4 bp 0x7ffc017fa030 sp 0x7ffc017f9f80 T0)
#0 0x563d5c63fab3 in UI::Table<
#1 0x563d5c942dbd in GameMessageMenu
[...]
#248 0x563d5c63fcb0 in UI::Table<
#249 0x563d5c942dbd in GameMessageMenu
SUMMARY: AddressSanitizer: stack-overflow ../src/
==15067==ABORTING
Related branches
- GunChleoc (community): Disapprove
- Murtaza: Pending requested
-
Diff: 17571 lines (+10874/-1966)153 files modifieddata/i18n/locales.lua (+383/-383)
data/i18n/translation_stats.conf (+7/-7)
data/scripting/coroutine.lua (+1/-1)
data/scripting/messages.lua (+1/-9)
data/scripting/ui.lua (+4/-2)
data/scripting/win_conditions/collectors.lua (+30/-51)
data/scripting/win_conditions/win_condition_functions.lua (+59/-1)
data/scripting/win_conditions/wood_gnome.lua (+58/-60)
data/tribes/workers/atlanteans/carrier/init.lua (+1/-9)
data/tribes/workers/frisians/baker/init.lua (+1/-0)
data/tribes/workers/frisians/baker_master/init.lua (+1/-0)
data/tribes/workers/frisians/beekeeper/init.lua (+1/-0)
data/tribes/workers/frisians/blacksmith/init.lua (+1/-0)
data/tribes/workers/frisians/blacksmith_master/init.lua (+1/-0)
data/tribes/workers/frisians/brewer/init.lua (+1/-0)
data/tribes/workers/frisians/brewer_master/init.lua (+1/-0)
data/tribes/workers/frisians/brickmaker/init.lua (+1/-0)
data/tribes/workers/frisians/builder/init.lua (+1/-0)
data/tribes/workers/frisians/charcoal_burner/init.lua (+1/-0)
data/tribes/workers/frisians/claydigger/init.lua (+1/-0)
data/tribes/workers/frisians/farmer/init.lua (+1/-0)
data/tribes/workers/frisians/fisher/init.lua (+1/-0)
data/tribes/workers/frisians/fruit_collector/init.lua (+1/-0)
data/tribes/workers/frisians/hunter/init.lua (+1/-0)
data/tribes/workers/frisians/landlady/init.lua (+1/-0)
data/tribes/workers/frisians/miner/init.lua (+1/-0)
data/tribes/workers/frisians/miner_master/init.lua (+1/-0)
data/tribes/workers/frisians/reed_farmer/init.lua (+1/-0)
data/tribes/workers/frisians/reindeer_breeder/init.lua (+1/-0)
data/tribes/workers/frisians/scout/init.lua (+1/-0)
data/tribes/workers/frisians/seamstress/init.lua (+1/-0)
data/tribes/workers/frisians/seamstress_master/init.lua (+1/-0)
data/tribes/workers/frisians/shipwright/init.lua (+1/-0)
data/tribes/workers/frisians/smelter/init.lua (+1/-0)
data/tribes/workers/frisians/smoker/init.lua (+1/-0)
data/tribes/workers/frisians/stonemason/init.lua (+1/-0)
data/tribes/workers/frisians/trainer/init.lua (+1/-0)
data/tribes/workers/frisians/woodcutter/init.lua (+1/-0)
data/txts/developers.json (+5/-3)
data/txts/developers.lua (+1/-1)
data/txts/translators_data.lua (+1/-1)
doc/sphinx/source/lua_tribes_workers.rst.org (+7/-0)
po/map_the_green_plateau.wmf/map_the_green_plateau.wmf.pot (+1/-1)
po/maps/maps.pot (+1/-1)
po/mp_scenario_island_hopping.wmf/mp_scenario_island_hopping.wmf.pot (+1/-1)
po/mp_scenario_smugglers.wmf/mp_scenario_smugglers.wmf.pot (+1/-1)
po/scenario_atl01.wmf/scenario_atl01.wmf.pot (+1/-1)
po/scenario_bar01.wmf/scenario_bar01.wmf.pot (+1/-1)
po/scenario_bar02.wmf/scenario_bar02.wmf.pot (+1/-1)
po/scenario_dummy.wmf/scenario_dummy.wmf.pot (+1/-1)
po/scenario_emp01.wmf/scenario_emp01.wmf.pot (+1/-1)
po/scenario_emp02.wmf/es.po (+122/-116)
po/scenario_emp02.wmf/scenario_emp02.wmf.pot (+1/-1)
po/scenario_emp03.wmf/es.po (+26/-8)
po/scenario_emp03.wmf/scenario_emp03.wmf.pot (+1/-1)
po/scenario_emp04.wmf/scenario_emp04.wmf.pot (+1/-1)
po/scenario_fri01.wmf/scenario_fri01.wmf.pot (+1/-1)
po/scenario_fri02.wmf/scenario_fri02.wmf.pot (+1/-1)
po/scenario_tutorial01_basic_control.wmf/scenario_tutorial01_basic_control.wmf.pot (+1/-1)
po/scenario_tutorial02_warfare.wmf/scenario_tutorial02_warfare.wmf.pot (+1/-1)
po/scenario_tutorial03_seafaring.wmf/scenario_tutorial03_seafaring.wmf.pot (+1/-1)
po/scenario_tutorial04_economy.wmf/scenario_tutorial04_economy.wmf.pot (+1/-1)
po/texts/es.po (+21/-20)
po/texts/texts.pot (+1/-1)
po/tribes/tribes.pot (+2/-2)
po/tribes_encyclopedia/ar.po (+152/-14)
po/tribes_encyclopedia/ast.po (+152/-14)
po/tribes_encyclopedia/bg.po (+152/-14)
po/tribes_encyclopedia/br.po (+152/-14)
po/tribes_encyclopedia/ca.po (+153/-15)
po/tribes_encyclopedia/cs.po (+152/-14)
po/tribes_encyclopedia/da.po (+152/-14)
po/tribes_encyclopedia/de.po (+154/-16)
po/tribes_encyclopedia/el.po (+152/-14)
po/tribes_encyclopedia/en_CA.po (+152/-14)
po/tribes_encyclopedia/en_GB.po (+152/-14)
po/tribes_encyclopedia/en_US.po (+152/-14)
po/tribes_encyclopedia/eo.po (+152/-14)
po/tribes_encyclopedia/es.po (+160/-21)
po/tribes_encyclopedia/et.po (+152/-14)
po/tribes_encyclopedia/eu.po (+152/-14)
po/tribes_encyclopedia/fa.po (+152/-14)
po/tribes_encyclopedia/fi.po (+154/-16)
po/tribes_encyclopedia/fr.po (+153/-15)
po/tribes_encyclopedia/fy.po (+152/-14)
po/tribes_encyclopedia/ga.po (+152/-14)
po/tribes_encyclopedia/gd.po (+152/-14)
po/tribes_encyclopedia/gl.po (+152/-14)
po/tribes_encyclopedia/he.po (+152/-14)
po/tribes_encyclopedia/hi.po (+152/-14)
po/tribes_encyclopedia/hr.po (+152/-14)
po/tribes_encyclopedia/hu.po (+152/-14)
po/tribes_encyclopedia/ia.po (+152/-14)
po/tribes_encyclopedia/id.po (+152/-14)
po/tribes_encyclopedia/ig.po (+152/-14)
po/tribes_encyclopedia/it.po (+152/-14)
po/tribes_encyclopedia/ja.po (+152/-14)
po/tribes_encyclopedia/jv.po (+152/-14)
po/tribes_encyclopedia/ka.po (+152/-14)
po/tribes_encyclopedia/ko.po (+153/-15)
po/tribes_encyclopedia/krl.po (+152/-14)
po/tribes_encyclopedia/la.po (+152/-14)
po/tribes_encyclopedia/lt.po (+152/-14)
po/tribes_encyclopedia/mr.po (+152/-14)
po/tribes_encyclopedia/ms.po (+152/-14)
po/tribes_encyclopedia/my.po (+152/-14)
po/tribes_encyclopedia/nb.po (+152/-14)
po/tribes_encyclopedia/nds.po (+153/-15)
po/tribes_encyclopedia/nl.po (+152/-14)
po/tribes_encyclopedia/nn.po (+152/-14)
po/tribes_encyclopedia/oc.po (+152/-14)
po/tribes_encyclopedia/pl.po (+152/-14)
po/tribes_encyclopedia/pt.po (+153/-15)
po/tribes_encyclopedia/pt_BR.po (+152/-14)
po/tribes_encyclopedia/ro.po (+152/-14)
po/tribes_encyclopedia/ru.po (+153/-15)
po/tribes_encyclopedia/rw.po (+152/-14)
po/tribes_encyclopedia/si.po (+152/-14)
po/tribes_encyclopedia/sk.po (+152/-14)
po/tribes_encyclopedia/sl.po (+152/-14)
po/tribes_encyclopedia/sr.po (+152/-14)
po/tribes_encyclopedia/sv.po (+153/-15)
po/tribes_encyclopedia/tr.po (+152/-14)
po/tribes_encyclopedia/tribes_encyclopedia.pot (+1/-1)
po/tribes_encyclopedia/uk.po (+152/-14)
po/tribes_encyclopedia/vi.po (+152/-14)
po/tribes_encyclopedia/zh_CN.po (+152/-14)
po/tribes_encyclopedia/zh_TW.po (+152/-14)
po/widelands/widelands.pot (+1/-1)
po/widelands_console/es.po (+19/-18)
po/widelands_console/widelands_console.pot (+1/-1)
po/widelands_editor/widelands_editor.pot (+1/-1)
po/win_conditions/win_conditions.pot (+37/-42)
po/world/world.pot (+1/-1)
src/economy/economy.cc (+5/-0)
src/economy/economy.h (+3/-0)
src/logic/game.cc (+1/-0)
src/scripting/lua_root.cc (+31/-2)
src/scripting/lua_root.h (+1/-0)
src/ui_basic/button.cc (+2/-4)
src/ui_basic/checkbox.cc (+0/-3)
src/ui_basic/panel.cc (+1/-1)
src/ui_basic/slider.cc (+1/-4)
src/ui_fsmenu/internet_lobby.cc (+6/-4)
src/website/CMakeLists.txt (+4/-0)
src/website/json/CMakeLists.txt (+10/-0)
src/website/json/json.cc (+138/-0)
src/website/json/json.h (+97/-0)
src/website/json/value.cc (+58/-0)
src/website/json/value.h (+71/-0)
src/website/map_info.cc (+12/-39)
src/website/map_object_info.cc (+81/-249)
utils/update_authors.py (+71/-16)
tags: | added: asan |
Changed in widelands: | |
assignee: | nobody → Nasenbaer (nasenbaer) |
status: | Confirmed → In Progress |
From a quick peak at the code it looks like an endless key handling loop.
The game message window doesn't handle the tab key itself, so it refers handling down to its table: ::handle_ key(bool, SDL_Keysym) ../src/ wui/game_ message_ menu.cc: 421
GameMessageMenu
But tables specifically refer tab key handling up to their parents: void*>: :handle_ key(bool, SDL_Keysym) ../src/ ui_basic/ table.cc: 345
UI::Table<
Solution: GameMessageMenu ::handle_ key(bool, SDL_Keysym) should simply handle the tab key with a default :handle_ key(down, code);
return UI::Panel:
I'll check tomorrow if I find other UI instances with similar handling loops. Not sure if I can already manage to upload a fix, if not someone else can make this small change. (I'll report back here if I find similar instances.)