Hi, I'm looking into using wxLua in a project (have previously used vanilla lua), but I'm experiencing a bit of a problem.
I am using the latest windows binaries from the wxLua site, I have generated a simple import library for wx.dll by providing the luaopen_wx export. I call the luaopen_wx function in the same manner that the other lua libraries are opened (basically a copy of the luaL_openlibs function), and wxLua is loading and I can quite happily use it, a call to wx.wxMessageBox promptly opens a messagebox. My simple test case simply does a lua_open, lua_openlibs (including wx), lua_close. It doesn't actually execute any lua code. When the host program exits, wx.dll tries to access the lua_state variable (which was closed long before) and ends up accessing an invalid pointer, and crashes. It appears to be when wx.dll is unloaded. I'm using Visual Studio 2008 and I'm using wxLua to provide a scripting language with cross platform UI capabilities, the host application is not a wxWidgets application. What exactly am I doing wrong?! How do I prevent this crash in wx.dll from occuring? Apart from the crash when the host application exits, it's working perfectly! So it's a little bit frustrating. Thanks. Adrian ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users