[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Extremely intermittent assert
- From: Tim Mensch <tim-lua-l@...>
- Date: Sat, 13 Aug 2011 23:45:14 -0600
When I'm first running my game on Windows, during init it will very very
rarely assert deep in Lua right after doing a pushclosure(). The assert
is line 664 in lgc.c:
lua_assert(isblack(o) && iswhite(v) && !isdead(g, v) && !isdead(g, o));
If I skip past that assert, it then asserts once on line 374 of lparser.c:
lua_assert(luaG_checkcode(f));
After that, the game seems to run normally (no more asserts). My
question is whether these asserts are likely indicative of a deeper
problem in my code? I've only seen this maybe three times in hundreds of
runs, though since lua_assert is only enabled in debug builds, if this
is actually hinting at some kind of random corruption, it would be good
to know.
As far as I can tell all the code up until that point should be
deterministic; there's no user input or randomness involved, and there
is only a single thread that ever accesses Lua. It's in the midst of
binding a bunch of functions to Lua, calling "require" on the various
game utility files, and running other various initialization code.
Since it SEEMS to be OK, my current plan is to leave Lua asserts
disabled in release code. Let me know if you think should be digging for
a deeper issue.
Tim