Cool trick that, shadowing. I wrote a small module to trace all love functions starting with 'new'. It also prints the function arguments.
Code: Select all
local function trace(moduleName, mod, funcName, func)
mod[funcName] = function(...)
print(moduleName..'.'..funcName, ...)
return func(...)
end
end
for moduleName, mod in pairs(love) do
if type(mod) == 'table' then
for key, func in pairs(mod) do
if type(func) == 'function' and type(key) == 'string' and key:sub(1, 3) == 'new' then
trace(moduleName, mod, key, func)
end
end
end
end
I got loads of traces for newImage, newQuads, newParticleSystem and such, but they all happen during initialization, not the game loop. I'll keep my eyes open for the crash and see if something goes haywire just before it happens.
Any ideas why the game crashes with a PANIC, though? LOVE stores data off the lua heap (userdata?). Does this still count against luajit's 2GB limit?