URL: <http://gna.org/bugs/?20199>
Summary: out of bounds access to std::map in mouse_events.cpp:740 Project: Battle for Wesnoth Submitted by: anonymissimus Submitted on: Tue 25 Sep 2012 04:44:03 PM GMT Category: Bug Severity: 3 - Normal Priority: 5 - Normal Item Group: None of the others Status: None Privacy: Public Assigned to: fendrin Originator Email: Open/Closed: Open Discussion Lock: Any Release: 1.11.0+svn@r55406 Operating System: win xp _______________________________________________________ Details: In the test scenario, move the wolf rider from (18,9) to (14,9), this crashes for me under the MSVC debugger (MinGw doesn't). Perhaps insert an assertion there or something to make it crash in case it does not. I've test-reverted r55401; this appears to be the offending one. The current_route_.steps is empty, thus the crash. backtrace: ++ msvcp90d.dll!std::_Debug_message(const wchar_t * message=0x02eff750, const wchar_t * file=0x02eff798, unsigned int line=779) Zeile 24 C++ wesnoth.exe!std::vector<map_location,std::allocator<map_location> >::operator[](unsigned int _Pos=4) Zeile 779 + 0x17 Bytes C++ > wesnoth.exe!events::mouse_handler::move_unit_along_current_route() > Zeile 740 + 0xf Bytes C++ wesnoth.exe!events::mouse_handler::left_click(int x=764, int y=710, const bool browse=false) Zeile 618 C++ wesnoth.exe!events::mouse_handler_base::left_drag_end(int x=764, int y=710, const bool browse=false) Zeile 255 + 0x1c Bytes C++ wesnoth.exe!events::mouse_handler_base::clear_dragging(const SDL_MouseButtonEvent & event={...}, bool browse=false) Zeile 312 + 0x24 Bytes C++ wesnoth.exe!events::mouse_handler_base::mouse_press(const SDL_MouseButtonEvent & event={...}, const bool browse=false) Zeile 147 C++ wesnoth.exe!events::mouse_handler::mouse_press(const SDL_MouseButtonEvent & event={...}, const bool browse=false) Zeile 450 C++ wesnoth.exe!controller_base::handle_event(const SDL_Event & event={...}) Zeile 95 + 0x44 Bytes C++ wesnoth.exe!events::pump() Zeile 378 + 0x35 Bytes C++ wesnoth.exe!controller_base::play_slice(bool is_delay_enabled=true) Zeile 202 C++ wesnoth.exe!playsingle_controller::play_human_turn() Zeile 720 C++ wesnoth.exe!playsingle_controller::play_side(const unsigned int side_number=1, bool save=true) Zeile 647 + 0x12 Bytes C++ wesnoth.exe!playsingle_controller::play_turn(bool save=true) Zeile 597 + 0x21 Bytes C++ wesnoth.exe!playsingle_controller::play_scenario(const std::pair<config::const_child_iterator,config::const_child_iterator> & story=({i_=... },{i_=... }), bool skip_replay=false) Zeile 397 + 0x1a Bytes C++ wesnoth.exe!playsingle_scenario(const config & game_config={...}, const config * level=0x05db4540, display & disp={...}, game_state & state_of_game={...}, const std::pair<config::const_child_iterator,config::const_child_iterator> & story=({i_=... },{i_=... }), bool skip_replay=false, end_level_data & end_level={...}) Zeile 223 + 0x14 Bytes C++ wesnoth.exe!play_game(display & disp={...}, game_state & gamestate={...}, const config & game_config={...}, io_type_t io_type=IO_NONE, bool skip_replay=false) Zeile 491 + 0x28 Bytes C++ wesnoth.exe!game_controller::play_test() Zeile 344 + 0x4b Bytes C++ wesnoth.exe!do_gameloop(int argc=4, char * * argv=0x0012fe80) Zeile 479 + 0x26 Bytes C++ wesnoth.exe!SDL_main(int argc=4, char * * argv=0x0012fe80) Zeile 646 + 0xd Bytes C++ wesnoth.exe!_main() + 0xf5 Bytes C wesnoth.exe!_WinMain@16() + 0xae Bytes C wesnoth.exe!__tmainCRTStartup() Zeile 574 + 0x35 Bytes C wesnoth.exe!WinMainCRTStartup() Zeile 399 C -- _______________________________________________________ Reply to this item at: <http://gna.org/bugs/?20199> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Wesnoth-bugs mailing list Wesnoth-bugs@gna.org https://mail.gna.org/listinfo/wesnoth-bugs