Follow-up Comment #3, bug #18921 (project wesnoth):
A backtrace of the double-debug-kill version of this bug:
#3 0x00007ffff4c9c3d2 in __GI___assert_fail (assertion=0xed5c0a "false",
file=0xbc2c47 "src/unit_animation.cpp", line=1394,
function=0xbc3460 "void unit_animator::wait_for_end() const") at
assert.c:101
#4 0x000000000061f194 in unit_animator::wait_for_end() const ()
#5 0x000000000091a035 in unit_display::unit_die(map_location const&, unit&,
attack_type const*, attack_type const*, map_location const&, unit*) ()
#6 0x00000000008ab859 in
events::menu_handler::kill_unit(events::mouse_handler&) ()
#7 0x0000000000aea7ba in
hotkey::command_executor::execute_command(hotkey::hotkey_command const&, int)
()
#8 0x00000000008fb4b7 in
play_controller::execute_command(hotkey::hotkey_command const&, int) ()
#9 0x0000000000aeae92 in hotkey::execute_command(display&,
hotkey::hotkey_command const&, hotkey::command_executor*, int) ()
#10 0x0000000000aec0b2 in hotkey::key_event_execute(display&,
SDL_KeyboardEvent const&, hotkey::command_executor*) ()
#11 0x0000000000aec127 in hotkey::key_event(display&, SDL_KeyboardEvent
const&, hotkey::command_executor*) ()
#12 0x000000000077560d in controller_base::handle_event(SDL_Event const&) ()
#13 0x0000000000ae29e1 in events::pump() ()
#14 0x00000000007768f2 in controller_base::play_slice(bool) ()
#15 0x0000000000599e5d in playsingle_controller::play_human_turn() ()
#16 0x000000000059900d in playsingle_controller::play_side(unsigned int, bool)
()
#17 0x0000000000598b96 in playsingle_controller::play_turn(bool) ()
#18 0x000000000059b610 in
playsingle_controller::play_scenario(std::pair<config::const_child_iterator,
config::const_child_iterator> const&, bool) ()
#19 0x000000000058ea31 in playsingle_scenario(config const&, config const*,
display&, game_state&, std::pair<config::const_child_iterator,
config::const_child_iterator> const&, bool, end_level_data&) ()
#20 0x000000000058fb2e in play_game(game_display&, game_state&, config const&,
io_type_t, bool, bool) ()
#21 0x000000000047cf32 in game_controller::play_test() ()
#22 0x000000000043d9e7 in do_gameloop(int, char**) ()
#23 0x0000000000428365 in main ()
If this particular part is hacked out of the way (by returning if reentrancy
is detected), it crashes here instead:
#0 0x0000000000a42ab8 in std::_Rb_tree<std::string, std::pair<std::string
const, std::vector<config*, std::allocator<config*> > >,
std::_Select1st<std::pair<std::string co
nst, std::vector<config*, std::allocator<config*> > > >,
std::less<std::string>, std::allocator<std::pair<std::string const,
std::vector<config*, std::allocator<config*> >
> > >::_M_lower_bound(std::_Rb_tree_node<std::pair<std::string const,
std::vector<config*, std::allocator<config*> > > >*,
std::_Rb_tree_node<std::pair<std::string const, s
td::vector<config*, std::allocator<config*> > > >*, std::string const&) [clone
.isra.327] ()
#1 0x0000000000a4cb0e in std::_Rb_tree<std::string, std::pair<std::string
const, std::vector<config*, std::allocator<config*> > >,
std::_Select1st<std::pair<std::string co
nst, std::vector<config*, std::allocator<config*> > > >,
std::less<std::string>, std::allocator<std::pair<std::string const,
std::vector<config*, std::allocator<config*> >
> > >::find(std::string const&) ()
#2 0x0000000000a4503a in config::child(std::string const&, int) ()
#3 0x00000000006176bb in unit::get_abilities(std::string const&, map_location
const&) const ()
#4 0x0000000000919c1d in unit_display::reset_helpers(unit const*, unit
const*) ()
#5 0x000000000091a0b0 in unit_display::unit_die(map_location const&, unit&,
attack_type const*, attack_type const*, map_location const&, unit*) ()
#6 0x00000000008ab8c9 in
events::menu_handler::kill_unit(events::mouse_handler&) ()
#7 0x0000000000aea82a in
hotkey::command_executor::execute_command(hotkey::hotkey_command const&, int)
()
#8 0x00000000008fb527 in
play_controller::execute_command(hotkey::hotkey_command const&, int) ()
#9 0x0000000000aeaf02 in hotkey::execute_command(display&,
hotkey::hotkey_command const&, hotkey::command_executor*, int) ()
#10 0x0000000000aec122 in hotkey::key_event_execute(display&,
SDL_KeyboardEvent const&, hotkey::command_executor*) ()
#11 0x0000000000aec197 in hotkey::key_event(display&, SDL_KeyboardEvent
const&, hotkey::command_executor*) ()
#12 0x000000000077567d in controller_base::handle_event(SDL_Event const&) ()
#13 0x0000000000ae2a51 in events::pump() ()
#14 0x0000000000776962 in controller_base::play_slice(bool) ()
#15 0x0000000000599e5d in playsingle_controller::play_human_turn() ()
#16 0x000000000059900d in playsingle_controller::play_side(unsigned int, bool)
()
#17 0x0000000000598b96 in playsingle_controller::play_turn(bool) ()
#18 0x000000000059b610 in
playsingle_controller::play_scenario(std::pair<config::const_child_iterator,
config::const_child_iterator> const&, bool) ()
#19 0x000000000058ea31 in playsingle_scenario(config const&, config const*,
display&, game_state&, std::pair<config::const_child_iterator,
config::const_child_iterator> con
st&, bool, end_level_data&) ()
#20 0x000000000058fb2e in play_game(game_display&, game_state&, config const&,
io_type_t, bool, bool) ()
#21 0x000000000047cf32 in game_controller::play_test() ()
#22 0x000000000043d9e7 in do_gameloop(int, char**) ()
#23 0x0000000000428365 in main ()
I don't know very much about this part of the engine, but I suspect that short
of a major rewrite, the best we can do is ignoring game-level user input while
things are already happening, so I've turned this segfault into an assertion
failure in 30c3a9c287a0e
<https://github.com/wesnoth/wesnoth-old/commit/30c3a9c287a0e3420c918181a6de6b79e01c2b2f>.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?18921>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs