Lua性能分析器崩溃,因为堆栈顶部为空。

我正在使用已编译到我的iOS应用程序中的LuaProfiler。我是这样使用它的: http://luaprofiler.luaforge.net/manual.html

function GameManager:startGame()
    profiler.start( getWritablePath()  .. "GameManager.xxx")
    print("GameManager:startGame()")
    - -[[
         大量代码 \ 
    - -]]
    profiler.stop()
end

在处理空函数堆栈时,分析器会崩溃:

function_meter.c: assertion failed: pause_total_time: stack_top null

我是不是使用分析器的错误方式? 或许它应该与其他参数一起编译,就像Lua解释器一样。 应该更改什么才能让它工作,或者我应该从哪里寻找答案?

原文链接 https://stackoverflow.com/questions/9567846

点赞