Hi John, I'm using assert() to check some of the conditions in my code before I start the event loop and noticed that when the script exits after "require 'wx'", but before the main loop is started, it triggers segfault on Linux (tested on Fedora 18, but I saw the same thing on Ubuntu).
The script is as simple as one line with require 'wx'. Adding one more line causes various segfaults that all seem to be originating from wxLuaStateRefData::CloseLuaState; the results are shown below. I'd appreciate any insight into what may be causing this or how to fix it. Thank you. Paul. os.exit() -- no segfault assert(false) -- segfault #0 0x08055a4a in newkey () #1 0x0804ccb8 in lua_rawset () #2 0xb7177b12 in wxlua_lreg_createtable(lua_State*, void*, int, int) () from bin/linux/x86/libwx.so #3 0xb7179861 in wxLuaStateRefData::ClearCallbacks() () from bin/linux/x86/libwx.so #4 0xb7179a37 in wxLuaStateRefData::CloseLuaState(bool) () from bin/linux/x86/libwx.so #5 0xb7179c32 in wxLuaState::Destroy() () from bin/linux/x86/libwx.so #6 0xb70883e0 in wxLuaState::~wxLuaState() () from bin/linux/x86/libwx.so #7 0x46c17f01 in __run_exit_handlers () from /lib/libc.so.6 #8 0x46c17f8d in exit () from /lib/libc.so.6 #9 0x46bff86d in __libc_start_main () from /lib/libc.so.6 #10 0x0804abb5 in _start () return -- segfault #0 0x46c5ec06 in free () from /lib/libc.so.6 #1 0x08058c68 in l_alloc () #2 0x080513ab in luaM_realloc_ () #3 0x0805008f in luaF_freeproto () #4 0x080509b0 in sweeplist () #5 0x08050e3e in singlestep () #6 0x080511df in luaC_fullgc () #7 0x0804d1c8 in lua_gc () #8 0xb7143a70 in wxLuaStateRefData::CloseLuaState(bool) () from bin/linux/x86/libwx.so #9 0xb7143c32 in wxLuaState::Destroy() () from bin/linux/x86/libwx.so #10 0xb70523e0 in wxLuaState::~wxLuaState() () from bin/linux/x86/libwx.so #11 0x46c17f01 in __run_exit_handlers () from /lib/libc.so.6 #12 0x46c17f8d in exit () from /lib/libc.so.6 #13 0x46bff86d in __libc_start_main () from /lib/libc.so.6 #14 0x0804abb5 in _start () do nothing (the script ends not starting the event loop) -- segfault *** glibc detected *** bin/linux/x86/lua: double free or corruption (out): 0x46d987d8 *** #0 0xb7704424 in __kernel_vsyscall () #1 0x46c14b7f in raise () from /lib/libc.so.6 #2 0x46c164d3 in abort () from /lib/libc.so.6 #3 0x46c54405 in __libc_message () from /lib/libc.so.6 #4 0x46c5bff9 in _int_free () from /lib/libc.so.6 #5 0x08058c68 in l_alloc () #6 0x080513ab in luaM_realloc_ () #7 0x0805006e in luaF_freeproto () #8 0x080509b0 in sweeplist () #9 0x08050e3e in singlestep () #10 0x080511df in luaC_fullgc () #11 0x0804d1c8 in lua_gc () #12 0xb70d5a70 in wxLuaStateRefData::CloseLuaState(bool) () from bin/linux/x86/libwx.so #13 0xb70d5c32 in wxLuaState::Destroy() () from bin/linux/x86/libwx.so #14 0xb6fe43e0 in wxLuaState::~wxLuaState() () from bin/linux/x86/libwx.so #15 0x46c17f01 in __run_exit_handlers () from /lib/libc.so.6 #16 0x46c17f8d in exit () from /lib/libc.so.6 #17 0x46bff86d in __libc_start_main () from /lib/libc.so.6 #18 0x0804abb5 in _start () ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users