Hi John, > Note that I'm in the build-2.9-wx_gtk2/lib/Debug dir and run $gdb > ../../bin/Debug/lua. That could also be a problem, are you building > using one version/build of Lua then running with a different one?
Thank you for checking... Good to hear that it's working for you. I suspected that something could be wrong with the way I'm building it, but all my other tests (and the entire application) are working without issues. I'm building lua with the same command; although I used a copy from one of the previous builds, but none of the lua settings have changed. I'll do some further testing, but so far my builds still show the same issue. Paul. On Mon, Mar 18, 2013 at 4:02 PM, John Labenski <jlaben...@gmail.com> wrote: > On Mon, Mar 18, 2013 at 5:29 PM, Paul K <paulclin...@yahoo.com> wrote: >> 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). > > Well, I'm not sure there is much difference between what is happening > and what you're asking to happen by calling assert(), which is to > terminate the program violently. But, in any case, I don't get the > same result so I suspect something is wrong with your build. I would > review your build and clean and rebuild it after sorting out any > inconsistencies with multiple png libs or anything else like that. > > I just tried the program "test.lua" using the lastest wxLua SVN using > wxLua's provided Lua5.1 in CentOS 6. (I just noticed that you have to > do "mv libwx.so wx.so", I will fix that) > > -- ------------------------------------------------------ > -- test.lua > local wx = require("wx") > --os.exit() > --assert(false) > --return > print("hello") > -- ------------------------------------------------------ > > Note that I'm in the build-2.9-wx_gtk2/lib/Debug dir and run $gdb > ../../bin/Debug/lua. That could also be a problem, are you building > using one version/build of Lua then running with a different one? > > -- THIS HAS os.exit() unremmed > (gdb) run test.lua > Starting program: > /home/john/wx/wx-svn/wx-svn/wx/build-2.9-wx_gtk2/bin/Debug/lua > test.lua > [Thread debugging using libthread_db enabled] > Program exited normally. > > -- THIS HAS assert(false) unremmed > (gdb) run test.lua > Starting program: > /home/john/wx/wx-svn/wx-svn/wx/build-2.9-wx_gtk2/bin/Debug/lua > test.lua > [Thread debugging using libthread_db enabled] > /home/john/wx/wx-svn/wx-svn/wx/build-2.9-wx_gtk2/bin/Debug/lua: > test.lua:5: assertion failed! > stack traceback: > [C]: in function 'assert' > test.lua:5: in main chunk > [C]: ? > > Program exited with code 01. > > -- THIS HAS return unremmed > (gdb) run test.lua > Starting program: > /home/john/wx/wx-svn/wx-svn/wx/build-2.9-wx_gtk2/bin/Debug/lua > test.lua > [Thread debugging using libthread_db enabled] > hello > Program exited normally. > > -- THIS just lets it run through. > (gdb) run test.lua > Starting program: > /home/john/wx/wx-svn/wx-svn/wx/build-2.9-wx_gtk2/bin/Debug/lua > test.lua > [Thread debugging using libthread_db enabled] > hello > Program exited normally. > (gdb) > > ---------------------------------------------------------------------- > > ------------------------------------------------------------------------------ > 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 ------------------------------------------------------------------------------ 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