lua-users home
lua-l archive

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


I have found a few Lua crashes that would have been caught earlier, in a
completely unrelated call stack, if Lua asserts were enabled. Try that.
Oddly, the docs don't mention this, or even what you have to define to
get asserts working. You need to define lua_assert such that it exists
when including llimits.h and lualib.h.

-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Taj Khattra
Sent: Saturday, November 15, 2003 11:58 PM
To: Lua list
Subject: Re: lua crashes

On Sat, Nov 15, 2003 at 07:14:13PM +0600, Antero Vipunen wrote:
> 
>  I have a strange problem(I think with lua GC):
> 
> #0  0x08127820 in luaC_separateudata ()
> #1  0x081282de in mark ()
> #2  0x08128350 in luaC_collectgarbage ()
> #3  0x081248ff in lua_pushlstring ()
> #4  0x08124961 in lua_pushstring ()
> #5  0x080fbca5 in PrepareScriptStartup (pOwner=0x309068, 
> pInfo=0xbffff47c, pList=0x889ba68,
>     TrgName=0x8309308 "??????? ????? ?????? ?? ???? - 1", iType=2) at
> lua_scripts.c:1162
> #6  0x080fc189 in ScriptDriver (pOwner=0x309068, pTrig=0x83092c0, 
> pVARList=0x8a00803, iType=2) at lua_scripts.c:1339
> #7  0x08119131 in random_wtrigger (room=0x309068) at 
> dg_triggers_c.c:1406
> #8  0x0810c8d8 in script_trigger_check () at dg_scripts.c:623
> #9  0x0809526d in heartbeat (heart_pulse=2340) at comm.c:976 #10 
> 0x080951a1 in game_loop (mother_desc=3) at comm.c:945
> #11 0x080946cf in init_game (port=3) at comm.c:502
> #12 0x0809457f in main (argc=3, argv=0xbffffd94) at comm.c:431
> 

looks like there is no debugging info for the lua frames (0-4).
might help to know which line number in luaC_separateudata() it's
crashing in.  also, which platform ?  if x86-linux, try valgrind to see
if it catches any invalid memory references.

-taj