bugBattle for Wesnoth - Bugs: bug #18631, lua error in the test scenario (#1)

 
 
Show feedback again

bug #18631: lua error in the test scenario (#1)

Submitted by:  Anonymissimus <anonymissimus>
Submitted on:  Sat 10 Sep 2011 12:53:56 PM UTC  
 
Category: BugSeverity: 3 - Normal
Priority: 5 - NormalItem Group:  None of the others
Status: FixedPrivacy: Public
Assigned to: Thonsew <thonsew>Open/Closed: Closed
Release: trunkOperating System: win xp

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 10 Oct 2011 01:54:04 PM UTC, comment #2:

Confirmed that this stays fixed in r51427.

Anonymissimus <anonymissimus>
Project Member
Tue 20 Sep 2011 09:21:22 PM UTC, SVN revision 51240:

Added support for t_token to lua code.
1. Created a t_token metatable along with support code for indexing, garbage collection, tostring, tonumber, comparison and concatenation.
2. Adjusted string comparison and lookup in lua code to work with either t_token or string.
This addresses in part bug #18631, bug #18695. Before this lua was treating all t_token as either tstrings or strings.

(Browse SVN revision 51240)

Thonsew <thonsew>
Project MemberIn charge of this item.
Sat 10 Sep 2011 12:53:56 PM UTC, original submission:

At the start of the test scenario there is a new "lua" error. Originally found by Espreon. It is triggered by the call to [modify_unit], meaning wesnoth.set_variable, and most likely caused by new token stuff:

It happens exactly upon setting the [chance_to_hit]description= variable. Possibly because that's a translatable string or because of the line break involved, see the definition of WEAPON_SPECIAL_MAGICAL in core.
Here's a call stack until the point it throws the error:

> wesnoth.exe!config::check_valid() Line 66 C++

wesnoth.exe!config::child_count(const n_token::t_token & key={...}) Line 460 C++
wesnoth.exe!variable_info::init(const n_token::t_token & varname={...}, bool force_valid=true) Line 728 + 0x14 bytes C++
wesnoth.exe!variable_info::variable_info(const n_token::t_token & varname={...}, bool force_valid=true, variable_info::TYPE validation_type=TYPE_UNSPECIFIED) Line 834 + 0x11 bytes C++
wesnoth.exe!intf_set_variable(lua_State * L=0x0830d028) Line 1404 + 0x10 bytes C++
wesnoth.exe!luaD_precall(lua_State * L=0x0830d028, lua_TValue * func=0x058e23d8, int nresults=0) Line 323 + 0x16 bytes C++
wesnoth.exe!luaV_execute(lua_State * L=0x0830d028, int nexeccalls=7) Line 590 + 0x14 bytes C++
wesnoth.exe!luaD_call(lua_State * L=0x0830d028, lua_TValue * func=0x0c867220, int nResults=0) Line 381 + 0xb bytes C++
wesnoth.exe!f_call(lua_State * L=0x0830d028, void * ud=0x0012493c) Line 800 + 0x16 bytes C++
wesnoth.exe!luaD_rawrunprotected(lua_State * L=0x0830d028, void (lua_State , void )* f=0x026fdea0, void * ud=0x0012493c) Line 122 + 0x11 bytes C++
wesnoth.exe!luaD_pcall(lua_State * L=0x0830d028, void (lua_State , void )* func=0x026fdea0, void * u=0x0012493c, int old_top=32, int ef=16) Line 467 + 0x11 bytes C++
wesnoth.exe!lua_pcall(lua_State * L=0x0830d028, int nargs=1, int nresults=0, int errfunc=-3) Line 821 + 0x20 bytes C++
wesnoth.exe!luaW_pcall(lua_State * L=0x0830d028, int nArgs=1, int nRets=0, bool allow_wml_error=true) Line 450 + 0x1a bytes C++
wesnoth.exe!LuaKernel::run_wml_action(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & cmd="command", const vconfig & cfg={...}, const game_events::queued_event & ev={...}) Line 3883 + 0xf bytes C++
wesnoth.exe!game_events::handle_event_commands(const game_events::queued_event & event_info={...}, const vconfig & cfg={...}) Line 3257 C++
wesnoth.exe!game_events::event_handler::handle_event(const game_events::queued_event & event_info={...}) Line 3251 + 0x3d bytes C++
wesnoth.exe!process_event(game_events::event_handler & handler={...}, const game_events::queued_event & ev={...}) Line 3217 C++
wesnoth.exe!game_events::pump() Line 3558 + 0x13 bytes C++
wesnoth.exe!game_events::fire(const n_token::t_token & event={...}, const game_events::entity_location & loc1={...}, const game_events::entity_location & loc2={...}, const config & data={...}) Line 3488 C++
wesnoth.exe!events::console_handler::do_event() Line 3608 + 0xc8 bytes C++
wesnoth.exe!events::map_command_handler<events::console_handler>::dispatch(std::basic_string<char,std::char_traits<char>,std::allocator<char> > cmd="throw error") Line 2024 + 0x12 bytes C++
wesnoth.exe!events::menu_handler::do_command(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & str="throw error") Line 3115 C++
wesnoth.exe!play_controller::enter_textbox() Line 892 C++
wesnoth.exe!play_controller::process_focus_keydown_event(const SDL_Event & event={...}) Line 1033 C++
wesnoth.exe!controller_base::handle_event(const SDL_Event & event={...}) Line 62 + 0x1a bytes C++
wesnoth.exe!events::pump() Line 380 + 0x35 bytes C++
wesnoth.exe!controller_base::play_slice(bool is_delay_enabled=true) Line 198 C++
wesnoth.exe!playsingle_controller::play_human_turn() Line 721 C++
wesnoth.exe!playsingle_controller::play_side(const unsigned int team_index=1, bool save=true) Line 645 + 0x12 bytes C++
wesnoth.exe!playsingle_controller::play_turn(bool save=true) Line 599 + 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) Line 400 + 0x1a bytes C++
wesnoth.exe!playsingle_scenario(const config & game_config={...}, const config * level=0x0012e654, 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={...}) Line 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) Line 365 + 0x28 bytes C++
wesnoth.exe!game_controller::launch_game(game_controller_abstract::RELOAD_GAME_DATA reload=NO_RELOAD_DATA) Line 1264 + 0x4b bytes C++
wesnoth.exe!do_gameloop(int argc=3, char * * argv=0x0012fe90) Line 567 + 0x2d bytes C++
wesnoth.exe!SDL_main(int argc=3, char * * argv=0x0012fe90) Line 621 + 0xd bytes C++
wesnoth.exe!_main() + 0xf5 bytes C
wesnoth.exe!_WinMain@16() + 0xae bytes C
wesnoth.exe!__tmainCRTStartup() Line 547 + 0x2c bytes C
wesnoth.exe!WinMainCRTStartup() Line 371 C

Anonymissimus <anonymissimus>
Project Member

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by thonsew (Updated the item)
  • -unavailable- added by anonymissimus (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 26 Sep 2011 09:19:31 PM UTCthonsewOpen/ClosedOpen=>Closed
    Thu 15 Sep 2011 08:52:07 PM UTCthonsewStatusIn Progress=>Fixed
    Sat 10 Sep 2011 05:00:53 PM UTCthonsewStatusNone=>In Progress
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup