==================WARNING: ThreadSanitizer: data race (pid=17519) Write of size 4 at 0x7b74000e98e8 by main thread: #0 gui2::window::close() src/gui/widgets/window.hpp:185 (wesnoth-debug+0x397376f) #1 gui2::window::set_retval(int, bool) src/gui/widgets/window.hpp:368 (wesnoth-debug+0x39739aa) #2 gui2::button::signal_handler_left_button_click(gui2::event::ui_event, bool&) src/gui/widgets/button.cpp:139 (wesnoth-debug+0x3970bf4) #3 void std::__invoke_impl<void, void (gui2::button::*&)(gui2::event::ui_event, bool&), gui2::button*&, gui2::event::ui_event, bool&>(std::__invoke_memfun_deref, void (gui2::button::*&)(gui2::event::ui_event, bool&), gui2::button*&, gui2::event::ui_event&&, bool&) /usr/include/c++/7/bits/invoke.h:73 (wesnoth-debug+0x397d8a3) #4 std::__invoke_result<void (gui2::button::*&)(gui2::event::ui_event, bool&), gui2::button*&, gui2::event::ui_event, bool&>::type std::__invoke<void (gui2::button::*&)(gui2::event::ui_event, bool&), gui2::button*&, gui2::event::ui_event, bool&>(void (gui2::button::*&)(gui2::event::ui_event, bool&), gui2::button*&, gui2::event::ui_event&&, bool&) /usr/include/c++/7/bits/invoke.h:95 (wesnoth-debug+0x397aa12) #5 void std::_Bind<void (gui2::button::*(gui2::button*, boost::arg<2>, boost::arg<3>))(gui2::event::ui_event, bool&)>::__call<void, gui2::widget&, gui2::event::ui_event&&, bool&, bool&, 0ul, 1ul, 2ul>(std::tuple<gui2::widget&, gui2::event::ui_event&&, bool&, bool&>&&, std::_Index_tuple<0ul, 1ul, 2ul>) /usr/include/c++/7/functional:467 (wesnoth-debug+0x39794ef) #6 void std::_Bind<void (gui2::button::*(gui2::button*, boost::arg<2>, boost::arg<3>))(gui2::event::ui_event, bool&)>::operator()<gui2::widget&, gui2::event::ui_event, bool&, bool&, void>(gui2::widget&, gui2::event::ui_event&&, bool&, bool&) /usr/include/c++/7/functional:551 (wesnoth-debug+0x397778d) #7 std::_Function_handler<void (gui2::widget&, gui2::event::ui_event, bool&, bool&), std::_Bind<void (gui2::button::*(gui2::button*, boost::arg<2>, boost::arg<3>))(gui2::event::ui_event, bool&)> >::_M_invoke(std::_Any_data const&, gui2::widget&, gui2::event::ui_event&&, bool&, bool&) /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x3975c86) #8 std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>::operator()(gui2::widget&, gui2::event::ui_event, bool&, bool&) const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x419b92f) #9 bool gui2::event::implementation::fire_event<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>>(gui2::event::ui_event, std::vector<std::pair<gui2::widget*, gui2::event::ui_event>, std::allocator<std::pair<gui2::widget*, gui2::event::ui_event> > >&, gui2::widget*, gui2::widget*) src/gui/core/event/dispatcher_private.hpp:433 (wesnoth-debug+0x418d093) #10 bool gui2::event::fire_event<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>>(gui2::event::ui_event, gui2::event::dispatcher*, gui2::widget*) src/gui/core/event/dispatcher_private.hpp:505 (wesnoth-debug+0x4188975) #11 gui2::event::dispatcher::fire(gui2::event::ui_event, gui2::widget&) src/gui/core/event/dispatcher.cpp:137 (wesnoth-debug+0x418260d) #12 gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::mouse_button_click(gui2::widget*) <null> (wesnoth-debug+0x41fae4e) #13 gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::signal_handler_sdl_button_up(gui2::event::ui_event, bool&, point const&) src/gui/core/event/distributor.cpp:490 (wesnoth-debug+0x41e6ae9) #14 void std::__invoke_impl<void, void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*&)(gui2::event::ui_event, bool&, point const&), gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*&, gui2::event::ui_event, bool&, point const&>(std::__invoke_memfun_deref, void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*&)(gui2::event::ui_event, bool&, point const&), gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*&, gui2::event::ui_event&&, bool&, point const&) /usr/include/c++/7/bits/invoke.h:73 (wesnoth-debug+0x420acf7) #15 std::__invoke_result<void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*&)(gui2::event::ui_event, bool&, point const&), gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*&, gui2::event::ui_event, bool&, point const&>::type std::__invoke<void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*&)(gui2::event::ui_event, bool&, point const&), gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*&, gui2::event::ui_event, bool&, point const&>(void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*&)(gui2::event::ui_event, bool&, point const&), gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*&, gui2::event::ui_event&&, bool&, point const&) /usr/include/c++/7/bits/invoke.h:95 (wesnoth-debug+0x42089bb) #16 void std::_Bind<void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*(gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*, boost::arg<2>, boost::arg<3>, boost::arg<5>))(gui2::event::ui_event, bool&, point const&)>::__call<void, gui2::widget&, gui2::event::ui_event&&, bool&, bool&, point const&, 0ul, 1ul, 2ul, 3ul>(std::tuple<gui2::widget&, gui2::event::ui_event&&, bool&, bool&, point const&>&&, std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) /usr/include/c++/7/functional:467 (wesnoth-debug+0x42065e4) #17 void std::_Bind<void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*(gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*, boost::arg<2>, boost::arg<3>, boost::arg<5>))(gui2::event::ui_event, bool&, point const&)>::operator()<gui2::widget&, gui2::event::ui_event, bool&, bool&, point const&, void>(gui2::widget&, gui2::event::ui_event&&, bool&, bool&, point const&) /usr/include/c++/7/functional:551 (wesnoth-debug+0x420359c) #18 std::_Function_handler<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, point const&), std::_Bind<void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*(gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*, boost::arg<2>, boost::arg<3>, boost::arg<5>))(gui2::event::ui_event, bool&, point const&)> >::_M_invoke(std::_Any_data const&, gui2::widget&, gui2::event::ui_event&&, bool&, bool&, point const&) <null> (wesnoth-debug+0x41f9b33) #19 std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, point const&)>::operator()(gui2::widget&, gui2::event::ui_event, bool&, bool&, point const&) const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x419c484) #20 bool gui2::event::implementation::fire_event<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, point const&)>, point const&>(gui2::event::ui_event, std::vector<std::pair<gui2::widget*, gui2::event::ui_event>, std::allocator<std::pair<gui2::widget*, gui2::event::ui_event> > >&, gui2::widget*, gui2::widget*, point const&) src/gui/core/event/dispatcher_private.hpp:433 (wesnoth-debug+0x418e5e9) #21 bool gui2::event::fire_event<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, point const&)>, point const&>(gui2::event::ui_event, gui2::event::dispatcher*, gui2::widget*, point const&) src/gui/core/event/dispatcher_private.hpp:505 (wesnoth-debug+0x4188b13) #22 gui2::event::dispatcher::fire(gui2::event::ui_event, gui2::widget&, point const&) src/gui/core/event/dispatcher.cpp:144 (wesnoth-debug+0x41826a1) #23 gui2::event::sdl_event_handler::mouse(gui2::event::ui_event, point const&) src/gui/core/event/handler.cpp:586 (wesnoth-debug+0x4211330) #24 gui2::event::sdl_event_handler::mouse_button_up(point const&, unsigned char) src/gui/core/event/handler.cpp:605 (wesnoth-debug+0x4211998) #25 gui2::event::sdl_event_handler::handle_event(SDL_Event const&) src/gui/core/event/handler.cpp:369 (wesnoth-debug+0x420cf69) #26 events::pump() src/events.cpp:616 (wesnoth-debug+0x66b7ec5) #27 gui2::window::show(bool, unsigned int) src/gui/widgets/window.cpp:550 (wesnoth-debug+0x3c45f56) #28 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:89 (wesnoth-debug+0x42a2669) #29 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #30 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #31 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #32 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #33 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #34 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #35 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #36 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #37 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) Previous read of size 4 at 0x7b74000e98e8 by thread T11: #0 gui2::window::show(bool, unsigned int) src/gui/widgets/window.cpp:567 (wesnoth-debug+0x3c461ac) #1 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:255 (wesnoth-debug+0x4a8f910) #2 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #3 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #4 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #5 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #6 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #7 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #8 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #9 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #10 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #11 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #12 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #13 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #14 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #15 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #16 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #17 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #18 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #19 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #20 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #21 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #22 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #23 <null> <null> (libboost_thread.so.1.62.0+0x11f95) As if synchronized via sleep: #0 nanosleep <null> (libtsan.so.0+0x49490) #1 <null> <null> (libSDL2-2.0.so.0+0xdd914) #2 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:89 (wesnoth-debug+0x42a2669) #3 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #4 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #5 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #6 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #7 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #8 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #9 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #10 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #11 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) Location is heap block of size 2496 at 0x7b74000e9200 allocated by thread T11: #0 operator new(unsigned long) <null> (libtsan.so.0+0x6f14a) #1 gui2::build(gui2::builder_window::window_resolution const*) src/gui/core/window_builder.cpp:53 (wesnoth-debug+0x422ee24) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:248 (wesnoth-debug+0x4a8f770) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #13 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #21 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #24 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Thread T11 (tid=17965, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.62.0+0x112f8) #2 thread<gui2::dialogs::loading_screen::pre_show(gui2::window&)::<lambda()> > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x42771d7) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x4273cf3) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a22fc) #5 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) SUMMARY: ThreadSanitizer: data race src/gui/widgets/window.hpp:185 in gui2::window::close()====================================WARNING: ThreadSanitizer: data race (pid=17519) Write of size 8 at 0x7f376ee863d0 by thread T11: #0 memcpy <null> (libtsan.so.0+0x31065) #1 <null> <null> (libSDL2-2.0.so.0+0x91666) #2 gui2::window::show(bool, unsigned int) src/gui/widgets/window.cpp:599 (wesnoth-debug+0x3c46861) #3 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:255 (wesnoth-debug+0x4a8f910) #4 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #5 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #6 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #7 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #8 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #9 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #10 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #11 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #12 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #13 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #14 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #15 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #16 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #17 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #18 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #19 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #20 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #21 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #22 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #23 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #24 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #25 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Previous write of size 8 at 0x7f376ee863d0 by main thread: #0 memcpy <null> (libtsan.so.0+0x31065) #1 <null> <null> (libSDL2-2.0.so.0+0x91666) #2 gui2::window::draw() src/gui/widgets/window.cpp:743 (wesnoth-debug+0x3c496a2) #3 void std::__invoke_impl<void, void (gui2::window::*&)(), gui2::window*&>(std::__invoke_memfun_deref, void (gui2::window::*&)(), gui2::window*&) /usr/include/c++/7/bits/invoke.h:73 (wesnoth-debug+0x3c9188b) #4 std::__invoke_result<void (gui2::window::*&)(), gui2::window*&>::type std::__invoke<void (gui2::window::*&)(), gui2::window*&>(void (gui2::window::*&)(), gui2::window*&) <null> (wesnoth-debug+0x3c8b9bc) #5 void std::_Bind<void (gui2::window::*(gui2::window*))()>::__call<void, gui2::widget&, gui2::event::ui_event&&, bool&, bool&, 0ul>(std::tuple<gui2::widget&, gui2::event::ui_event&&, bool&, bool&>&&, std::_Index_tuple<0ul>) <null> (wesnoth-debug+0x3c862b9) #6 void std::_Bind<void (gui2::window::*(gui2::window*))()>::operator()<gui2::widget&, gui2::event::ui_event, bool&, bool&, void>(gui2::widget&, gui2::event::ui_event&&, bool&, bool&) /usr/include/c++/7/functional:551 (wesnoth-debug+0x3c7b169) #7 std::_Function_handler<void (gui2::widget&, gui2::event::ui_event, bool&, bool&), std::_Bind<void (gui2::window::*(gui2::window*))()> >::_M_invoke(std::_Any_data const&, gui2::widget&, gui2::event::ui_event&&, bool&, bool&) /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x3c6fa42) #8 std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>::operator()(gui2::widget&, gui2::event::ui_event, bool&, bool&) const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x419b92f) #9 bool gui2::event::implementation::fire_event<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>>(gui2::event::ui_event, std::vector<std::pair<gui2::widget*, gui2::event::ui_event>, std::allocator<std::pair<gui2::widget*, gui2::event::ui_event> > >&, gui2::widget*, gui2::widget*) src/gui/core/event/dispatcher_private.hpp:433 (wesnoth-debug+0x418d093) #10 bool gui2::event::fire_event<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>>(gui2::event::ui_event, gui2::event::dispatcher*, gui2::widget*) src/gui/core/event/dispatcher_private.hpp:505 (wesnoth-debug+0x4188975) #11 gui2::event::dispatcher::fire(gui2::event::ui_event, gui2::widget&) src/gui/core/event/dispatcher.cpp:137 (wesnoth-debug+0x418260d) #12 gui2::event::sdl_event_handler::draw() src/gui/core/event/handler.cpp:537 (wesnoth-debug+0x420fc86) #13 gui2::event::sdl_event_handler::handle_event(SDL_Event const&) src/gui/core/event/handler.cpp:385 (wesnoth-debug+0x420d40f) #14 events::pump() src/events.cpp:616 (wesnoth-debug+0x66b7ec5) #15 gui2::window::show(bool, unsigned int) src/gui/widgets/window.cpp:550 (wesnoth-debug+0x3c45f56) #16 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:89 (wesnoth-debug+0x42a2669) #17 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #18 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #19 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #20 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #21 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #22 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #23 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #24 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #25 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) As if synchronized via sleep: #0 nanosleep <null> (libtsan.so.0+0x49490) #1 <null> <null> (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:255 (wesnoth-debug+0x4a8f910) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #13 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #21 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #24 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 8071680 at 0x7f376ea33000 allocated by main thread: #0 malloc <null> (libtsan.so.0+0x2aa63) #1 <null> <null> (libSDL2-2.0.so.0+0x66932) #2 CVideo::init_window() src/video.cpp:247 (wesnoth-debug+0x6980463) #3 game_launcher::init_video() src/game_launcher.cpp:353 (wesnoth-debug+0x40ea83a) #4 do_gameloop src/wesnoth.cpp:673 (wesnoth-debug+0x3ca25a2) #5 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) Thread T11 (tid=17965, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.62.0+0x112f8) #2 thread<gui2::dialogs::loading_screen::pre_show(gui2::window&)::<lambda()> > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x42771d7) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x4273cf3) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a22fc) #5 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) SUMMARY: ThreadSanitizer: data race (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x31065) in memcpy====================================WARNING: ThreadSanitizer: data race (pid=17519) Read of size 4 at 0x7b74000e98f0 by thread T11: #0 gui2::window::show(bool, unsigned int) src/gui/widgets/window.cpp:607 (wesnoth-debug+0x3c46d40) #1 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:255 (wesnoth-debug+0x4a8f910) #2 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #3 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #4 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #5 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #6 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #7 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #8 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #9 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #10 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #11 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #12 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #13 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #14 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #15 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #16 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #17 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #18 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #19 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #20 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #21 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #22 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #23 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Previous write of size 4 at 0x7b74000e98f0 by main thread: #0 gui2::window::set_retval(int, bool) src/gui/widgets/window.hpp:366 (wesnoth-debug+0x397389f) #1 gui2::button::signal_handler_left_button_click(gui2::event::ui_event, bool&) src/gui/widgets/button.cpp:139 (wesnoth-debug+0x3970bf4) #2 void std::__invoke_impl<void, void (gui2::button::*&)(gui2::event::ui_event, bool&), gui2::button*&, gui2::event::ui_event, bool&>(std::__invoke_memfun_deref, void (gui2::button::*&)(gui2::event::ui_event, bool&), gui2::button*&, gui2::event::ui_event&&, bool&) /usr/include/c++/7/bits/invoke.h:73 (wesnoth-debug+0x397d8a3) #3 std::__invoke_result<void (gui2::button::*&)(gui2::event::ui_event, bool&), gui2::button*&, gui2::event::ui_event, bool&>::type std::__invoke<void (gui2::button::*&)(gui2::event::ui_event, bool&), gui2::button*&, gui2::event::ui_event, bool&>(void (gui2::button::*&)(gui2::event::ui_event, bool&), gui2::button*&, gui2::event::ui_event&&, bool&) /usr/include/c++/7/bits/invoke.h:95 (wesnoth-debug+0x397aa12) #4 void std::_Bind<void (gui2::button::*(gui2::button*, boost::arg<2>, boost::arg<3>))(gui2::event::ui_event, bool&)>::__call<void, gui2::widget&, gui2::event::ui_event&&, bool&, bool&, 0ul, 1ul, 2ul>(std::tuple<gui2::widget&, gui2::event::ui_event&&, bool&, bool&>&&, std::_Index_tuple<0ul, 1ul, 2ul>) /usr/include/c++/7/functional:467 (wesnoth-debug+0x39794ef) #5 void std::_Bind<void (gui2::button::*(gui2::button*, boost::arg<2>, boost::arg<3>))(gui2::event::ui_event, bool&)>::operator()<gui2::widget&, gui2::event::ui_event, bool&, bool&, void>(gui2::widget&, gui2::event::ui_event&&, bool&, bool&) /usr/include/c++/7/functional:551 (wesnoth-debug+0x397778d) #6 std::_Function_handler<void (gui2::widget&, gui2::event::ui_event, bool&, bool&), std::_Bind<void (gui2::button::*(gui2::button*, boost::arg<2>, boost::arg<3>))(gui2::event::ui_event, bool&)> >::_M_invoke(std::_Any_data const&, gui2::widget&, gui2::event::ui_event&&, bool&, bool&) /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x3975c86) #7 std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>::operator()(gui2::widget&, gui2::event::ui_event, bool&, bool&) const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x419b92f) #8 bool gui2::event::implementation::fire_event<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>>(gui2::event::ui_event, std::vector<std::pair<gui2::widget*, gui2::event::ui_event>, std::allocator<std::pair<gui2::widget*, gui2::event::ui_event> > >&, gui2::widget*, gui2::widget*) src/gui/core/event/dispatcher_private.hpp:433 (wesnoth-debug+0x418d093) #9 bool gui2::event::fire_event<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>>(gui2::event::ui_event, gui2::event::dispatcher*, gui2::widget*) src/gui/core/event/dispatcher_private.hpp:505 (wesnoth-debug+0x4188975) #10 gui2::event::dispatcher::fire(gui2::event::ui_event, gui2::widget&) src/gui/core/event/dispatcher.cpp:137 (wesnoth-debug+0x418260d) #11 gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::mouse_button_click(gui2::widget*) <null> (wesnoth-debug+0x41fae4e) #12 gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::signal_handler_sdl_button_up(gui2::event::ui_event, bool&, point const&) src/gui/core/event/distributor.cpp:490 (wesnoth-debug+0x41e6ae9) #13 void std::__invoke_impl<void, void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*&)(gui2::event::ui_event, bool&, point const&), gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*&, gui2::event::ui_event, bool&, point const&>(std::__invoke_memfun_deref, void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*&)(gui2::event::ui_event, bool&, point const&), gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*&, gui2::event::ui_event&&, bool&, point const&) /usr/include/c++/7/bits/invoke.h:73 (wesnoth-debug+0x420acf7) #14 std::__invoke_result<void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*&)(gui2::event::ui_event, bool&, point const&), gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*&, gui2::event::ui_event, bool&, point const&>::type std::__invoke<void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*&)(gui2::event::ui_event, bool&, point const&), gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*&, gui2::event::ui_event, bool&, point const&>(void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*&)(gui2::event::ui_event, bool&, point const&), gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*&, gui2::event::ui_event&&, bool&, point const&) /usr/include/c++/7/bits/invoke.h:95 (wesnoth-debug+0x42089bb) #15 void std::_Bind<void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*(gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*, boost::arg<2>, boost::arg<3>, boost::arg<5>))(gui2::event::ui_event, bool&, point const&)>::__call<void, gui2::widget&, gui2::event::ui_event&&, bool&, bool&, point const&, 0ul, 1ul, 2ul, 3ul>(std::tuple<gui2::widget&, gui2::event::ui_event&&, bool&, bool&, point const&>&&, std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) /usr/include/c++/7/functional:467 (wesnoth-debug+0x42065e4) #16 void std::_Bind<void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*(gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*, boost::arg<2>, boost::arg<3>, boost::arg<5>))(gui2::event::ui_event, bool&, point const&)>::operator()<gui2::widget&, gui2::event::ui_event, bool&, bool&, point const&, void>(gui2::widget&, gui2::event::ui_event&&, bool&, bool&, point const&) /usr/include/c++/7/functional:551 (wesnoth-debug+0x420359c) #17 std::_Function_handler<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, point const&), std::_Bind<void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*(gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*, boost::arg<2>, boost::arg<3>, boost::arg<5>))(gui2::event::ui_event, bool&, point const&)> >::_M_invoke(std::_Any_data const&, gui2::widget&, gui2::event::ui_event&&, bool&, bool&, point const&) <null> (wesnoth-debug+0x41f9b33) #18 std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, point const&)>::operator()(gui2::widget&, gui2::event::ui_event, bool&, bool&, point const&) const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x419c484) #19 bool gui2::event::implementation::fire_event<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, point const&)>, point const&>(gui2::event::ui_event, std::vector<std::pair<gui2::widget*, gui2::event::ui_event>, std::allocator<std::pair<gui2::widget*, gui2::event::ui_event> > >&, gui2::widget*, gui2::widget*, point const&) src/gui/core/event/dispatcher_private.hpp:433 (wesnoth-debug+0x418e5e9) #20 bool gui2::event::fire_event<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, point const&)>, point const&>(gui2::event::ui_event, gui2::event::dispatcher*, gui2::widget*, point const&) src/gui/core/event/dispatcher_private.hpp:505 (wesnoth-debug+0x4188b13) #21 gui2::event::dispatcher::fire(gui2::event::ui_event, gui2::widget&, point const&) src/gui/core/event/dispatcher.cpp:144 (wesnoth-debug+0x41826a1) #22 gui2::event::sdl_event_handler::mouse(gui2::event::ui_event, point const&) src/gui/core/event/handler.cpp:586 (wesnoth-debug+0x4211330) #23 gui2::event::sdl_event_handler::mouse_button_up(point const&, unsigned char) src/gui/core/event/handler.cpp:605 (wesnoth-debug+0x4211998) #24 gui2::event::sdl_event_handler::handle_event(SDL_Event const&) src/gui/core/event/handler.cpp:369 (wesnoth-debug+0x420cf69) #25 events::pump() src/events.cpp:616 (wesnoth-debug+0x66b7ec5) #26 gui2::window::show(bool, unsigned int) src/gui/widgets/window.cpp:550 (wesnoth-debug+0x3c45f56) #27 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:89 (wesnoth-debug+0x42a2669) #28 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #29 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #30 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #31 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #32 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #33 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #34 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #35 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #36 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) As if synchronized via sleep: #0 nanosleep <null> (libtsan.so.0+0x49490) #1 <null> <null> (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:255 (wesnoth-debug+0x4a8f910) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #13 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #21 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #24 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 2496 at 0x7b74000e9200 allocated by thread T11: #0 operator new(unsigned long) <null> (libtsan.so.0+0x6f14a) #1 gui2::build(gui2::builder_window::window_resolution const*) src/gui/core/window_builder.cpp:53 (wesnoth-debug+0x422ee24) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:248 (wesnoth-debug+0x4a8f770) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #13 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #21 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #24 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Thread T11 (tid=17965, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.62.0+0x112f8) #2 thread<gui2::dialogs::loading_screen::pre_show(gui2::window&)::<lambda()> > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x42771d7) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x4273cf3) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a22fc) #5 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) SUMMARY: ThreadSanitizer: data race src/gui/widgets/window.cpp:607 in gui2::window::show(bool, unsigned int)====================================WARNING: ThreadSanitizer: data race on vptr (ctor/dtor vs virtual call) (pid=17519) Write of size 8 at 0x7b7000134810 by thread T11: #0 gui2::scrollbar_container::~scrollbar_container() src/gui/widgets/scrollbar_container.hpp:56 (wesnoth-debug+0x3a413a1) #1 gui2::scrollbar_panel::~scrollbar_panel() src/gui/widgets/scrollbar_panel.hpp:38 (wesnoth-debug+0x3b32bde) #2 gui2::scrollbar_panel::~scrollbar_panel() src/gui/widgets/scrollbar_panel.hpp:38 (wesnoth-debug+0x3b32c3d) #3 std::default_delete<gui2::widget>::operator()(gui2::widget*) const /usr/include/c++/7/bits/unique_ptr.h:78 (wesnoth-debug+0x3c6db0d) #4 std::unique_ptr<gui2::widget, std::default_delete<gui2::widget> >::reset(gui2::widget*) /usr/include/c++/7/bits/unique_ptr.h:376 (wesnoth-debug+0x46c5b7e) #5 gui2::grid::child::set_widget(gui2::widget*) src/gui/widgets/grid.hpp:412 (wesnoth-debug+0x46c51eb) #6 gui2::grid::remove_child(unsigned int, unsigned int) src/gui/widgets/grid.cpp:145 (wesnoth-debug+0x46a75f8) #7 gui2::window::~window() src/gui/widgets/window.cpp:403 (wesnoth-debug+0x3c43764) #8 gui2::window::~window() src/gui/widgets/window.cpp:425 (wesnoth-debug+0x3c43e73) #9 std::default_delete<gui2::window>::operator()(gui2::window*) const /usr/include/c++/7/bits/unique_ptr.h:78 (wesnoth-debug+0x42af87f) #10 std::unique_ptr<gui2::window, std::default_delete<gui2::window> >::~unique_ptr() /usr/include/c++/7/bits/unique_ptr.h:268 (wesnoth-debug+0x42ac469) #11 ~scoped_dialog src/scripting/lua_gui2.cpp:106 (wesnoth-debug+0x4a8dc73) #12 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:248 (wesnoth-debug+0x4a8f994) #13 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #14 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #15 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #16 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #17 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #18 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #19 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #20 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #21 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #22 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #23 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #24 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #25 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #26 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #27 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #28 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #29 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #30 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #31 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #32 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #33 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #34 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Previous read of size 8 at 0x7b7000134810 by main thread: #0 std::vector<std::pair<gui2::widget*, gui2::event::ui_event>, std::allocator<std::pair<gui2::widget*, gui2::event::ui_event> > > gui2::event::implementation::build_event_chain<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, point const&)> >(gui2::event::ui_event, gui2::widget*, gui2::widget*) src/gui/core/event/dispatcher_private.hpp:310 (wesnoth-debug+0x418db57) #1 bool gui2::event::fire_event<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, point const&)>, point const&>(gui2::event::ui_event, gui2::event::dispatcher*, gui2::widget*, point const&) src/gui/core/event/dispatcher_private.hpp:502 (wesnoth-debug+0x4188ac6) #2 gui2::event::dispatcher::fire(gui2::event::ui_event, gui2::widget&, point const&) src/gui/core/event/dispatcher.cpp:144 (wesnoth-debug+0x41826a1) #3 gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::signal_handler_sdl_button_up(gui2::event::ui_event, bool&, point const&) src/gui/core/event/distributor.cpp:474 (wesnoth-debug+0x41e59b3) #4 void std::__invoke_impl<void, void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*&)(gui2::event::ui_event, bool&, point const&), gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*&, gui2::event::ui_event, bool&, point const&>(std::__invoke_memfun_deref, void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*&)(gui2::event::ui_event, bool&, point const&), gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*&, gui2::event::ui_event&&, bool&, point const&) /usr/include/c++/7/bits/invoke.h:73 (wesnoth-debug+0x420acf7) #5 std::__invoke_result<void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*&)(gui2::event::ui_event, bool&, point const&), gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*&, gui2::event::ui_event, bool&, point const&>::type std::__invoke<void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*&)(gui2::event::ui_event, bool&, point const&), gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*&, gui2::event::ui_event, bool&, point const&>(void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*&)(gui2::event::ui_event, bool&, point const&), gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*&, gui2::event::ui_event&&, bool&, point const&) /usr/include/c++/7/bits/invoke.h:95 (wesnoth-debug+0x42089bb) #6 void std::_Bind<void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*(gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*, boost::arg<2>, boost::arg<3>, boost::arg<5>))(gui2::event::ui_event, bool&, point const&)>::__call<void, gui2::widget&, gui2::event::ui_event&&, bool&, bool&, point const&, 0ul, 1ul, 2ul, 3ul>(std::tuple<gui2::widget&, gui2::event::ui_event&&, bool&, bool&, point const&>&&, std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) /usr/include/c++/7/functional:467 (wesnoth-debug+0x42065e4) #7 void std::_Bind<void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*(gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*, boost::arg<2>, boost::arg<3>, boost::arg<5>))(gui2::event::ui_event, bool&, point const&)>::operator()<gui2::widget&, gui2::event::ui_event, bool&, bool&, point const&, void>(gui2::widget&, gui2::event::ui_event&&, bool&, bool&, point const&) /usr/include/c++/7/functional:551 (wesnoth-debug+0x420359c) #8 std::_Function_handler<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, point const&), std::_Bind<void (gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >::*(gui2::event::mouse_button<gui2::event::mouse_button_event_types_wrapper<(gui2::event::ui_event)8, (gui2::event::ui_event)9, (gui2::event::ui_event)10, (gui2::event::ui_event)11, (gui2::event::ui_event)12, (gui2::event::ui_event)13> >*, boost::arg<2>, boost::arg<3>, boost::arg<5>))(gui2::event::ui_event, bool&, point const&)> >::_M_invoke(std::_Any_data const&, gui2::widget&, gui2::event::ui_event&&, bool&, bool&, point const&) <null> (wesnoth-debug+0x41f9b33) #9 std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, point const&)>::operator()(gui2::widget&, gui2::event::ui_event, bool&, bool&, point const&) const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x419c484) #10 bool gui2::event::implementation::fire_event<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, point const&)>, point const&>(gui2::event::ui_event, std::vector<std::pair<gui2::widget*, gui2::event::ui_event>, std::allocator<std::pair<gui2::widget*, gui2::event::ui_event> > >&, gui2::widget*, gui2::widget*, point const&) src/gui/core/event/dispatcher_private.hpp:433 (wesnoth-debug+0x418e5e9) #11 bool gui2::event::fire_event<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, point const&)>, point const&>(gui2::event::ui_event, gui2::event::dispatcher*, gui2::widget*, point const&) src/gui/core/event/dispatcher_private.hpp:505 (wesnoth-debug+0x4188b13) #12 gui2::event::dispatcher::fire(gui2::event::ui_event, gui2::widget&, point const&) src/gui/core/event/dispatcher.cpp:144 (wesnoth-debug+0x41826a1) #13 gui2::event::sdl_event_handler::mouse(gui2::event::ui_event, point const&) src/gui/core/event/handler.cpp:586 (wesnoth-debug+0x4211330) #14 gui2::event::sdl_event_handler::mouse_button_up(point const&, unsigned char) src/gui/core/event/handler.cpp:605 (wesnoth-debug+0x4211998) #15 gui2::event::sdl_event_handler::handle_event(SDL_Event const&) src/gui/core/event/handler.cpp:369 (wesnoth-debug+0x420cf69) #16 events::pump() src/events.cpp:616 (wesnoth-debug+0x66b7ec5) #17 gui2::window::show(bool, unsigned int) src/gui/widgets/window.cpp:550 (wesnoth-debug+0x3c45f56) #18 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:89 (wesnoth-debug+0x42a2669) #19 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #20 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #21 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #22 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #23 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #24 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #25 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #26 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #27 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) As if synchronized via sleep: #0 nanosleep <null> (libtsan.so.0+0x49490) #1 <null> <null> (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:255 (wesnoth-debug+0x4a8f910) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #13 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #21 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #24 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 1832 at 0x7b7000134800 allocated by thread T11: #0 operator new(unsigned long) <null> (libtsan.so.0+0x6f14a) #1 gui2::implementation::builder_scrollbar_panel::build() const src/gui/widgets/scrollbar_panel.cpp:154 (wesnoth-debug+0x3b29a0c) #2 gui2::builder_grid::build(gui2::grid*) const src/gui/core/window_builder.cpp:475 (wesnoth-debug+0x4237e9b) #3 gui2::container_base::init_grid(std::shared_ptr<gui2::builder_grid> const&) src/gui/widgets/container_base.cpp:272 (wesnoth-debug+0x439318b) #4 gui2::build(gui2::builder_window::window_resolution const*) src/gui/core/window_builder.cpp:72 (wesnoth-debug+0x422f777) #5 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:248 (wesnoth-debug+0x4a8f770) #6 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #7 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #8 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #9 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #10 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #11 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #12 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #13 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #14 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #15 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #16 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #17 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #18 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #19 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #20 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #21 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #22 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #23 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #24 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #25 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #26 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #27 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Thread T11 (tid=17965, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.62.0+0x112f8) #2 thread<gui2::dialogs::loading_screen::pre_show(gui2::window&)::<lambda()> > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x42771d7) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x4273cf3) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a22fc) #5 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) SUMMARY: ThreadSanitizer: data race on vptr (ctor/dtor vs virtual call) src/gui/widgets/scrollbar_container.hpp:56 in gui2::scrollbar_container::~scrollbar_container()====================================WARNING: ThreadSanitizer: data race on vptr (ctor/dtor vs virtual call) (pid=17519) Write of size 8 at 0x7b64000fa000 by thread T11: #0 gui2::styled_widget::~styled_widget() src/gui/widgets/styled_widget.hpp:34 (wesnoth-debug+0x393ee8d) #1 gui2::label::~label() src/gui/widgets/label.hpp:32 (wesnoth-debug+0x3a1309c) #2 gui2::label::~label() src/gui/widgets/label.hpp:32 (wesnoth-debug+0x3a130fb) #3 std::default_delete<gui2::widget>::operator()(gui2::widget*) const /usr/include/c++/7/bits/unique_ptr.h:78 (wesnoth-debug+0x3c6db0d) #4 std::unique_ptr<gui2::widget, std::default_delete<gui2::widget> >::~unique_ptr() /usr/include/c++/7/bits/unique_ptr.h:268 (wesnoth-debug+0x3c62d1f) #5 gui2::grid::child::~child() src/gui/widgets/grid.hpp:328 (wesnoth-debug+0x46cfa22) #6 void std::_Destroy<gui2::grid::child>(gui2::grid::child*) /usr/include/c++/7/bits/stl_construct.h:98 (wesnoth-debug+0x46cfa9b) #7 void std::_Destroy_aux<false>::__destroy<gui2::grid::child*>(gui2::grid::child*, gui2::grid::child*) <null> (wesnoth-debug+0x46cec9b) #8 void std::_Destroy<gui2::grid::child*>(gui2::grid::child*, gui2::grid::child*) <null> (wesnoth-debug+0x46cd6b4) #9 void std::_Destroy<gui2::grid::child*, gui2::grid::child>(gui2::grid::child*, gui2::grid::child*, std::allocator<gui2::grid::child>&) /usr/include/c++/7/bits/stl_construct.h:206 (wesnoth-debug+0x46ca195) #10 std::vector<gui2::grid::child, std::allocator<gui2::grid::child> >::~vector() /usr/include/c++/7/bits/stl_vector.h:434 (wesnoth-debug+0x46c6524) #11 gui2::grid::~grid() src/gui/widgets/grid.cpp:54 (wesnoth-debug+0x46a57de) #12 gui2::grid::~grid() src/gui/widgets/grid.cpp:56 (wesnoth-debug+0x46a59f7) #13 std::default_delete<gui2::widget>::operator()(gui2::widget*) const /usr/include/c++/7/bits/unique_ptr.h:78 (wesnoth-debug+0x3c6db0d) #14 std::unique_ptr<gui2::widget, std::default_delete<gui2::widget> >::~unique_ptr() /usr/include/c++/7/bits/unique_ptr.h:268 (wesnoth-debug+0x3c62d1f) #15 gui2::grid::child::~child() src/gui/widgets/grid.hpp:328 (wesnoth-debug+0x46cfa22) #16 void std::_Destroy<gui2::grid::child>(gui2::grid::child*) /usr/include/c++/7/bits/stl_construct.h:98 (wesnoth-debug+0x46cfa9b) #17 void std::_Destroy_aux<false>::__destroy<gui2::grid::child*>(gui2::grid::child*, gui2::grid::child*) <null> (wesnoth-debug+0x46cec9b) #18 void std::_Destroy<gui2::grid::child*>(gui2::grid::child*, gui2::grid::child*) <null> (wesnoth-debug+0x46cd6b4) #19 void std::_Destroy<gui2::grid::child*, gui2::grid::child>(gui2::grid::child*, gui2::grid::child*, std::allocator<gui2::grid::child>&) /usr/include/c++/7/bits/stl_construct.h:206 (wesnoth-debug+0x46ca195) #20 std::vector<gui2::grid::child, std::allocator<gui2::grid::child> >::~vector() /usr/include/c++/7/bits/stl_vector.h:434 (wesnoth-debug+0x46c6524) #21 gui2::grid::~grid() src/gui/widgets/grid.cpp:54 (wesnoth-debug+0x46a57de) #22 gui2::grid::~grid() src/gui/widgets/grid.cpp:56 (wesnoth-debug+0x46a59f7) #23 std::default_delete<gui2::grid>::operator()(gui2::grid*) const /usr/include/c++/7/bits/unique_ptr.h:78 (wesnoth-debug+0x3a49075) #24 std::unique_ptr<gui2::grid, std::default_delete<gui2::grid> >::~unique_ptr() /usr/include/c++/7/bits/unique_ptr.h:268 (wesnoth-debug+0x3a431af) #25 gui2::scrollbar_container::~scrollbar_container() src/gui/widgets/scrollbar_container.hpp:56 (wesnoth-debug+0x3a413de) #26 gui2::scrollbar_panel::~scrollbar_panel() src/gui/widgets/scrollbar_panel.hpp:38 (wesnoth-debug+0x3b32bde) #27 gui2::scrollbar_panel::~scrollbar_panel() src/gui/widgets/scrollbar_panel.hpp:38 (wesnoth-debug+0x3b32c3d) #28 std::default_delete<gui2::widget>::operator()(gui2::widget*) const /usr/include/c++/7/bits/unique_ptr.h:78 (wesnoth-debug+0x3c6db0d) #29 std::unique_ptr<gui2::widget, std::default_delete<gui2::widget> >::reset(gui2::widget*) /usr/include/c++/7/bits/unique_ptr.h:376 (wesnoth-debug+0x46c5b7e) #30 gui2::grid::child::set_widget(gui2::widget*) src/gui/widgets/grid.hpp:412 (wesnoth-debug+0x46c51eb) #31 gui2::grid::remove_child(unsigned int, unsigned int) src/gui/widgets/grid.cpp:145 (wesnoth-debug+0x46a75f8) #32 gui2::window::~window() src/gui/widgets/window.cpp:403 (wesnoth-debug+0x3c43764) #33 gui2::window::~window() src/gui/widgets/window.cpp:425 (wesnoth-debug+0x3c43e73) #34 std::default_delete<gui2::window>::operator()(gui2::window*) const /usr/include/c++/7/bits/unique_ptr.h:78 (wesnoth-debug+0x42af87f) #35 std::unique_ptr<gui2::window, std::default_delete<gui2::window> >::~unique_ptr() /usr/include/c++/7/bits/unique_ptr.h:268 (wesnoth-debug+0x42ac469) #36 ~scoped_dialog src/scripting/lua_gui2.cpp:106 (wesnoth-debug+0x4a8dc73) #37 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:248 (wesnoth-debug+0x4a8f994) #38 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #39 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #40 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #41 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #42 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #43 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #44 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #45 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #46 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #47 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #48 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #49 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #50 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #51 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #52 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #53 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #54 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #55 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #56 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #57 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #58 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #59 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Previous read of size 8 at 0x7b64000fa000 by main thread: #0 gui2::grid::layout_children() src/gui/widgets/grid.cpp:623 (wesnoth-debug+0x46b6911) #1 gui2::grid::layout_children() src/gui/widgets/grid.cpp:623 (wesnoth-debug+0x46b6a05) #2 gui2::scrollbar_container::layout_children() src/gui/widgets/scrollbar_container.cpp:804 (wesnoth-debug+0x4723220) #3 gui2::grid::layout_children() src/gui/widgets/grid.cpp:623 (wesnoth-debug+0x46b6a05) #4 gui2::container_base::layout_children() src/gui/widgets/container_base.cpp:209 (wesnoth-debug+0x43919dc) #5 gui2::window::draw() src/gui/widgets/window.cpp:650 (wesnoth-debug+0x3c48312) #6 void std::__invoke_impl<void, void (gui2::window::*&)(), gui2::window*&>(std::__invoke_memfun_deref, void (gui2::window::*&)(), gui2::window*&) /usr/include/c++/7/bits/invoke.h:73 (wesnoth-debug+0x3c9188b) #7 std::__invoke_result<void (gui2::window::*&)(), gui2::window*&>::type std::__invoke<void (gui2::window::*&)(), gui2::window*&>(void (gui2::window::*&)(), gui2::window*&) <null> (wesnoth-debug+0x3c8b9bc) #8 void std::_Bind<void (gui2::window::*(gui2::window*))()>::__call<void, gui2::widget&, gui2::event::ui_event&&, bool&, bool&, 0ul>(std::tuple<gui2::widget&, gui2::event::ui_event&&, bool&, bool&>&&, std::_Index_tuple<0ul>) <null> (wesnoth-debug+0x3c862b9) #9 void std::_Bind<void (gui2::window::*(gui2::window*))()>::operator()<gui2::widget&, gui2::event::ui_event, bool&, bool&, void>(gui2::widget&, gui2::event::ui_event&&, bool&, bool&) /usr/include/c++/7/functional:551 (wesnoth-debug+0x3c7b169) #10 std::_Function_handler<void (gui2::widget&, gui2::event::ui_event, bool&, bool&), std::_Bind<void (gui2::window::*(gui2::window*))()> >::_M_invoke(std::_Any_data const&, gui2::widget&, gui2::event::ui_event&&, bool&, bool&) /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x3c6fa42) #11 std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>::operator()(gui2::widget&, gui2::event::ui_event, bool&, bool&) const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x419b92f) #12 bool gui2::event::implementation::fire_event<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>>(gui2::event::ui_event, std::vector<std::pair<gui2::widget*, gui2::event::ui_event>, std::allocator<std::pair<gui2::widget*, gui2::event::ui_event> > >&, gui2::widget*, gui2::widget*) src/gui/core/event/dispatcher_private.hpp:433 (wesnoth-debug+0x418d093) #13 bool gui2::event::fire_event<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>>(gui2::event::ui_event, gui2::event::dispatcher*, gui2::widget*) src/gui/core/event/dispatcher_private.hpp:505 (wesnoth-debug+0x4188975) #14 gui2::event::dispatcher::fire(gui2::event::ui_event, gui2::widget&) src/gui/core/event/dispatcher.cpp:137 (wesnoth-debug+0x418260d) #15 gui2::event::sdl_event_handler::draw() src/gui/core/event/handler.cpp:537 (wesnoth-debug+0x420fc86) #16 gui2::event::sdl_event_handler::handle_event(SDL_Event const&) src/gui/core/event/handler.cpp:385 (wesnoth-debug+0x420d40f) #17 events::pump() src/events.cpp:616 (wesnoth-debug+0x66b7ec5) #18 gui2::window::show(bool, unsigned int) src/gui/widgets/window.cpp:550 (wesnoth-debug+0x3c45f56) #19 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:89 (wesnoth-debug+0x42a2669) #20 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #21 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #22 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #23 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #24 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #25 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #26 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #27 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #28 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) As if synchronized via sleep: #0 nanosleep <null> (libtsan.so.0+0x49490) #1 <null> <null> (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:255 (wesnoth-debug+0x4a8f910) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #13 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #21 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #24 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 1040 at 0x7b64000fa000 allocated by thread T11: #0 operator new(unsigned long) <null> (libtsan.so.0+0x6f14a) #1 gui2::implementation::builder_label::build() const src/gui/widgets/label.cpp:319 (wesnoth-debug+0x3a07af2) #2 gui2::builder_grid::build(gui2::grid*) const src/gui/core/window_builder.cpp:475 (wesnoth-debug+0x4237e9b) #3 gui2::builder_grid::build() const src/gui/core/window_builder.cpp:443 (wesnoth-debug+0x42367ae) #4 gui2::window::finalize(std::shared_ptr<gui2::builder_grid> const&) src/gui/widgets/window.cpp:1191 (wesnoth-debug+0x3c53886) #5 gui2::build(gui2::builder_window::window_resolution const*) src/gui/core/window_builder.cpp:73 (wesnoth-debug+0x422f89b) #6 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:248 (wesnoth-debug+0x4a8f770) #7 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #8 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #9 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #10 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #11 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #12 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #13 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #14 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #15 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #16 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #17 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #18 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #19 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #20 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #21 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #22 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #23 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #24 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #25 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #26 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #27 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #28 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Thread T11 (tid=17965, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.62.0+0x112f8) #2 thread<gui2::dialogs::loading_screen::pre_show(gui2::window&)::<lambda()> > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x42771d7) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x4273cf3) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a22fc) #5 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) SUMMARY: ThreadSanitizer: data race on vptr (ctor/dtor vs virtual call) src/gui/widgets/styled_widget.hpp:34 in gui2::styled_widget::~styled_widget()====================================WARNING: ThreadSanitizer: data race on vptr (ctor/dtor vs virtual call) (pid=17519) Write of size 8 at 0x7b74000e9200 by thread T11: #0 gui2::panel::~panel() src/gui/widgets/panel.hpp:37 (wesnoth-debug+0x3aef13b) #1 gui2::window::~window() src/gui/widgets/window.cpp:392 (wesnoth-debug+0x3c43e14) #2 gui2::window::~window() src/gui/widgets/window.cpp:425 (wesnoth-debug+0x3c43e73) #3 std::default_delete<gui2::window>::operator()(gui2::window*) const /usr/include/c++/7/bits/unique_ptr.h:78 (wesnoth-debug+0x42af87f) #4 std::unique_ptr<gui2::window, std::default_delete<gui2::window> >::~unique_ptr() /usr/include/c++/7/bits/unique_ptr.h:268 (wesnoth-debug+0x42ac469) #5 ~scoped_dialog src/scripting/lua_gui2.cpp:106 (wesnoth-debug+0x4a8dc73) #6 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:248 (wesnoth-debug+0x4a8f994) #7 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #8 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #9 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #10 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #11 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #12 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #13 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #14 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #15 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #16 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #17 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #18 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #19 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #20 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #21 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #22 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #23 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #24 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #25 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #26 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #27 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #28 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Previous read of size 8 at 0x7b74000e9200 by main thread: #0 void std::__invoke_impl<void, void (gui2::window::*&)(), gui2::window*&>(std::__invoke_memfun_deref, void (gui2::window::*&)(), gui2::window*&) /usr/include/c++/7/bits/invoke.h:73 (wesnoth-debug+0x3c91688) #1 std::__invoke_result<void (gui2::window::*&)(), gui2::window*&>::type std::__invoke<void (gui2::window::*&)(), gui2::window*&>(void (gui2::window::*&)(), gui2::window*&) <null> (wesnoth-debug+0x3c8b9bc) #2 void std::_Bind<void (gui2::window::*(gui2::window*))()>::__call<void, gui2::widget&, gui2::event::ui_event&&, bool&, bool&, 0ul>(std::tuple<gui2::widget&, gui2::event::ui_event&&, bool&, bool&>&&, std::_Index_tuple<0ul>) <null> (wesnoth-debug+0x3c862b9) #3 void std::_Bind<void (gui2::window::*(gui2::window*))()>::operator()<gui2::widget&, gui2::event::ui_event, bool&, bool&, void>(gui2::widget&, gui2::event::ui_event&&, bool&, bool&) /usr/include/c++/7/functional:551 (wesnoth-debug+0x3c7b169) #4 std::_Function_handler<void (gui2::widget&, gui2::event::ui_event, bool&, bool&), std::_Bind<void (gui2::window::*(gui2::window*))()> >::_M_invoke(std::_Any_data const&, gui2::widget&, gui2::event::ui_event&&, bool&, bool&) /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x3c6fa42) #5 std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>::operator()(gui2::widget&, gui2::event::ui_event, bool&, bool&) const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x419b92f) #6 bool gui2::event::implementation::fire_event<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>>(gui2::event::ui_event, std::vector<std::pair<gui2::widget*, gui2::event::ui_event>, std::allocator<std::pair<gui2::widget*, gui2::event::ui_event> > >&, gui2::widget*, gui2::widget*) src/gui/core/event/dispatcher_private.hpp:433 (wesnoth-debug+0x418d093) #7 bool gui2::event::fire_event<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>>(gui2::event::ui_event, gui2::event::dispatcher*, gui2::widget*) src/gui/core/event/dispatcher_private.hpp:505 (wesnoth-debug+0x4188975) #8 gui2::event::dispatcher::fire(gui2::event::ui_event, gui2::widget&) src/gui/core/event/dispatcher.cpp:137 (wesnoth-debug+0x418260d) #9 gui2::event::sdl_event_handler::draw() src/gui/core/event/handler.cpp:537 (wesnoth-debug+0x420fc86) #10 gui2::event::sdl_event_handler::handle_event(SDL_Event const&) src/gui/core/event/handler.cpp:385 (wesnoth-debug+0x420d40f) #11 events::pump() src/events.cpp:616 (wesnoth-debug+0x66b7ec5) #12 gui2::window::show(bool, unsigned int) src/gui/widgets/window.cpp:550 (wesnoth-debug+0x3c45f56) #13 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:89 (wesnoth-debug+0x42a2669) #14 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #15 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #16 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #17 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #18 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #19 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #20 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #21 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #22 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) Location is heap block of size 2496 at 0x7b74000e9200 allocated by thread T11: #0 operator new(unsigned long) <null> (libtsan.so.0+0x6f14a) #1 gui2::build(gui2::builder_window::window_resolution const*) src/gui/core/window_builder.cpp:53 (wesnoth-debug+0x422ee24) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:248 (wesnoth-debug+0x4a8f770) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #13 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #21 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #24 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Thread T11 (tid=17965, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.62.0+0x112f8) #2 thread<gui2::dialogs::loading_screen::pre_show(gui2::window&)::<lambda()> > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x42771d7) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x4273cf3) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a22fc) #5 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) SUMMARY: ThreadSanitizer: data race on vptr (ctor/dtor vs virtual call) src/gui/widgets/panel.hpp:37 in gui2::panel::~panel()====================================WARNING: ThreadSanitizer: data race on vptr (ctor/dtor vs virtual call) (pid=17519) Write of size 8 at 0x7b74000e9210 by thread T11: #0 gui2::panel::~panel() src/gui/widgets/panel.hpp:37 (wesnoth-debug+0x3aef181) #1 gui2::window::~window() src/gui/widgets/window.cpp:392 (wesnoth-debug+0x3c43e14) #2 gui2::window::~window() src/gui/widgets/window.cpp:425 (wesnoth-debug+0x3c43e73) #3 std::default_delete<gui2::window>::operator()(gui2::window*) const /usr/include/c++/7/bits/unique_ptr.h:78 (wesnoth-debug+0x42af87f) #4 std::unique_ptr<gui2::window, std::default_delete<gui2::window> >::~unique_ptr() /usr/include/c++/7/bits/unique_ptr.h:268 (wesnoth-debug+0x42ac469) #5 ~scoped_dialog src/scripting/lua_gui2.cpp:106 (wesnoth-debug+0x4a8dc73) #6 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:248 (wesnoth-debug+0x4a8f994) #7 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #8 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #9 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #10 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #11 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #12 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #13 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #14 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #15 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #16 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #17 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #18 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #19 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #20 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #21 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #22 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #23 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #24 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #25 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #26 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #27 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #28 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Previous read of size 8 at 0x7b74000e9210 by main thread: #0 gui2::event::sdl_event_handler::raw_event(SDL_Event const&) src/gui/core/event/handler.cpp:571 (wesnoth-debug+0x4210854) #1 gui2::event::sdl_event_handler::handle_event(SDL_Event const&) src/gui/core/event/handler.cpp:469 (wesnoth-debug+0x420e61b) #2 events::pump() src/events.cpp:616 (wesnoth-debug+0x66b7ec5) #3 gui2::window::show(bool, unsigned int) src/gui/widgets/window.cpp:550 (wesnoth-debug+0x3c45f56) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:89 (wesnoth-debug+0x42a2669) #5 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) Location is heap block of size 2496 at 0x7b74000e9200 allocated by thread T11: #0 operator new(unsigned long) <null> (libtsan.so.0+0x6f14a) #1 gui2::build(gui2::builder_window::window_resolution const*) src/gui/core/window_builder.cpp:53 (wesnoth-debug+0x422ee24) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:248 (wesnoth-debug+0x4a8f770) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #13 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #21 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #24 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Thread T11 (tid=17965, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.62.0+0x112f8) #2 thread<gui2::dialogs::loading_screen::pre_show(gui2::window&)::<lambda()> > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x42771d7) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x4273cf3) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a22fc) #5 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) SUMMARY: ThreadSanitizer: data race on vptr (ctor/dtor vs virtual call) src/gui/widgets/panel.hpp:37 in gui2::panel::~panel()====================================WARNING: ThreadSanitizer: data race (pid=17519) Write of size 1 at 0x7b7400082c38 by thread T11: #0 gui2::widget::set_is_dirty(bool) src/gui/widgets/widget.cpp:465 (wesnoth-debug+0x47cdcec) #1 gui2::event::sdl_event_handler::disconnect(gui2::event::dispatcher*) src/gui/core/event/handler.cpp:509 (wesnoth-debug+0x420f34d) #2 gui2::event::disconnect_dispatcher(gui2::event::dispatcher*) src/gui/core/event/handler.cpp:823 (wesnoth-debug+0x4214f47) #3 gui2::event::dispatcher::~dispatcher() src/gui/core/event/dispatcher.cpp:44 (wesnoth-debug+0x4181d02) #4 gui2::widget::~widget() src/gui/widgets/widget.cpp:74 (wesnoth-debug+0x47c6823) #5 gui2::styled_widget::~styled_widget() src/gui/widgets/styled_widget.hpp:34 (wesnoth-debug+0x393f133) #6 gui2::container_base::~container_base() <null> (wesnoth-debug+0x393f420) #7 gui2::panel::~panel() src/gui/widgets/panel.hpp:37 (wesnoth-debug+0x3aef26e) #8 gui2::window::~window() src/gui/widgets/window.cpp:392 (wesnoth-debug+0x3c43e14) #9 gui2::window::~window() src/gui/widgets/window.cpp:425 (wesnoth-debug+0x3c43e73) #10 std::default_delete<gui2::window>::operator()(gui2::window*) const /usr/include/c++/7/bits/unique_ptr.h:78 (wesnoth-debug+0x42af87f) #11 std::unique_ptr<gui2::window, std::default_delete<gui2::window> >::~unique_ptr() /usr/include/c++/7/bits/unique_ptr.h:268 (wesnoth-debug+0x42ac469) #12 ~scoped_dialog src/scripting/lua_gui2.cpp:106 (wesnoth-debug+0x4a8dc73) #13 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:248 (wesnoth-debug+0x4a8f994) #14 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #15 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #16 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #17 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #18 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #19 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #20 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #21 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #22 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #23 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #24 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #25 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #26 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #27 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #28 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #29 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #30 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #31 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #32 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #33 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #34 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #35 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Previous read of size 1 at 0x7b7400082c38 by main thread: #0 gui2::widget::populate_dirty_list(gui2::window&, std::vector<gui2::widget*, std::allocator<gui2::widget*> >&) src/gui/widgets/widget.cpp:428 (wesnoth-debug+0x47ccdaa) #1 gui2::window::draw() src/gui/widgets/window.cpp:655 (wesnoth-debug+0x3c4847e) #2 void std::__invoke_impl<void, void (gui2::window::*&)(), gui2::window*&>(std::__invoke_memfun_deref, void (gui2::window::*&)(), gui2::window*&) /usr/include/c++/7/bits/invoke.h:73 (wesnoth-debug+0x3c9188b) #3 std::__invoke_result<void (gui2::window::*&)(), gui2::window*&>::type std::__invoke<void (gui2::window::*&)(), gui2::window*&>(void (gui2::window::*&)(), gui2::window*&) <null> (wesnoth-debug+0x3c8b9bc) #4 void std::_Bind<void (gui2::window::*(gui2::window*))()>::__call<void, gui2::widget&, gui2::event::ui_event&&, bool&, bool&, 0ul>(std::tuple<gui2::widget&, gui2::event::ui_event&&, bool&, bool&>&&, std::_Index_tuple<0ul>) <null> (wesnoth-debug+0x3c862b9) #5 void std::_Bind<void (gui2::window::*(gui2::window*))()>::operator()<gui2::widget&, gui2::event::ui_event, bool&, bool&, void>(gui2::widget&, gui2::event::ui_event&&, bool&, bool&) /usr/include/c++/7/functional:551 (wesnoth-debug+0x3c7b169) #6 std::_Function_handler<void (gui2::widget&, gui2::event::ui_event, bool&, bool&), std::_Bind<void (gui2::window::*(gui2::window*))()> >::_M_invoke(std::_Any_data const&, gui2::widget&, gui2::event::ui_event&&, bool&, bool&) /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x3c6fa42) #7 std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>::operator()(gui2::widget&, gui2::event::ui_event, bool&, bool&) const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x419b92f) #8 bool gui2::event::implementation::fire_event<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>>(gui2::event::ui_event, std::vector<std::pair<gui2::widget*, gui2::event::ui_event>, std::allocator<std::pair<gui2::widget*, gui2::event::ui_event> > >&, gui2::widget*, gui2::widget*) src/gui/core/event/dispatcher_private.hpp:433 (wesnoth-debug+0x418d093) #9 bool gui2::event::fire_event<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>>(gui2::event::ui_event, gui2::event::dispatcher*, gui2::widget*) src/gui/core/event/dispatcher_private.hpp:505 (wesnoth-debug+0x4188975) #10 gui2::event::dispatcher::fire(gui2::event::ui_event, gui2::widget&) src/gui/core/event/dispatcher.cpp:137 (wesnoth-debug+0x418260d) #11 gui2::event::sdl_event_handler::draw() src/gui/core/event/handler.cpp:537 (wesnoth-debug+0x420fc86) #12 gui2::event::sdl_event_handler::handle_event(SDL_Event const&) src/gui/core/event/handler.cpp:385 (wesnoth-debug+0x420d40f) #13 events::pump() src/events.cpp:616 (wesnoth-debug+0x66b7ec5) #14 gui2::window::show(bool, unsigned int) src/gui/widgets/window.cpp:550 (wesnoth-debug+0x3c45f56) #15 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:89 (wesnoth-debug+0x42a2669) #16 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #17 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #18 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #19 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #20 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #21 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #22 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #23 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #24 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) Location is heap block of size 2496 at 0x7b7400082a00 allocated by main thread: #0 operator new(unsigned long) <null> (libtsan.so.0+0x6f14a) #1 gui2::build(gui2::builder_window::window_resolution const*) src/gui/core/window_builder.cpp:53 (wesnoth-debug+0x422ee24) #2 gui2::build(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) src/gui/core/window_builder.cpp:86 (wesnoth-debug+0x422fc08) #3 gui2::dialogs::modal_dialog::build_window() const src/gui/dialogs/modal_dialog.cpp:221 (wesnoth-debug+0x42a3b06) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:76 (wesnoth-debug+0x42a1be1) #5 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) Thread T11 (tid=17965, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.62.0+0x112f8) #2 thread<gui2::dialogs::loading_screen::pre_show(gui2::window&)::<lambda()> > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x42771d7) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x4273cf3) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a22fc) #5 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) SUMMARY: ThreadSanitizer: data race src/gui/widgets/widget.cpp:465 in gui2::widget::set_is_dirty(bool)====================================WARNING: ThreadSanitizer: data race (pid=17519) Write of size 8 at 0x7b1c00aeaf90 by thread T11: #0 operator delete(void*) <null> (libtsan.so.0+0x6f3d1) #1 __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::deallocate(std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >*, unsigned long) /usr/include/c++/7/ext/new_allocator.h:125 (wesnoth-debug+0x41ab53f) #2 std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > > >::deallocate(std::allocator<std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >&, std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >*, unsigned long) /usr/include/c++/7/bits/alloc_traits.h:462 (wesnoth-debug+0x41a662e) #3 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::_M_put_node(std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >*) /usr/include/c++/7/bits/stl_tree.h:592 (wesnoth-debug+0x41a0b2a) #4 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::_M_drop_node(std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >*) /usr/include/c++/7/bits/stl_tree.h:659 (wesnoth-debug+0x4197dd1) #5 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::_M_erase(std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >*) /usr/include/c++/7/bits/stl_tree.h:1858 (wesnoth-debug+0x418b6f6) #6 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::~_Rb_tree() /usr/include/c++/7/bits/stl_tree.h:949 (wesnoth-debug+0x418697a) #7 std::map<gui2::event::ui_event, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::~map() /usr/include/c++/7/bits/stl_map.h:294 (wesnoth-debug+0x41844a2) #8 gui2::event::dispatcher::signal_queue<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> >::~signal_queue() src/gui/core/event/dispatcher.hpp:705 (wesnoth-debug+0x418451c) #9 gui2::event::dispatcher::~dispatcher() src/gui/core/event/dispatcher.cpp:41 (wesnoth-debug+0x4181da1) #10 gui2::widget::~widget() src/gui/widgets/widget.cpp:74 (wesnoth-debug+0x47c6823) #11 gui2::styled_widget::~styled_widget() src/gui/widgets/styled_widget.hpp:34 (wesnoth-debug+0x393f133) #12 gui2::container_base::~container_base() <null> (wesnoth-debug+0x393f420) #13 gui2::panel::~panel() src/gui/widgets/panel.hpp:37 (wesnoth-debug+0x3aef26e) #14 gui2::window::~window() src/gui/widgets/window.cpp:392 (wesnoth-debug+0x3c43e14) #15 gui2::window::~window() src/gui/widgets/window.cpp:425 (wesnoth-debug+0x3c43e73) #16 std::default_delete<gui2::window>::operator()(gui2::window*) const /usr/include/c++/7/bits/unique_ptr.h:78 (wesnoth-debug+0x42af87f) #17 std::unique_ptr<gui2::window, std::default_delete<gui2::window> >::~unique_ptr() /usr/include/c++/7/bits/unique_ptr.h:268 (wesnoth-debug+0x42ac469) #18 ~scoped_dialog src/scripting/lua_gui2.cpp:106 (wesnoth-debug+0x4a8dc73) #19 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:248 (wesnoth-debug+0x4a8f994) #20 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #21 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #22 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #23 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #24 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #25 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #26 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #27 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #28 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #29 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #30 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #31 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #32 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #33 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #34 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #35 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #36 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #37 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #38 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #39 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #40 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #41 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Previous read of size 8 at 0x7b1c00aeaf90 by main thread: #0 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::_S_left(std::_Rb_tree_node_base*) /usr/include/c++/7/bits/stl_tree.h:764 (wesnoth-debug+0x4197d2d) #1 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::_M_lower_bound(std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >*, std::_Rb_tree_node_base*, gui2::event::ui_event const&) /usr/include/c++/7/bits/stl_tree.h:1873 (wesnoth-debug+0x41b3569) #2 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::lower_bound(gui2::event::ui_event const&) /usr/include/c++/7/bits/stl_tree.h:1187 (wesnoth-debug+0x41adc52) #3 std::map<gui2::event::ui_event, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::lower_bound(gui2::event::ui_event const&) /usr/include/c++/7/bits/stl_map.h:1234 (wesnoth-debug+0x41a96ba) #4 std::map<gui2::event::ui_event, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::operator[](gui2::event::ui_event const&) /usr/include/c++/7/bits/stl_map.h:489 (wesnoth-debug+0x41a42b8) #5 std::enable_if<boost::mpl::has_key<boost::mpl::set<mpl_::int_<46>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, mpl_::int_<46> >::value, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > >::type& gui2::event::dispatcher_implementation::event_signal<mpl_::int_<46> >(gui2::event::dispatcher&, gui2::event::ui_event) <null> (wesnoth-debug+0x41a3bea) #6 bool gui2::event::dispatcher_implementation::has_handler::oper<mpl_::int_<46> >(gui2::event::ui_event) <null> (wesnoth-debug+0x419a835) #7 bool gui2::event::implementation::find<false>::execute<boost::mpl::s_iter<boost::mpl::set<mpl_::int_<46>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::mpl::s_item<mpl_::int_<46>, boost::mpl::set0<mpl_::na> > >, boost::mpl::s_iter<boost::mpl::set<mpl_::int_<46>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::mpl::set0<mpl_::na> >, gui2::event::ui_event, gui2::event::dispatcher_implementation::has_handler>(boost::mpl::s_iter<boost::mpl::set<mpl_::int_<46>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::mpl::s_item<mpl_::int_<46>, boost::mpl::set0<mpl_::na> > >*, boost::mpl::s_iter<boost::mpl::set<mpl_::int_<46>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::mpl::set0<mpl_::na> >*, gui2::event::ui_event, gui2::event::dispatcher_implementation::has_handler) <null> (wesnoth-debug+0x418c4c5) #8 bool gui2::event::find<boost::mpl::set<mpl_::int_<46>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, gui2::event::ui_event, gui2::event::dispatcher_implementation::has_handler>(gui2::event::ui_event, gui2::event::dispatcher_implementation::has_handler) src/gui/core/event/dispatcher_private.hpp:246 (wesnoth-debug+0x41872e7) #9 gui2::event::dispatcher::has_event(gui2::event::ui_event, gui2::event::dispatcher::event_queue_type) src/gui/core/event/dispatcher.cpp:92 (wesnoth-debug+0x4182515) #10 std::vector<std::pair<gui2::widget*, gui2::event::ui_event>, std::allocator<std::pair<gui2::widget*, gui2::event::ui_event> > > gui2::event::implementation::build_event_chain<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> >(gui2::event::ui_event, gui2::widget*, gui2::widget*) src/gui/core/event/dispatcher_private.hpp:310 (wesnoth-debug+0x4190375) #11 bool gui2::event::fire_event<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)>, SDL_Event const&>(gui2::event::ui_event, gui2::event::dispatcher*, gui2::widget*, SDL_Event const&) <null> (wesnoth-debug+0x4188f24) #12 gui2::event::dispatcher::fire(gui2::event::ui_event, gui2::widget&, SDL_Event const&) src/gui/core/event/dispatcher.cpp:160 (wesnoth-debug+0x4182828) #13 gui2::event::sdl_event_handler::raw_event(SDL_Event const&) src/gui/core/event/handler.cpp:571 (wesnoth-debug+0x4210965) #14 gui2::event::sdl_event_handler::handle_event(SDL_Event const&) src/gui/core/event/handler.cpp:469 (wesnoth-debug+0x420e61b) #15 events::pump() src/events.cpp:616 (wesnoth-debug+0x66b7ec5) #16 gui2::window::show(bool, unsigned int) src/gui/widgets/window.cpp:550 (wesnoth-debug+0x3c45f56) #17 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:89 (wesnoth-debug+0x42a2669) #18 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #19 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #20 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #21 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #22 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #23 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #24 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #25 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #26 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) Thread T11 (tid=17965, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.62.0+0x112f8) #2 thread<gui2::dialogs::loading_screen::pre_show(gui2::window&)::<lambda()> > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x42771d7) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x4273cf3) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a22fc) #5 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) SUMMARY: ThreadSanitizer: data race (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x6f3d1) in operator delete(void*)====================================WARNING: ThreadSanitizer: data race (pid=17519) Write of size 8 at 0x7b1c00aeafa0 by thread T11: #0 operator delete(void*) <null> (libtsan.so.0+0x6f3d1) #1 __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::deallocate(std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >*, unsigned long) /usr/include/c++/7/ext/new_allocator.h:125 (wesnoth-debug+0x41ab53f) #2 std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > > >::deallocate(std::allocator<std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >&, std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >*, unsigned long) /usr/include/c++/7/bits/alloc_traits.h:462 (wesnoth-debug+0x41a662e) #3 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::_M_put_node(std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >*) /usr/include/c++/7/bits/stl_tree.h:592 (wesnoth-debug+0x41a0b2a) #4 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::_M_drop_node(std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >*) /usr/include/c++/7/bits/stl_tree.h:659 (wesnoth-debug+0x4197dd1) #5 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::_M_erase(std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >*) /usr/include/c++/7/bits/stl_tree.h:1858 (wesnoth-debug+0x418b6f6) #6 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::~_Rb_tree() /usr/include/c++/7/bits/stl_tree.h:949 (wesnoth-debug+0x418697a) #7 std::map<gui2::event::ui_event, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::~map() /usr/include/c++/7/bits/stl_map.h:294 (wesnoth-debug+0x41844a2) #8 gui2::event::dispatcher::signal_queue<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> >::~signal_queue() src/gui/core/event/dispatcher.hpp:705 (wesnoth-debug+0x418451c) #9 gui2::event::dispatcher::~dispatcher() src/gui/core/event/dispatcher.cpp:41 (wesnoth-debug+0x4181da1) #10 gui2::widget::~widget() src/gui/widgets/widget.cpp:74 (wesnoth-debug+0x47c6823) #11 gui2::styled_widget::~styled_widget() src/gui/widgets/styled_widget.hpp:34 (wesnoth-debug+0x393f133) #12 gui2::container_base::~container_base() <null> (wesnoth-debug+0x393f420) #13 gui2::panel::~panel() src/gui/widgets/panel.hpp:37 (wesnoth-debug+0x3aef26e) #14 gui2::window::~window() src/gui/widgets/window.cpp:392 (wesnoth-debug+0x3c43e14) #15 gui2::window::~window() src/gui/widgets/window.cpp:425 (wesnoth-debug+0x3c43e73) #16 std::default_delete<gui2::window>::operator()(gui2::window*) const /usr/include/c++/7/bits/unique_ptr.h:78 (wesnoth-debug+0x42af87f) #17 std::unique_ptr<gui2::window, std::default_delete<gui2::window> >::~unique_ptr() /usr/include/c++/7/bits/unique_ptr.h:268 (wesnoth-debug+0x42ac469) #18 ~scoped_dialog src/scripting/lua_gui2.cpp:106 (wesnoth-debug+0x4a8dc73) #19 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:248 (wesnoth-debug+0x4a8f994) #20 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #21 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #22 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #23 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #24 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #25 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #26 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #27 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #28 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #29 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #30 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #31 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #32 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #33 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #34 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #35 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #36 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #37 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #38 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #39 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #40 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #41 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Previous read of size 4 at 0x7b1c00aeafa0 by main thread: #0 std::less<gui2::event::ui_event>::operator()(gui2::event::ui_event const&, gui2::event::ui_event const&) const /usr/include/c++/7/bits/stl_function.h:386 (wesnoth-debug+0x3979847) #1 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::_M_lower_bound(std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >*, std::_Rb_tree_node_base*, gui2::event::ui_event const&) /usr/include/c++/7/bits/stl_tree.h:1872 (wesnoth-debug+0x41b354e) #2 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::lower_bound(gui2::event::ui_event const&) /usr/include/c++/7/bits/stl_tree.h:1187 (wesnoth-debug+0x41adc52) #3 std::map<gui2::event::ui_event, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::lower_bound(gui2::event::ui_event const&) /usr/include/c++/7/bits/stl_map.h:1234 (wesnoth-debug+0x41a96ba) #4 std::map<gui2::event::ui_event, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::operator[](gui2::event::ui_event const&) /usr/include/c++/7/bits/stl_map.h:489 (wesnoth-debug+0x41a42b8) #5 std::enable_if<boost::mpl::has_key<boost::mpl::set<mpl_::int_<46>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, mpl_::int_<46> >::value, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > >::type& gui2::event::dispatcher_implementation::event_signal<mpl_::int_<46> >(gui2::event::dispatcher&, gui2::event::ui_event) <null> (wesnoth-debug+0x41a3bea) #6 bool gui2::event::dispatcher_implementation::has_handler::oper<mpl_::int_<46> >(gui2::event::ui_event) <null> (wesnoth-debug+0x419a835) #7 bool gui2::event::implementation::find<false>::execute<boost::mpl::s_iter<boost::mpl::set<mpl_::int_<46>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::mpl::s_item<mpl_::int_<46>, boost::mpl::set0<mpl_::na> > >, boost::mpl::s_iter<boost::mpl::set<mpl_::int_<46>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::mpl::set0<mpl_::na> >, gui2::event::ui_event, gui2::event::dispatcher_implementation::has_handler>(boost::mpl::s_iter<boost::mpl::set<mpl_::int_<46>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::mpl::s_item<mpl_::int_<46>, boost::mpl::set0<mpl_::na> > >*, boost::mpl::s_iter<boost::mpl::set<mpl_::int_<46>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::mpl::set0<mpl_::na> >*, gui2::event::ui_event, gui2::event::dispatcher_implementation::has_handler) <null> (wesnoth-debug+0x418c4c5) #8 bool gui2::event::find<boost::mpl::set<mpl_::int_<46>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, gui2::event::ui_event, gui2::event::dispatcher_implementation::has_handler>(gui2::event::ui_event, gui2::event::dispatcher_implementation::has_handler) src/gui/core/event/dispatcher_private.hpp:246 (wesnoth-debug+0x41872e7) #9 gui2::event::dispatcher::has_event(gui2::event::ui_event, gui2::event::dispatcher::event_queue_type) src/gui/core/event/dispatcher.cpp:92 (wesnoth-debug+0x4182515) #10 std::vector<std::pair<gui2::widget*, gui2::event::ui_event>, std::allocator<std::pair<gui2::widget*, gui2::event::ui_event> > > gui2::event::implementation::build_event_chain<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> >(gui2::event::ui_event, gui2::widget*, gui2::widget*) src/gui/core/event/dispatcher_private.hpp:310 (wesnoth-debug+0x4190375) #11 bool gui2::event::fire_event<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)>, SDL_Event const&>(gui2::event::ui_event, gui2::event::dispatcher*, gui2::widget*, SDL_Event const&) <null> (wesnoth-debug+0x4188f24) #12 gui2::event::dispatcher::fire(gui2::event::ui_event, gui2::widget&, SDL_Event const&) src/gui/core/event/dispatcher.cpp:160 (wesnoth-debug+0x4182828) #13 gui2::event::sdl_event_handler::raw_event(SDL_Event const&) src/gui/core/event/handler.cpp:571 (wesnoth-debug+0x4210965) #14 gui2::event::sdl_event_handler::handle_event(SDL_Event const&) src/gui/core/event/handler.cpp:469 (wesnoth-debug+0x420e61b) #15 events::pump() src/events.cpp:616 (wesnoth-debug+0x66b7ec5) #16 gui2::window::show(bool, unsigned int) src/gui/widgets/window.cpp:550 (wesnoth-debug+0x3c45f56) #17 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:89 (wesnoth-debug+0x42a2669) #18 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #19 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #20 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #21 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #22 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #23 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #24 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #25 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #26 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) Thread T11 (tid=17965, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.62.0+0x112f8) #2 thread<gui2::dialogs::loading_screen::pre_show(gui2::window&)::<lambda()> > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x42771d7) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x4273cf3) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a22fc) #5 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) SUMMARY: ThreadSanitizer: data race (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x6f3d1) in operator delete(void*)====================================WARNING: ThreadSanitizer: data race (pid=17519) Write of size 8 at 0x7b1c00aeafa8 by thread T11: #0 operator delete(void*) <null> (libtsan.so.0+0x6f3d1) #1 __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::deallocate(std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >*, unsigned long) /usr/include/c++/7/ext/new_allocator.h:125 (wesnoth-debug+0x41ab53f) #2 std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > > >::deallocate(std::allocator<std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >&, std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >*, unsigned long) /usr/include/c++/7/bits/alloc_traits.h:462 (wesnoth-debug+0x41a662e) #3 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::_M_put_node(std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >*) /usr/include/c++/7/bits/stl_tree.h:592 (wesnoth-debug+0x41a0b2a) #4 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::_M_drop_node(std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >*) /usr/include/c++/7/bits/stl_tree.h:659 (wesnoth-debug+0x4197dd1) #5 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::_M_erase(std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >*) /usr/include/c++/7/bits/stl_tree.h:1858 (wesnoth-debug+0x418b6f6) #6 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::~_Rb_tree() /usr/include/c++/7/bits/stl_tree.h:949 (wesnoth-debug+0x418697a) #7 std::map<gui2::event::ui_event, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> > > > >::~map() /usr/include/c++/7/bits/stl_map.h:294 (wesnoth-debug+0x41844a2) #8 gui2::event::dispatcher::signal_queue<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&, SDL_Event const&)> >::~signal_queue() src/gui/core/event/dispatcher.hpp:705 (wesnoth-debug+0x418451c) #9 gui2::event::dispatcher::~dispatcher() src/gui/core/event/dispatcher.cpp:41 (wesnoth-debug+0x4181da1) #10 gui2::widget::~widget() src/gui/widgets/widget.cpp:74 (wesnoth-debug+0x47c6823) #11 gui2::styled_widget::~styled_widget() src/gui/widgets/styled_widget.hpp:34 (wesnoth-debug+0x393f133) #12 gui2::container_base::~container_base() <null> (wesnoth-debug+0x393f420) #13 gui2::panel::~panel() src/gui/widgets/panel.hpp:37 (wesnoth-debug+0x3aef26e) #14 gui2::window::~window() src/gui/widgets/window.cpp:392 (wesnoth-debug+0x3c43e14) #15 gui2::window::~window() src/gui/widgets/window.cpp:425 (wesnoth-debug+0x3c43e73) #16 std::default_delete<gui2::window>::operator()(gui2::window*) const /usr/include/c++/7/bits/unique_ptr.h:78 (wesnoth-debug+0x42af87f) #17 std::unique_ptr<gui2::window, std::default_delete<gui2::window> >::~unique_ptr() /usr/include/c++/7/bits/unique_ptr.h:268 (wesnoth-debug+0x42ac469) #18 ~scoped_dialog src/scripting/lua_gui2.cpp:106 (wesnoth-debug+0x4a8dc73) #19 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:248 (wesnoth-debug+0x4a8f994) #20 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #21 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #22 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #23 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #24 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #25 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #26 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #27 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #28 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #29 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #30 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #31 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #32 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #33 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #34 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #35 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #36 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #37 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #38 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #39 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #40 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #41 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Previous read of size 8 at 0x7b1c00aeafa8 by main thread: [failed to restore the stack] Thread T11 (tid=17965, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.62.0+0x112f8) #2 thread<gui2::dialogs::loading_screen::pre_show(gui2::window&)::<lambda()> > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x42771d7) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x4273cf3) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a22fc) #5 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) SUMMARY: ThreadSanitizer: data race (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x6f3d1) in operator delete(void*)====================================WARNING: ThreadSanitizer: data race (pid=17519) Write of size 8 at 0x7b1c01e97020 by thread T11: #0 operator delete(void*) <null> (libtsan.so.0+0x6f3d1) #1 __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > > >::deallocate(std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > >*, unsigned long) /usr/include/c++/7/ext/new_allocator.h:125 (wesnoth-debug+0x3981221) #2 std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > > > >::deallocate(std::allocator<std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > > >&, std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > >*, unsigned long) /usr/include/c++/7/bits/alloc_traits.h:462 (wesnoth-debug+0x397fc12) #3 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > > >::_M_put_node(std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > >*) /usr/include/c++/7/bits/stl_tree.h:592 (wesnoth-debug+0x397e8ca) #4 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > > >::_M_drop_node(std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > >*) /usr/include/c++/7/bits/stl_tree.h:659 (wesnoth-debug+0x397bbbb) #5 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > > >::_M_erase(std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > >*) /usr/include/c++/7/bits/stl_tree.h:1858 (wesnoth-debug+0x418ae14) #6 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > > >::~_Rb_tree() /usr/include/c++/7/bits/stl_tree.h:949 (wesnoth-debug+0x418508a) #7 std::map<gui2::event::ui_event, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > > >::~map() /usr/include/c++/7/bits/stl_map.h:294 (wesnoth-debug+0x4183eea) #8 gui2::event::dispatcher::signal_queue<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> >::~signal_queue() src/gui/core/event/dispatcher.hpp:705 (wesnoth-debug+0x4183f64) #9 gui2::event::dispatcher::~dispatcher() src/gui/core/event/dispatcher.cpp:41 (wesnoth-debug+0x4181ed6) #10 gui2::widget::~widget() src/gui/widgets/widget.cpp:74 (wesnoth-debug+0x47c6823) #11 gui2::styled_widget::~styled_widget() src/gui/widgets/styled_widget.hpp:34 (wesnoth-debug+0x393f133) #12 gui2::container_base::~container_base() <null> (wesnoth-debug+0x393f420) #13 gui2::panel::~panel() src/gui/widgets/panel.hpp:37 (wesnoth-debug+0x3aef26e) #14 gui2::window::~window() src/gui/widgets/window.cpp:392 (wesnoth-debug+0x3c43e14) #15 gui2::window::~window() src/gui/widgets/window.cpp:425 (wesnoth-debug+0x3c43e73) #16 std::default_delete<gui2::window>::operator()(gui2::window*) const /usr/include/c++/7/bits/unique_ptr.h:78 (wesnoth-debug+0x42af87f) #17 std::unique_ptr<gui2::window, std::default_delete<gui2::window> >::~unique_ptr() /usr/include/c++/7/bits/unique_ptr.h:268 (wesnoth-debug+0x42ac469) #18 ~scoped_dialog src/scripting/lua_gui2.cpp:106 (wesnoth-debug+0x4a8dc73) #19 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:248 (wesnoth-debug+0x4a8f994) #20 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #21 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #22 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #23 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #24 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #25 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #26 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #27 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #28 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #29 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #30 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #31 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #32 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #33 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #34 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #35 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #36 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #37 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #38 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #39 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #40 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #41 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Previous read of size 8 at 0x7b1c01e97020 by main thread: [failed to restore the stack] Thread T11 (tid=17965, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.62.0+0x112f8) #2 thread<gui2::dialogs::loading_screen::pre_show(gui2::window&)::<lambda()> > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x42771d7) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x4273cf3) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a22fc) #5 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) SUMMARY: ThreadSanitizer: data race (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x6f3d1) in operator delete(void*)====================================WARNING: ThreadSanitizer: data race (pid=17519) Write of size 8 at 0x7b0c002ce650 by thread T11: #0 operator delete(void*) <null> (libtsan.so.0+0x6f3d1) #1 __gnu_cxx::new_allocator<std::_List_node<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > >::deallocate(std::_List_node<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> >*, unsigned long) /usr/include/c++/7/ext/new_allocator.h:125 (wesnoth-debug+0x39812eb) #2 std::allocator_traits<std::allocator<std::_List_node<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > >::deallocate(std::allocator<std::_List_node<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > >&, std::_List_node<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> >*, unsigned long) /usr/include/c++/7/bits/alloc_traits.h:462 (wesnoth-debug+0x397fceb) #3 std::__cxx11::_List_base<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>, std::allocator<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > >::_M_put_node(std::_List_node<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> >*) /usr/include/c++/7/bits/stl_list.h:387 (wesnoth-debug+0x398226e) #4 std::__cxx11::_List_base<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>, std::allocator<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > >::_M_clear() /usr/include/c++/7/bits/list.tcc:80 (wesnoth-debug+0x3982123) #5 std::__cxx11::_List_base<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>, std::allocator<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > >::~_List_base() /usr/include/c++/7/bits/stl_list.h:442 (wesnoth-debug+0x3981aa5) #6 std::__cxx11::list<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>, std::allocator<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > >::~list() /usr/include/c++/7/bits/stl_list.h:733 (wesnoth-debug+0x398100e) #7 gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> >::~signal_type() src/gui/core/event/dispatcher.hpp:692 (wesnoth-debug+0x39810be) #8 std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > >::~pair() /usr/include/c++/7/bits/stl_pair.h:198 (wesnoth-debug+0x398116a) #9 void __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > > >::destroy<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > >(std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > >*) /usr/include/c++/7/ext/new_allocator.h:140 (wesnoth-debug+0x39811e8) #10 void std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > > > >::destroy<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > >(std::allocator<std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > > >&, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > >*) /usr/include/c++/7/bits/alloc_traits.h:487 (wesnoth-debug+0x397fbbb) #11 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > > >::_M_destroy_node(std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > >*) /usr/include/c++/7/bits/stl_tree.h:650 (wesnoth-debug+0x397e840) #12 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > > >::_M_drop_node(std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > >*) /usr/include/c++/7/bits/stl_tree.h:658 (wesnoth-debug+0x397bb83) #13 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > > >::_M_erase(std::_Rb_tree_node<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > >*) /usr/include/c++/7/bits/stl_tree.h:1858 (wesnoth-debug+0x418ae14) #14 std::_Rb_tree<gui2::event::ui_event, std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > >, std::_Select1st<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > > >::~_Rb_tree() /usr/include/c++/7/bits/stl_tree.h:949 (wesnoth-debug+0x418508a) #15 std::map<gui2::event::ui_event, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> >, std::less<gui2::event::ui_event>, std::allocator<std::pair<gui2::event::ui_event const, gui2::event::dispatcher::signal_type<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> > > > >::~map() /usr/include/c++/7/bits/stl_map.h:294 (wesnoth-debug+0x4183eea) #16 gui2::event::dispatcher::signal_queue<std::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> >::~signal_queue() src/gui/core/event/dispatcher.hpp:705 (wesnoth-debug+0x4183f64) #17 gui2::event::dispatcher::~dispatcher() src/gui/core/event/dispatcher.cpp:41 (wesnoth-debug+0x4181ed6) #18 gui2::widget::~widget() src/gui/widgets/widget.cpp:74 (wesnoth-debug+0x47c6823) #19 gui2::styled_widget::~styled_widget() src/gui/widgets/styled_widget.hpp:34 (wesnoth-debug+0x393f133) #20 gui2::container_base::~container_base() <null> (wesnoth-debug+0x393f420) #21 gui2::panel::~panel() src/gui/widgets/panel.hpp:37 (wesnoth-debug+0x3aef26e) #22 gui2::window::~window() src/gui/widgets/window.cpp:392 (wesnoth-debug+0x3c43e14) #23 gui2::window::~window() src/gui/widgets/window.cpp:425 (wesnoth-debug+0x3c43e73) #24 std::default_delete<gui2::window>::operator()(gui2::window*) const /usr/include/c++/7/bits/unique_ptr.h:78 (wesnoth-debug+0x42af87f) #25 std::unique_ptr<gui2::window, std::default_delete<gui2::window> >::~unique_ptr() /usr/include/c++/7/bits/unique_ptr.h:268 (wesnoth-debug+0x42ac469) #26 ~scoped_dialog src/scripting/lua_gui2.cpp:106 (wesnoth-debug+0x4a8dc73) #27 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:248 (wesnoth-debug+0x4a8f994) #28 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b485e) #29 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x62035cd) #30 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b55e5) #31 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b574a) #32 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619e6ba) #33 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b149e) #34 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b745f) #35 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x619e8e9) #36 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a812d6) #37 lua_kernel_base::protected_call(lua_State*, int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab1304) #38 lua_kernel_base::protected_call(int, int, std::function<void (char const*, char const*)>) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab128b) #39 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab23fd) #40 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab259b) #41 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab1e1d) #42 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2a9f1) #43 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x410fa9a) #44 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fcb3b) #45 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x49285be) #46 std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a376b) #47 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x42739cf) #48 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279089) #49 <null> <null> (libboost_thread.so.1.62.0+0x11f95) Previous read of size 8 at 0x7b0c002ce650 by main thread: [failed to restore the stack] Thread T11 (tid=17965, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.62.0+0x112f8) #2 thread<gui2::dialogs::loading_screen::pre_show(gui2::window&)::<lambda()> > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x42771d7) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x4273cf3) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a22fc) #5 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) SUMMARY: ThreadSanitizer: data race (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x6f3d1) in operator delete(void*)==================20180525 22:48:56 info wml: [IftU] COMPAT: Checking for add-on Damage_Distribution_Mod...20180525 22:48:56 info wml: [IftU] COMPAT: Checking for add-on No_Randomness_Mod...20180525 22:48:56 info wml: [IftU] COMPAT: Checking for add-on Move_Units_Between_Campaigns...20180525 22:48:56 info wml: [IftU] COMPAT: Add-on compatibility check finished!==================WARNING: ThreadSanitizer: data race (pid=17519) Write of size 8 at 0x7b14001c5f98 by main thread: #0 operator delete(void*) <null> (libtsan.so.0+0x6f3d1) #1 __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<unsigned long const, gui2::timer> > >::deallocate(std::_Rb_tree_node<std::pair<unsigned long const, gui2::timer> >*, unsigned long) /usr/include/c++/7/ext/new_allocator.h:125 (wesnoth-debug+0x422b3f9) #2 std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<unsigned long const, gui2::timer> > > >::deallocate(std::allocator<std::_Rb_tree_node<std::pair<unsigned long const, gui2::timer> > >&, std::_Rb_tree_node<std::pair<unsigned long const, gui2::timer> >*, unsigned long) /usr/include/c++/7/bits/alloc_traits.h:462 (wesnoth-debug+0x422b13d) #3 std::_Rb_tree<unsigned long, std::pair<unsigned long const, gui2::timer>, std::_Select1st<std::pair<unsigned long const, gui2::timer> >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, gui2::timer> > >::_M_put_node(std::_Rb_tree_node<std::pair<unsigned long const, gui2::timer> >*) /usr/include/c++/7/bits/stl_tree.h:592 (wesnoth-debug+0x422ab68) #4 std::_Rb_tree<unsigned long, std::pair<unsigned long const, gui2::timer>, std::_Select1st<std::pair<unsigned long const, gui2::timer> >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, gui2::timer> > >::_M_drop_node(std::_Rb_tree_node<std::pair<unsigned long const, gui2::timer> >*) /usr/include/c++/7/bits/stl_tree.h:659 (wesnoth-debug+0x4229741) #5 std::_Rb_tree<unsigned long, std::pair<unsigned long const, gui2::timer>, std::_Select1st<std::pair<unsigned long const, gui2::timer> >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, gui2::timer> > >::_M_erase_aux(std::_Rb_tree_const_iterator<std::pair<unsigned long const, gui2::timer> >) /usr/include/c++/7/bits/stl_tree.h:2477 (wesnoth-debug+0x422a9ad) #6 std::_Rb_tree<unsigned long, std::pair<unsigned long const, gui2::timer>, std::_Select1st<std::pair<unsigned long const, gui2::timer> >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, gui2::timer> > >::erase[abi:cxx11](std::_Rb_tree_iterator<std::pair<unsigned long const, gui2::timer> >) <null> (wesnoth-debug+0x42295cb) #7 std::map<unsigned long, gui2::timer, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, gui2::timer> > >::erase[abi:cxx11](std::_Rb_tree_iterator<std::pair<unsigned long const, gui2::timer> >) <null> (wesnoth-debug+0x42289e3) #8 gui2::remove_timer(unsigned long) src/gui/core/timer.cpp:170 (wesnoth-debug+0x4227a28) #9 gui2::dialogs::loading_screen::clear_timer() src/gui/dialogs/loading_screen.cpp:233 (wesnoth-debug+0x4276c87) #10 gui2::dialogs::loading_screen::post_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:138 (wesnoth-debug+0x4274750) #11 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:108 (wesnoth-debug+0x42a2ced) #12 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #13 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #14 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #15 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #16 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #17 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #18 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #19 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #20 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) Previous read of size 4 at 0x7b14001c5f9c by thread T1: #0 timer_callback src/gui/core/timer.cpp:106 (wesnoth-debug+0x4226e69) #1 <null> <null> (libSDL2-2.0.so.0+0x67fc8) As if synchronized via sleep: #0 nanosleep <null> (libtsan.so.0+0x49490) #1 <null> <null> (libSDL2-2.0.so.0+0xdd914) #2 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:89 (wesnoth-debug+0x42a2669) #3 gui2::dialogs::loading_screen::display(std::function<void ()>) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42765fa) #4 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x490198b) #5 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48fa12c) #6 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr<terrain_type_data> const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5acfa) #7 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x56757e8) #8 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x56773de) #9 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f5765) #10 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4201) #11 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca4f65) Thread T1 'SDLTimer' (tid=17521, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x2b6db) #1 <null> <null> (libSDL2-2.0.so.0+0xd8e36) #2 __libc_start_main <null> (libc.so.6+0x21a86) SUMMARY: ThreadSanitizer: data race (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x6f3d1) in operator delete(void*)==================
Comments