URL:
  <http://gna.org/bugs/?19798>

                 Summary: Wesnoth crashes to desktop when using reserved Lua
keyword
                 Project: Battle for Wesnoth
            Submitted by: mattsc
            Submitted on: Mon 11 Jun 2012 10:36:15 PM GMT
                Category: Bug
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Artificial Intelligence
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.11.0-svn r54375/6
        Operating System: OS X

    _______________________________________________________

Details:

Wesnoth crashes to Desktop when using a reserved Lua keyword inside the Lua AI
engine.  To reproduce, unzip the attached campaign, start, and go to the
'Animals' scenario.  It will crash as soon as the first AI side begins its
move.  (Or you could just try to use a reserved keyword as a variable name in
any Lua AI code.)  This has to be done with trunk, as the keyword used here
(goto) is only reserved since Lua 5.2.  There's no problem with Lua 5.1 in BfW
1.10.3.

This might be related to bug #19782, or even the same, but the backtrace
provided by anonymissimus (see below) is different, so it's provided as a
separate report.

See also discussion on IRC starting at 20120610 21:05:15


        msvcr90d.dll!_wassert(const wchar_t * expr=0x02d615ac, const wchar_t *
filename=0x02d615c0, unsigned int lineno=418)  Zeile 335        C
        wesnoth.exe!boost::shared_ptr<ai::lua_ai_context>::operator->()  Zeile 
418 +
0x1f Bytes      C++
        wesnoth.exe!ai::engine_lua::engine_lua(ai::readonly_context & 
context={...},
const config & cfg={...})  Zeile 243 + 0x12 Bytes       C++
        
wesnoth.exe!ai::register_engine_factory<ai::engine_lua>::get_new_instance(ai::readonly_context
& ai={...}, const config & cfg={...})  Zeile 154 + 0x36 Bytes   C++
        wesnoth.exe!ai::engine_cpp::do_parse_engine_from_config(const config &
cfg={...},
std::back_insert_iterator<std::vector<boost::shared_ptr<ai::engine>,std::allocator<boost::shared_ptr<ai::engine>
> > > b={...})  Zeile 128 + 0x3c Bytes  C++
        wesnoth.exe!ai::engine::parse_engine_from_config(ai::readonly_context &
context={...}, const config & cfg={...},
std::back_insert_iterator<std::vector<boost::shared_ptr<ai::engine>,std::allocator<boost::shared_ptr<ai::engine>
> > > b={...})  Zeile 72 + 0x2b Bytes   C++
        wesnoth.exe!ai::readonly_context_impl::on_readonly_context_create()  
Zeile
225 + 0x29 Bytes        C++
        wesnoth.exe!ai::holder::init(int side=2)  Zeile 75 + 0x17 Bytes C++
>       wesnoth.exe!ai::holder::get_ai_ref()  Zeile 126 C++
        wesnoth.exe!ai::manager::get_active_ai_for_side(int side=2)  Zeile 783  
C++
        wesnoth.exe!ai::manager::play_turn(int side=2)  Zeile 733 + 0x9 Bytes   
C++
        wesnoth.exe!playsingle_controller::play_ai_turn()  Zeile 840 + 0xf
Bytes   C++
        wesnoth.exe!playsingle_controller::play_side(const unsigned int
side_number=2, bool save=true)  Zeile 658 + 0x8 Bytes   C++
        wesnoth.exe!playsingle_controller::play_turn(bool save=true)  Zeile 588 
+
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 388 + 0x1a
Bytes   C++
        wesnoth.exe!playsingle_scenario(const config & game_config={...}, const
config * level=0x0012e664, 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 130 + 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 367 + 0x28 Bytes      C++
        
wesnoth.exe!game_controller::launch_game(game_controller_abstract::RELOAD_GAME_DATA
reload=RELOAD_DATA)  Zeile 1266 + 0x4b Bytes    C++
        wesnoth.exe!do_gameloop(int argc=3, char * * argv=0x0012fe90)  Zeile 
582 +
0x2d Bytes      C++
        wesnoth.exe!SDL_main(int argc=3, char * * argv=0x0012fe90)  Zeile 638 + 
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




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mon 11 Jun 2012 10:36:15 PM GMT  Name: v0.7.0.tgz  Size: 175kB   By:
mattsc

<http://gna.org/bugs/download.php?file_id=15813>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?19798>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to