URL:
<http://gna.org/bugs/?19133>
Summary: The game segfaults if the Create Unit dialog is
invoked when there are unit types with weird/invalid ids
Project: Battle for Wesnoth
Submitted by: espreon
Submitted on: Wed 07 Dec 2011 05:30:35 PM GMT
Category: Bug
Severity: 2 - Minor
Priority: 3 - Low
Item Group: None of the others
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 1.9.12+svn (52193)
Operating System: Sabayon Linux
_______________________________________________________
Details:
I encountered this bug when porting The Heist to 1.9.x for my own amusement.
To get the appropriate version of The Heist, run: git clone
git://github.com/Espreon/The_Heist.git -b create_unit_dialog_bug_test
Once you have The Heist put in the add-ons directory, do the following to
reproduce:
1. Start The Heist
2. :debug
3. Summon the Create Unit dialog
4. Behold
Error:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000887145 in dialogs::unit_types_preview_pane::get_details
(this=0x7fffffff9fd0) at src/dialogs.cpp:1004
1004 det.alignment =
unit_type::alignment_description(t->alignment(), t->genders().front());
Backtrace:
#0 0x0000000000887145 in dialogs::unit_types_preview_pane::get_details
(this=0x7fffffff9fd0) at src/dialogs.cpp:1004
#1 0x00000000008856cf in dialogs::unit_preview_pane::draw_contents
(this=0x7fffffff9fd0) at src/dialogs.cpp:763
#2 0x0000000000d35086 in gui::widget::draw (this=0x7fffffff9fd0) at
src/widgets/widget.cpp:290
#3 0x0000000000c6e3e5 in gui::dialog::draw_contents (this=0x7fffffff9aa0) at
src/construct_dialog.cpp:318
#4 0x0000000000c6e1e9 in gui::dialog::show (this=0x7fffffff9aa0) at
src/construct_dialog.cpp:292
#5 0x0000000000a2c3b7 in events::menu_handler::create_unit
(this=0x7fffffffb5e0, mousehandler=...) at src/menu_events.cpp:1584
#6 0x000000000060e73a in playsingle_controller::create_unit
(this=0x7fffffffb420) at src/playsingle_controller.cpp:168
#7 0x0000000000c9b375 in hotkey::command_executor::execute_command
(this=0x7fffffffb420, command=hotkey::HOTKEY_CREATE_UNIT) at
src/hotkeys.cpp:1014
#8 0x0000000000a7546b in play_controller::execute_command
(this=0x7fffffffb420, command=hotkey::HOTKEY_CREATE_UNIT, index=0) at
src/play_controller.cpp:783
#9 0x0000000000c9b913 in hotkey::execute_command (disp=...,
command=hotkey::HOTKEY_CREATE_UNIT, executor=0x7fffffffb420, index=0) at
src/hotkeys.cpp:1151
#10 0x0000000000c9c69a in hotkey::command_executor::show_menu
(this=0x7fffffffb420, items_arg=std::vector of length 8, capacity 24 = {...},
xloc=507, yloc=367, context_menu=true, gui=...)
at src/hotkeys.cpp:1259
#11 0x0000000000a77ec2 in play_controller::show_menu (this=0x7fffffffb420,
items_arg=std::vector of length 24, capacity 24 = {...}, xloc=507, yloc=367,
context_menu=true)
at src/play_controller.cpp:1198
#12 0x000000000087d4fa in controller_base::handle_event (this=0x7fffffffb420,
event=...) at src/controller_base.cpp:94
#13 0x0000000000c91a4f in events::pump () at src/events.cpp:380
#14 0x000000000087dc2a in controller_base::play_slice (this=0x7fffffffb420,
is_delay_enabled=true) at src/controller_base.cpp:197
#15 0x000000000061234c in playsingle_controller::linger (this=0x7fffffffb420)
at src/playsingle_controller.cpp:761
#16 0x000000000060250c in playsingle_scenario (game_config=...,
level=0x7fffffffbc40, disp=..., state_of_game=..., story=...,
skip_replay=false, end_level=...) at src/playcampaign.cpp:145
#17 0x0000000000604c6b in play_game (disp=..., gamestate=...,
game_config=..., io_type=IO_NONE, skip_replay=false) at
src/playcampaign.cpp:365
#18 0x0000000000486c78 in game_controller::launch_game (this=0x1621a50,
reload=game_controller_abstract::RELOAD_DATA) at src/game_controller.cpp:1267
#19 0x0000000000420881 in do_gameloop (argc=1, argv=0x7fffffffdc38) at
src/game.cpp:577
#20 0x0000000000420d82 in main (argc=1, argv=0x7fffffffdc38) at
src/game.cpp:636
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?19133>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs