Hi David,
do you use lua_checkstack to make sure that there is room enough on the stack? Are the collected stack slots set to nil? You can also compile Lua with lua_assert defined to some assert expression and see what happens.I have tables and userdata that only exist on the thread stack these are the ones that get collected.
-- Wim