URL:
<http://gna.org/bugs/?25483>
Summary: Segfault when using :inspect and selecting an event
which has an id
Project: Battle for Wesnoth
Submitted by: shiki
Submitted on: Do 02 Feb 2017 03:55:05 UTC
Category: Bug
Severity: 1 - Wish
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.12 only
Operating System: Archlinux
_______________________________________________________
Details:
I did get this message on stderr:
20170202 01:25:04 error gui/general: vertical_scrollbar [_vertical_scrollbar]
recalculate: Can't recalculate size, force a window layout phase.
wesnoth: /build/wesnoth/src/wesnoth/src/gui/widgets/grid.cpp:529: virtual void
gui2::tgrid::place(const gui2::tpoint&, const gui2::tpoint&): Assertion
`false' failed.
That's this line in the code:
https://github.com/wesnoth/wesnoth/blob/1.12/src/gui/widgets/grid.cpp#L529
The comment states that this shouldn't be possible... and somehow it is.
We can only reach that place if this conditional fails:
https://github.com/wesnoth/wesnoth/blob/1.12/src/gui/widgets/grid.cpp#L466
As for 1.13, there have been some work on this function, and this conditional
is not there anymore. I guess it did get refactored away, since, as the
comment states, we shouldn't have been able to fail it anyway... but somehow
it did.
But there has been as well other work on that function.
Reproduction steps:
Download War_of_the_Dragon campaign from the add-on server. (currently
v1.4.2)
Start the campaign, switch to debug mode, use :cl to skip to the 6th scenario,
use :inspect, click on events and there on the one only one which has an ID.
I guess it's the case with other events with ids in mainline, but i didn't
find a test case.
stack and backtraces
Stack trace of thread 1572:
#0 0x00007f3a3cf0104f raise (libc.so.6)
#1 0x00007f3a3cf0247a abort (libc.so.6)
#2 0x00007f3a3cef9ea7 __assert_fail_base (libc.so.6)
#3 0x00007f3a3cef9f52 __assert_fail (libc.so.6)
#4 0x000000000077b349 _ZN4gui25tgrid5placeERKNS_6tpointES3_
(wesnoth)
#5 0x0000000000728c2d
_ZN4gui211tcontainer_5placeERKNS_6tpointES3_ (wesnoth)
#6 0x000000000079c894
_ZN4gui220tscrollbar_container5placeERKNS_6tpointES3_ (wesnoth)
#7 0x00000000007811dd
_ZN4gui28tlistbox5placeERKNS_6tpointES3_ (wesnoth)
#8 0x0000000000775b43
_ZN4gui25tgrid6tchild5placeENS_6tpointES2_ (wesnoth)
#9 0x00000000007775e6 _ZN4gui25tgrid6layoutERKNS_6tpointE
(wesnoth)
#10 0x000000000077a425 _ZN4gui25tgrid5placeERKNS_6tpointES3_
(wesnoth)
#11 0x0000000000775b43
_ZN4gui25tgrid6tchild5placeENS_6tpointES2_ (wesnoth)
#12 0x00000000007775e6 _ZN4gui25tgrid6layoutERKNS_6tpointE
(wesnoth)
#13 0x000000000077a425 _ZN4gui25tgrid5placeERKNS_6tpointES3_
(wesnoth)
#14 0x0000000000775b43
_ZN4gui25tgrid6tchild5placeENS_6tpointES2_ (wesnoth)
#15 0x00000000007775e6 _ZN4gui25tgrid6layoutERKNS_6tpointE
(wesnoth)
#16 0x000000000077a425 _ZN4gui25tgrid5placeERKNS_6tpointES3_
(wesnoth)
#17 0x0000000000775b43
_ZN4gui25tgrid6tchild5placeENS_6tpointES2_ (wesnoth)
#18 0x00000000007775e6 _ZN4gui25tgrid6layoutERKNS_6tpointE
(wesnoth)
#19 0x000000000077a425 _ZN4gui25tgrid5placeERKNS_6tpointES3_
(wesnoth)
#20 0x000000000079c92a
_ZN4gui220tscrollbar_container5placeERKNS_6tpointES3_ (wesnoth)
#21 0x0000000000775b43
_ZN4gui25tgrid6tchild5placeENS_6tpointES2_ (wesnoth)
#22 0x00000000007775e6 _ZN4gui25tgrid6layoutERKNS_6tpointE
(wesnoth)
#23 0x000000000077a425 _ZN4gui25tgrid5placeERKNS_6tpointES3_
(wesnoth)
#24 0x0000000000728c2d
_ZN4gui211tcontainer_5placeERKNS_6tpointES3_ (wesnoth)
#25 0x00000000007df395 _ZN4gui27twindow6layoutEv (wesnoth)
#26 0x00000000007e0686 _ZN4gui27twindow4drawEv (wesnoth)
#27 0x0000000000710618
_ZN4gui25event14implementation10fire_eventIN5boost8functionIFvRNS0_11tdispatcherENS0_6teventERbS8_EEENS0_8ttriggerEEEbS7_RSt6vectorISt4pairIPNS_7twidgetES7_ESaISG_EESF_SF_T0_
(wesnoth)
#28 0x000000000070d33b
_ZN4gui25event11tdispatcher4fireENS0_6teventERNS_7twidgetE (wesnoth)
#29 0x000000000071e141 _ZN4gui25event8thandler4drawEb
(wesnoth)
#30 0x000000000071f528
_ZN4gui25event8thandler12handle_eventERK9SDL_Event (wesnoth)
#31 0x0000000000f1486c _ZN6events4pumpEv (wesnoth)
#32 0x00000000007e0ff5 _ZN4gui27twindow4showEbj (wesnoth)
#33 0x0000000000b37603 _ZN4gui27tdialog4showER6CVideoj
(wesnoth)
#34 0x0000000000c17cd7
_ZN6events15console_handler10do_inspectEv (wesnoth)
#35 0x0000000000c15713 n/a (wesnoth)
#36 0x0000000000c15e92
_ZN6events12menu_handler10do_commandERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
(wesnoth)
#37 0x0000000000cddd6a _ZN15play_controller13enter_textboxEv
(wesnoth)
#38 0x00000000009dd9d6
_ZN15controller_base12handle_eventERK9SDL_Event (wesnoth)
#39 0x0000000000f1486c _ZN6events4pumpEv (wesnoth)
#40 0x00000000009de19f _ZN15controller_base10play_sliceEb
(wesnoth)
#41 0x0000000000cfe84e
_ZN21playsingle_controller15play_human_turnEv (wesnoth)
#42 0x0000000000cfbdf8 _ZN21playsingle_controller9play_sideEv
(wesnoth)
#43 0x0000000000cfc636 _ZN21playsingle_controller9play_turnEv
(wesnoth)
#44 0x0000000000cff9ec
_ZN21playsingle_controller13play_scenarioERKSt4pairIN6config20const_child_iteratorES2_Eb
(wesnoth)
#45 0x0000000000cf32eb
_Z9play_gameR12game_displayR10game_stateRK6config9io_type_tbbb (wesnoth)
#46 0x0000000000a90d86
_ZN15game_controller11launch_gameENS_16RELOAD_GAME_DATAE (wesnoth)
#47 0x00000000006f914e n/a (wesnoth)
#48 0x00000000006db202 main (wesnoth)
#49 0x00007f3a3ceee291 __libc_start_main (libc.so.6)
#50 0x00000000006f586a _start (wesnoth)
Stack trace of thread 1573:
#0 0x00007f3a4082e79d __nanosleep (libpthread.so.0)
#1 0x00007f3a40a8fee5 SDL_Delay (libSDL-1.2.so.0)
#2 0x00007f3a40a8ff32 n/a (libSDL-1.2.so.0)
#3 0x00007f3a40a4bfe8 n/a (libSDL-1.2.so.0)
#4 0x00007f3a40a8d8a9 n/a (libSDL-1.2.so.0)
#5 0x00007f3a40825454 start_thread (libpthread.so.0)
#6 0x00007f3a3cfb67df __clone (libc.so.6)
Stack trace of thread 1577:
#0 0x00007f3a3d49c57e futex_wait (libgomp.so.1)
#1 0x00007f3a3d499d80 gomp_thread_start (libgomp.so.1)
#2 0x00007f3a40825454 start_thread (libpthread.so.0)
#3 0x00007f3a3cfb67df __clone (libc.so.6)
Stack trace of thread 1578:
#0 0x00007f3a3d49c57e futex_wait (libgomp.so.1)
#1 0x00007f3a3d499d80 gomp_thread_start (libgomp.so.1)
#2 0x00007f3a40825454 start_thread (libpthread.so.0)
#3 0x00007f3a3cfb67df __clone (libc.so.6)
Stack trace of thread 1575:
#0 0x00007f3a3cfad551 ppoll (libc.so.6)
#1 0x00007f3a32b3c79d pa_mainloop_poll (libpulse.so.0)
#2 0x00007f3a32b3cd8e pa_mainloop_iterate (libpulse.so.0)
#3 0x00007f3a40a6feed n/a (libSDL-1.2.so.0)
#4 0x00007f3a40a43800 n/a (libSDL-1.2.so.0)
#5 0x00007f3a40a4bfe8 n/a (libSDL-1.2.so.0)
#6 0x00007f3a40a8d8a9 n/a (libSDL-1.2.so.0)
#7 0x00007f3a40825454 start_thread (libpthread.so.0)
#8 0x00007f3a3cfb67df __clone (libc.so.6)
Stack trace of thread 1576:
#0 0x00007f3a3d49c57e futex_wait (libgomp.so.1)
#1 0x00007f3a3d499d80 gomp_thread_start (libgomp.so.1)
#2 0x00007f3a40825454 start_thread (libpthread.so.0)
#3 0x00007f3a3cfb67df __clone (libc.so.6)
(gdb) backtrace
#0 0x00007f3a3cf0104f in raise () at /usr/lib/libc.so.6
#1 0x00007f3a3cf0247a in abort () at /usr/lib/libc.so.6
#2 0x00007f3a3cef9ea7 in __assert_fail_base () at /usr/lib/libc.so.6
#3 0x00007f3a3cef9f52 in () at /usr/lib/libc.so.6
#4 0x000000000077b349 in gui2::tgrid::place(gui2::tpoint const&, gui2::tpoint
const&) ()
#5 0x0000000000728c2d in gui2::tcontainer_::place(gui2::tpoint const&,
gui2::tpoint const&) ()
#6 0x000000000079c894 in gui2::tscrollbar_container::place(gui2::tpoint
const&, gui2::tpoint const&) ()
#7 0x00000000007811dd in gui2::tlistbox::place(gui2::tpoint const&,
gui2::tpoint const&) ()
#8 0x0000000000775b43 in gui2::tgrid::tchild::place(gui2::tpoint,
gui2::tpoint) ()
#9 0x00000000007775e6 in gui2::tgrid::layout(gui2::tpoint const&) ()
#10 0x000000000077a425 in gui2::tgrid::place(gui2::tpoint const&, gui2::tpoint
const&) ()
#11 0x0000000000775b43 in gui2::tgrid::tchild::place(gui2::tpoint,
gui2::tpoint) ()
#12 0x00000000007775e6 in gui2::tgrid::layout(gui2::tpoint const&) ()
#13 0x000000000077a425 in gui2::tgrid::place(gui2::tpoint const&, gui2::tpoint
const&) ()
#14 0x0000000000775b43 in gui2::tgrid::tchild::place(gui2::tpoint,
gui2::tpoint) ()
#15 0x00000000007775e6 in gui2::tgrid::layout(gui2::tpoint const&) ()
#16 0x000000000077a425 in gui2::tgrid::place(gui2::tpoint const&, gui2::tpoint
const&) ()
#17 0x0000000000775b43 in gui2::tgrid::tchild::place(gui2::tpoint,
gui2::tpoint) ()
#18 0x00000000007775e6 in gui2::tgrid::layout(gui2::tpoint const&) ()
#19 0x000000000077a425 in gui2::tgrid::place(gui2::tpoint const&, gui2::tpoint
const&) ()
#20 0x000000000079c92a in gui2::tscrollbar_container::place(gui2::tpoint
const&, gui2::tpoint const&) ()
#21 0x0000000000775b43 in gui2::tgrid::tchild::place(gui2::tpoint,
gui2::tpoint) ()
#22 0x00000000007775e6 in gui2::tgrid::layout(gui2::tpoint const&) ()
#23 0x000000000077a425 in gui2::tgrid::place(gui2::tpoint const&, gui2::tpoint
const&) ()
#24 0x0000000000728c2d in gui2::tcontainer_::place(gui2::tpoint const&,
gui2::tpoint const&) ()
#25 0x00000000007df395 in gui2::twindow::layout() ()
#26 0x00000000007e0686 in gui2::twindow::draw() ()
#27 0x0000000000710618 in bool
gui2::event::implementation::fire_event<boost::function<void
(gui2::event::tdispatcher&, gui2::event::tevent, bool&, bool&)>,
gui2::event::ttrigger>(gui2::event::tevent,
std::vector<std::pair<gui2::twidget*, gui2::event::tevent>,
std::allocator<std::pair<gui2::twidget*, gui2::event::tevent> > >&,
gui2::twidget*, gui2::twidget*, gui2::event::ttrigger) ()
#28 0x000000000070d33b in gui2::event::tdispatcher::fire(gui2::event::tevent,
gui2::twidget&) ()
#29 0x000000000071e141 in gui2::event::thandler::draw(bool) ()
#30 0x000000000071f528 in gui2::event::thandler::handle_event(SDL_Event
const&) ()
#31 0x0000000000f1486c in events::pump() ()
#32 0x00000000007e0ff5 in gui2::twindow::show(bool, unsigned int) ()
#33 0x0000000000b37603 in gui2::tdialog::show(CVideo&, unsigned int) ()
#34 0x0000000000c17cd7 in events::console_handler::do_inspect() ()
#35 0x0000000000c15713 in ()
#36 0x0000000000c15e92 in
events::menu_handler::do_command(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > co---Type <return> to continue,
or q <return> to quit---
nst&) ()
#37 0x0000000000cddd6a in play_controller::enter_textbox() ()
#38 0x00000000009dd9d6 in controller_base::handle_event(SDL_Event const&) ()
#39 0x0000000000f1486c in events::pump() ()
#40 0x00000000009de19f in controller_base::play_slice(bool) ()
#41 0x0000000000cfe84e in playsingle_controller::play_human_turn() ()
#42 0x0000000000cfbdf8 in playsingle_controller::play_side() ()
#43 0x0000000000cfc636 in playsingle_controller::play_turn() ()
#44 0x0000000000cff9ec in
playsingle_controller::play_scenario(std::pair<config::const_child_iterator,
config::const_child_iterator> const&, bool) ()
#45 0x0000000000cf32eb in play_game(game_display&, game_state&, config const&,
io_type_t, bool, bool, bool) ()
#46 0x0000000000a90d86 in
game_controller::launch_game(game_controller::RELOAD_GAME_DATA) ()
#47 0x00000000006f914e in ()
#48 0x00000000006db202 in main ()
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?25483>
_______________________________________________
Nachricht gesendet von/durch Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs