Lua Lanes崩溃申请

时间:2013-01-24 09:14:03

标签: c lua lua-lanes

我有一个Lua脚本,它使用了lua lanes。我有以下脚本制作
为了

local lanes = require "lanes"  
lanes.configure()  
require "helper_interfaces"  
--require "assert"  
local cleanup  
local error_func =  function(err)  
                     return debug.traceback(err)  
                    end

local function sample(n)  
   -- set_finalizer(cleanup)  
   local success, result = xpcall(m.usb_lua_printlog("hi\r\n"), error_func)  
   print(success, result)  
   return 2*n  
end

--lanes.configure()  
EnablePrintLog()  
--PrintLog("hi")  
usb_lua_printlog("hi\r\n")  
local lanes_gen = assert(lanes.gen)  
local lanes_linda = assert(lanes.linda)  

--while (true) do  
a1 = lanes_gen("*", { globals =  { ["m"] = require "UsbTestApp" } }, sample)(1)  
a1:join()  
--set_debug_threadname("first")  
while true do  
  str = a1.status  
  --thread_gc(a1)  
  if str == "done" or str == "cancelled" or str == "error" then  
     usb_lua_wait(1000)  
     break  
  end    
end  

我的问题是:

现在当我从我的应用程序执行它时(在Windows上)我在执行它时遇到崩溃,接下来是崩溃时的调用堆栈。

UsbTestApp.exe!_CrtIsValidHeapPointer(const void * pUserData)  Line 2036    C++  
UsbTestApp.exe!_free_dbg_nolock(void * pUserData, int nBlockUse)  Line 1322 + 0x9         bytes C++  
UsbTestApp.exe!_free_dbg(void * pUserData, int nBlockUse)  Line 1265 + 0xd bytes        C++>  
UsbTestApp.exe!free(void * pUserData)  Line 49 + 0xb bytes  C++  
UsbTestApp.exe!_luaL_loadbuffer()  + 0x42 bytes C  
UsbTestApp.exe!_luaM_realloc_()  + 0x23 bytes   C  
UsbTestApp.exe!_luaH_free()  + 0x2b bytes   C  
UsbTestApp.exe!_luaC_separateudata()  + 0x95d bytes C  
UsbTestApp.exe!_luaC_freeall()  + 0x4ce bytes   C  
UsbTestApp.exe!_luaC_fullgc()  + 0x4f bytes C  
UsbTestApp.exe!_lua_gc()  + 0x3f bytes  C  
UsbTestApp.exe!USB_LUA_TEST_EXECUTE_SCRIPT(lua_State * ulState)  Line 579 + 0xd     bytes   C++  
UsbTestApp.exe!USB_LUA_TEST_SCRIPT_RUN(lua_State * ulState)  Line 461 + 0x9 bytes       C++  
UsbTestApp.exe!_luaD_precall()  + 0x193 bytes   C  
UsbTestApp.exe!_luaD_call()  + 0x3c bytes   C  
UsbTestApp.exe!_lua_pcall()  + 0xd1 bytes   C  
UsbTestApp.exe!_luaD_rawrunprotected()  + 0x53 bytes    C  
UsbTestApp.exe!_luaD_pcall()  + 0x3e bytes  C  
UsbTestApp.exe!_lua_cpcall()  + 0x2f bytes  C  
UsbTestApp.exe!USB_LUA_CREATE_NEW_LUA_STATE(LUA_Script * luaScript)  Line 304 + 0x15       bytes    C++  
UsbTestApp.exe!UsbTestSuiteLIThread(void * lpParam)  Line 162 + 0x9 bytes   C++  

任何人都可以帮助我试着帮助我。由于包含和加载lanes.configure()似乎导致这个问题可能是我做错了什么或任何建议可能会有所帮助。如果您需要更多信息,请告诉我。

非常感谢。

的问候,
Mayur

0 个答案:

没有答案