lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I mailed this scenario a month or so earlier but got no replies. Now the problem is haunting me again and I need urgent help.

Coming to the point, I have an in-house debugger integrated in visual studio that I use to debug our game scripts. Its an embedded debugger that uses lua hooks for debugging purposes (uses LUA_MASKLINE | LUA_MASKCALL | LUA_MASKRET). The problem arises when I am in the middle of a debugging session (i.e. inside the hook procedure), executing the code step by step, when a particular line of lua code calls a C function which in turns calls lua_dofile(…) on another script file. In such a scenario, the application crashes! The entire call stack that is accessible to me is give in the end. I can’t seem to figure out the problem. Can someone help me out please? Is there something that I am doing wrong or is it a lua bug? Thanks in advance.

 

       ntdll.dll!7c901230()      

       ntdll.dll!7c96c943()      

       ntdll.dll!7c96cd80()      

       ntdll.dll!7c96df66()      

       ntdll.dll!7c94a5d0()      

       ntdll.dll!7c9268ad()      

       msvcr71.dll!free(void * pBlock=0x01365f58)  Line 103   C

       MJ Game.exe!_luaM_realloc()  + 0x1d     

       MJ Game.exe!_luaC_sweep()  + 0x11f

       MJ Game.exe!_luaC_sweep()  + 0x7d

       MJ Game.exe!_luaC_sweep()  + 0x188

       MJ Game.exe!_luaC_sweep()  + 0x28

       MJ Game.exe!_luaC_collectgarbage()  + 0x16     

       MJ Game.exe!_luaV_execute()  + 0x37c    

       MJ Game.exe!_luaD_call()  + 0x4b 

       MJ Game.exe!_lua_pcall()  + 0x75 

       MJ Game.exe!_luaD_rawrunprotected()  + 0x3a    

       MJ Game.exe!_luaD_pcall()  + 0x41

       MJ Game.exe!_lua_pcall()  + 0x55 

       MJ Game.exe!_lua_dofile()  + 0x3a

       MJ Game.exe!_lua_dofile()  + 0x17

       MJ Game.exe!cHSExecuteScript(lua_State * L=0x013c8be8)  Line 3892 + 0x10   C++

       MJ Game.exe!_luaD_precall()  + 0x160    

       MJ Game.exe!_luaV_execute()  + 0x9fd    

       MJ Game.exe!_luaD_call()  + 0x4b 

       MJ Game.exe!_lua_pcall()  + 0x75 

       MJ Game.exe!_luaD_rawrunprotected()  + 0x3a    

       MJ Game.exe!_luaD_pcall()  + 0x41

       MJ Game.exe!_lua_pcall()  + 0x55 

       MJ Game.exe!_lua_dofile()  + 0x3a

       MJ Game.exe!_lua_dofile()  + 0x17

       MJ Game.exe!cHSExecuteScript(lua_State * L=0x013c8be8)  Line 3892 + 0x10   C++

       MJ Game.exe!_luaD_precall()  + 0x160    

       MJ Game.exe!_luaV_execute()  + 0x9fd    

       MJ Game.exe!_luaD_call()  + 0x4b 

       MJ Game.exe!_lua_pcall()  + 0x75 

       MJ Game.exe!_luaD_rawrunprotected()  + 0x3a    

       MJ Game.exe!_luaD_pcall()  + 0x41

       MJ Game.exe!_lua_pcall()  + 0x55 

       MJ Game.exe!_lua_dofile()  + 0x3a

       MJ Game.exe!_lua_dofile()  + 0x17

       MJ Game.exe!cHSExecuteScript(lua_State * L=0x013c8be8)  Line 3892 + 0x10   C++

       MJ Game.exe!_luaD_precall()  + 0x160    

       MJ Game.exe!_luaV_execute()  + 0x9fd    

       MJ Game.exe!_luaD_call()  + 0x4b 

       MJ Game.exe!_lua_pcall()  + 0x75 

       MJ Game.exe!_luaD_rawrunprotected()  + 0x3a    

       MJ Game.exe!_luaD_pcall()  + 0x41

       MJ Game.exe!_lua_pcall()  + 0x55 

       MJ Game.exe!_lua_dofile()  + 0x3a

       MJ Game.exe!_lua_dofile()  + 0x17

       MJ Game.exe!cHSExecuteScript(lua_State * L=0x013c8be8)  Line 3892 + 0x10   C++

>      Helios_1_0.dll!_luaD_precall()  + 0x160 

       Helios_1_0.dll!_luaV_execute()  + 0x9fd 

       Helios_1_0.dll!_luaD_call()  + 0x4b     

       Helios_1_0.dll!_lua_pcall()  + 0x75     

       Helios_1_0.dll!_luaD_rawrunprotected()  + 0x3a 

       Helios_1_0.dll!_luaD_pcall()  + 0x41    

       Helios_1_0.dll!_lua_pcall()  + 0x55     

       Helios_1_0.dll!_lua_dofile()  + 0x3a    

       Helios_1_0.dll!_lua_dofile()  + 0x17    

       Helios_1_0.dll!HCScriptManager::ExecFile(const char * pszFileName=0x00471f04)  Line 76 + 0x10   C++

       MJ Game.exe!GameAppCB(HCWnd * poWnd=0x00000000, unsigned int uiMsg=1000, int wParam=1244496, int lParam=0)  Line 1490 + 0x14 C++

       MJ Game.exe!GameLoop()  Line 1786 C++

       MJ Game.exe!SDL_main(int argc=1, char * * argv=0x0012fee0)  Line 639 C++

       MJ Game.exe!_main()  + 0xd9 C

       MJ Game.exe!_WinMain@16()  + 0x1cc C

       MJ Game.exe!WinMainCRTStartup()  Line 390 + 0x1b       C

       kernel32.dll!7c816d4f()   

       ntdll.dll!7c915b4f()      

       kernel32.dll!7c8399f3()   

 

Regards,

Zulfiqar Inayat Malik.