Jim Burnes wrote: > In any case the print statement never actually executes. It appears to be > crashing in the assembly code that interfaces back into the Lua program > (FFI code I'm guessing). Well, a *complete* self-contained example would help. Not some snippets taken out of context. Simply by the process of reducing it to that, one often finds the problem. Returning a NULL pointer is fine, as well as printing it (it'll print as: cdata<...>: NULL). Also, build LuaJIT with debug symbols enabled, otherwise the debugger output isn't very useful. --Mike