Selecting a map in multiplayer mode crashes the game
Bug #1385859 reported by
SirVer
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Critical
|
Unassigned |
Bug Description
Multiplayer -> LAN -> Host a game -> "Map" -> doubleclick on any map crashes the game:
Application Specific Information:
abort() called
terminating with uncaught exception of type ImageNotFound: [/Users/
Related branches
lp:widelands
- 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)
lp:~widelands-dev/widelands/bug-1385859
- SirVer: Approve
-
Diff: 1384 lines (+171/-182)47 files modifiedsrc/base/scoped_timer.cc (+2/-2)
src/editor/ui_menus/editor_main_menu_load_map.cc (+7/-8)
src/editor/ui_menus/editor_main_menu_map_options.cc (+1/-1)
src/editor/ui_menus/editor_main_menu_new_map.cc (+2/-2)
src/editor/ui_menus/editor_main_menu_random_map.cc (+14/-14)
src/editor/ui_menus/editor_main_menu_save_map.cc (+7/-8)
src/editor/ui_menus/editor_player_menu.cc (+1/-1)
src/editor/ui_menus/editor_player_menu_allowed_buildings_menu.cc (+2/-2)
src/editor/ui_menus/editor_tool_set_terrain_options_menu.cc (+1/-1)
src/io/filesystem/zip_filesystem.cc (+2/-4)
src/logic/critter.cc (+1/-1)
src/logic/production_program.cc (+13/-10)
src/logic/productionsite.cc (+1/-1)
src/logic/soldier.cc (+5/-5)
src/logic/trainingsite.cc (+1/-1)
src/logic/tribe.cc (+1/-1)
src/logic/worker.cc (+2/-2)
src/map_io/coords_profile.cc (+1/-1)
src/map_io/map_allowed_building_types_packet.cc (+4/-3)
src/map_io/map_allowed_worker_types_packet.cc (+4/-3)
src/map_io/map_player_names_and_tribes_packet.cc (+4/-3)
src/map_io/map_player_position_packet.cc (+2/-2)
src/map_io/map_players_messages_packet.cc (+8/-5)
src/map_io/map_players_view_packet.cc (+2/-2)
src/network/nethost.cc (+17/-21)
src/scripting/lua_bases.cc (+4/-2)
src/scripting/lua_map.cc (+4/-2)
src/ui_basic/helpwindow.cc (+2/-5)
src/ui_basic/listselect.cc (+4/-4)
src/ui_basic/listselect.h (+6/-6)
src/ui_fsmenu/editor_mapselect.cc (+4/-5)
src/ui_fsmenu/internet_lobby.cc (+1/-1)
src/ui_fsmenu/launch_mpg.cc (+6/-8)
src/ui_fsmenu/loadgame.cc (+2/-2)
src/ui_fsmenu/loadreplay.cc (+1/-1)
src/ui_fsmenu/options.cc (+3/-3)
src/wlapplication.cc (+1/-1)
src/wui/actionconfirm.cc (+1/-2)
src/wui/encyclopedia_window.cc (+2/-2)
src/wui/game_debug_ui.cc (+3/-3)
src/wui/game_main_menu_save_game.cc (+6/-12)
src/wui/game_objectives_menu.cc (+2/-2)
src/wui/general_statistics_menu.cc (+1/-1)
src/wui/interactive_base.cc (+5/-6)
src/wui/interactive_player.cc (+2/-4)
src/wui/multiplayersetupgroup.cc (+4/-4)
src/wui/plot_area.cc (+2/-2)
Changed in widelands: | |
assignee: | nobody → GunChleoc (gunchleoc) |
status: | Confirmed → In Progress |
Changed in widelands: | |
status: | In Progress → Fix Committed |
Changed in widelands: | |
assignee: | GunChleoc (gunchleoc) → nobody |
Changed in widelands: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The immediate crash is fixed in r7225.
The problem was code like this:
char* b; format( ...).str( ).c_str( );
b = boost::
the problem is that the call to str() will create a std::string() that is then immediately destroyed again. The system is free to reuse the memory that c_str() is pointing to again (since it belonged to the deleted std::string()). In some cases it will do that, in some it will not - that is why the crash happens on some systems but not all.
I grepped through the code base ('format.*c_str') and found more cases where this is happening - note that this is no guarantee that fixing all these removes the problem forever, as code like this is not found but is broken too:
const char* b;
{
std::string a = format().str();
b = a.c_str();
}
// the data b is pointing to is undefined here and should not be used.
But the easily greppable cases must be fixed quickly.