URL:
<http://gna.org/bugs/?25348>
Summary: segfault: killed a unit with debug mode, which
should have triggered an event afterwards
Project: Battle for Wesnoth
Submitted by: shiki
Submitted on: Thu 01 Dec 2016 12:53:01 AM UTC
Category: Bug
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None of the others
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 1.13.6+dev
Operating System: Archlinux
_______________________________________________________
Details:
I'm not finding a better title right now...
This happened in the 6th scenario of War_of_the_Dragon, where I killed one of
my leaders.
The other was stored in a variable.
The event would have been triggered if the first one is getting killed, it
wuld then have unstored the 2nd and ended the level. And this works if the
unit gets killed without the debug command.
Thats the stderr message:
wesnoth-git: src/units/map.hpp:177: pointer
unit_map::iterator_base<unit_map::standard_iter_types>::operator->() const
[iter_types = unit_map::standard_iter_types]: Assertion `valid()' failed.
Abgebrochen (Speicherabzug geschrieben)
Stacktrace:
Stack trace of thread 12790:
#0 0x00007fb8965b304f raise (libc.so.6)
#1 0x00007fb8965b447a abort (libc.so.6)
#2 0x00007fb8965abea7 __assert_fail_base (libc.so.6)
#3 0x00007fb8965abf52 __assert_fail (libc.so.6)
#4 0x00000000006a7aa1
_ZNK8unit_map13iterator_baseINS_19standard_iter_typesEEptEv (wesnoth-debug)
#5 0x0000000000e1be19
_ZL30synced_command_func_debug_killRK6configbbSt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbEE
(wesnoth-debug)
#6 0x00000000007197e8
_ZN14synced_context3runERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6configbbSt8functionIFvS7_bEE
(wesnoth-debug)
#7 0x000000000071aa53
_ZN14synced_context13run_and_storeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6configbbSt8functionIFvS7_bEE
(wesnoth-debug)
#8 0x000000000071ab4b
_ZN14synced_context13run_and_throwERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6configbbSt8functionIFvS7_bEE
(wesnoth-debug)
#9 0x000000000101dad6
_ZN6events12menu_handler9kill_unitERNS_13mouse_handlerE (wesnoth-debug)
#10 0x0000000001011790
_ZN21playsingle_controller14hotkey_handler9kill_unitEv (wesnoth-debug)
#11 0x000000000131ae63
_ZN6hotkey16command_executor15execute_commandERKNS_14hotkey_commandEib
(wesnoth-debug)
#12 0x00000000010145c4
_ZN15play_controller14hotkey_handler15execute_commandERKN6hotkey14hotkey_commandEib
(wesnoth-debug)
#13 0x000000000131c4a8
_ZN6hotkey15execute_commandERKNS_14hotkey_commandEPNS_16command_executorEib
(wesnoth-debug)
#14 0x000000000131d242
_ZN6hotkeyL13event_executeERK9SDL_EventPNS_16command_executorE
(wesnoth-debug)
#15 0x000000000131d0fd
_ZN6hotkey9key_eventERK9SDL_EventPNS_16command_executorE (wesnoth-debug)
#16 0x00000000009ab5de
_ZN15controller_base12handle_eventERK9SDL_Event (wesnoth-debug)
#17 0x00000000012ef682 _ZN6events4pumpEv (wesnoth-debug)
#18 0x00000000009ac1ec _ZN15controller_base10play_sliceEb
(wesnoth-debug)
#19 0x0000000000dd5a4d
_ZN15play_controller16play_slice_catchEv (wesnoth-debug)
#20 0x0000000000de52c8
_ZN21playsingle_controller15play_human_turnEv (wesnoth-debug)
#21 0x0000000000de4111
_ZN21playsingle_controller14play_side_implEv (wesnoth-debug)
#22 0x0000000000dd635f _ZN15play_controller9play_sideEv
(wesnoth-debug)
#23 0x0000000000dd6627 _ZN15play_controller9play_turnEv
(wesnoth-debug)
#24 0x0000000000de1c72
_ZN21playsingle_controller23play_scenario_main_loopEv (wesnoth-debug)
#25 0x0000000000de2b9b
_ZN21playsingle_controller13play_scenarioERK6config (wesnoth-debug)
#26 0x0000000000ab28a7
_ZN19campaign_controller19playsingle_scenarioER14end_level_data
(wesnoth-debug)
#27 0x0000000000ab2ec2 _ZN19campaign_controller9play_gameEv
(wesnoth-debug)
#28 0x00000000004dd1da
_ZN13game_launcher11launch_gameENS_16RELOAD_GAME_DATAE (wesnoth-debug)
#29 0x0000000000466f33
_ZL11do_gameloopRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE
(wesnoth-debug)
#30 0x0000000000464b37 main (wesnoth-debug)
#31 0x00007fb8965a0291 __libc_start_main (libc.so.6)
#32 0x00000000004643ca _start (wesnoth-debug)
Stack trace of thread 12792:
#0 0x00007fb89665f551 ppoll (libc.so.6)
#1 0x00007fb88b4c799d pa_mainloop_poll (libpulse.so.0)
#2 0x00007fb88b4c7f8e pa_mainloop_iterate (libpulse.so.0)
#3 0x00007fb88b4c8040 pa_mainloop_run (libpulse.so.0)
#4 0x00007fb899d8de2f n/a (libSDL2-2.0.so.0)
#5 0x00007fb899d532dc n/a (libSDL2-2.0.so.0)
#6 0x00007fb899da28a9 n/a (libSDL2-2.0.so.0)
#7 0x00007fb89a905454 start_thread (libpthread.so.0)
#8 0x00007fb8966687df __clone (libc.so.6)
Stack trace of thread 12793:
#0 0x00007fb89665f551 ppoll (libc.so.6)
#1 0x00007fb88b4c799d pa_mainloop_poll (libpulse.so.0)
#2 0x00007fb88b4c7f8e pa_mainloop_iterate (libpulse.so.0)
#3 0x00007fb899d8dc6f n/a (libSDL2-2.0.so.0)
#4 0x00007fb899cf072b n/a (libSDL2-2.0.so.0)
#5 0x00007fb899d532dc n/a (libSDL2-2.0.so.0)
#6 0x00007fb899da28a9 n/a (libSDL2-2.0.so.0)
#7 0x00007fb89a905454 start_thread (libpthread.so.0)
#8 0x00007fb8966687df __clone (libc.so.6)
Stack trace of thread 12791:
#0 0x00007fb89a90d6c3 do_futex_wait (libpthread.so.0)
#1 0x00007fb89a90d78f __new_sem_wait_slow (libpthread.so.0)
#2 0x00007fb89a90d842 sem_timedwait (libpthread.so.0)
#3 0x00007fb899da2c87 n/a (libSDL2-2.0.so.0)
#4 0x00007fb899d5369c n/a (libSDL2-2.0.so.0)
#5 0x00007fb899d532dc n/a (libSDL2-2.0.so.0)
#6 0x00007fb899da28a9 n/a (libSDL2-2.0.so.0)
#7 0x00007fb89a905454 start_thread (libpthread.so.0)
#8 0x00007fb8966687df __clone (libc.so.6)
backtrace
#0 0x00007fb8965b304f in raise () at /usr/lib/libc.so.6
#1 0x00007fb8965b447a in abort () at /usr/lib/libc.so.6
#2 0x00007fb8965abea7 in __assert_fail_base () at /usr/lib/libc.so.6
#3 0x00007fb8965abf52 in () at /usr/lib/libc.so.6
#4 0x00000000006a7aa1 in
unit_map::iterator_base<unit_map::standard_iter_types>::operator->() const
(this=0x7ffef8e93620)
at src/units/map.hpp:177
#5 0x0000000000e1be19 in synced_command_func_debug_kill(config const&, bool,
bool, std::function<void (std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool)>) (child=...,
use_undo=true) at src/synced_commands.cpp:522
#6 0x00000000007197e8 in synced_context::run(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, config const&, bool,
bool, std::function<void (std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool)>)
(commandname="debug_kill", data=..., use_undo=true, show=true,
error_handler=...) at src/synced_context.cpp:75
#7 0x000000000071aa53 in
synced_context::run_and_store(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, config const&, bool,
bool, std::function<void (std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool)>)
(commandname="debug_kill", data=..., use_undo=true, show=true,
error_handler=...) at src/synced_context.cpp:100
#8 0x000000000071ab4b in
synced_context::run_and_throw(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, config const&, bool,
bool, std::function<void (std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool)>)
(commandname="debug_kill", data=..., use_undo=true, show=true,
error_handler=...) at src/synced_context.cpp:110
#9 0x000000000101dad6 in
events::menu_handler::kill_unit(events::mouse_handler&) (this=0x7ffef8e95f28,
mousehandler=...)
at src/menu_events.cpp:716
#10 0x0000000001011790 in playsingle_controller::hotkey_handler::kill_unit()
(this=0x33e5410) at src/hotkey/hotkey_handler_sp.cpp:91
#11 0x000000000131ae63 in
hotkey::command_executor::execute_command(hotkey::hotkey_command const&, int,
bool) (this=0x33e5410, cmd=..., press=true) at
src/hotkey/command_executor.cpp:197
#12 0x00000000010145c4 in
play_controller::hotkey_handler::execute_command(hotkey::hotkey_command
const&, int, bool) (this=0x33e5410, cmd=..., index=-1, press=true) at
src/hotkey/hotkey_handler.cpp:263
#13 0x000000000131c4a8 in hotkey::execute_command(hotkey::hotkey_command
const&, hotkey::command_executor*, int, bool) (command=...,
executor=0x33e5410, index=-1, press=true) at
src/hotkey/command_executor.cpp:581
#14 0x000000000131d242 in hotkey::event_execute(SDL_Event const&,
hotkey::command_executor*) (event=..., executor=0x33e5410)
at src/hotkey/command_executor.cpp:573
#15 0x000000000131d0fd in hotkey::key_event(SDL_Event const&,
hotkey::command_executor*) (event=..., executor=0x33e5410)
at src/hotkey/command_executor.cpp:560
#16 0x00000000009ab5de in controller_base::handle_event(SDL_Event const&)
(this=0x7ffef8e95d00, event=...) at src/controller_base.cpp:67
#17 0x00000000012ef682 in events::pump() () at src/events.cpp:593
#18 0x00000000009ac1ec in controller_base::play_slice(bool)
(this=0x7ffef8e95d00, is_delay_enabled=true) at src/controller_base.cpp:209
#19 0x0000000000dd5a4d in play_controller::play_slice_catch()
(this=0x7ffef8e95d00) at src/play_controller.cpp:1069
#20 0x0000000000de52c8 in playsingle_controller::play_human_turn()
(this=0x7ffef8e95d00) at src/playsingle_controller.cpp:470
#21 0x0000000000de4111 in playsingle_controller::play_side_impl()
(this=0x7ffef8e95d00) at src/playsingle_controller.cpp:388
#22 0x0000000000dd635f in play_controller::play_side() (this=0x7ffef8e95d00)
at src/play_controller.cpp:1160
#23 0x0000000000dd6627 in play_controller::play_turn() (this=0x7ffef8e95d00)
at src/play_controller.cpp:1198
#24 0x0000000000de1c72 in playsingle_controller::play_scenario_main_loop()
(this=0x7ffef8e95d00) at src/playsingle_controller.cpp:182
#25 0x0000000000de2b9b in playsingle_controller::play_scenario(config const&)
(this=0x7ffef8e95d00, level=...)
at src/playsingle_controller.cpp:262
#26 0x0000000000ab28a7 in
campaign_controller::playsingle_scenario(end_level_data&)
(this=0x7ffef8e96a50, end_level=...)
at src/game_initialization/playcampaign.cpp:196
#27 0x0000000000ab2ec2 in campaign_controller::play_game()
(this=0x7ffef8e96a50) at src/game_initialization/playcampaign.cpp:283
#28 0x00000000004dd1da in
game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) (this=0x2bf0b30,
reload=game_launcher::RELOAD_DATA)
at src/game_launcher.cpp:955
#29 0x0000000000466f33 in
do_gameloop(std::vector<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > const&) (args=std::vector of length 2, capacity 2 =
{...}) at src/wesnoth.cpp:825
#30 0x0000000000464b37 in main(int, char**) (argc=2, argv=0x7ffef8e981a8) at
src/wesnoth.cpp:1054
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?25348>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs