Probably you got a stack overflow. Each call status = report(l, lcall(l, 0, 1)); leaves one result on the stack (assuming that `lcall' is `lua_call'). If you do not pop it from the stack, the loop will overflow. -- Roberto