You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(60) |
Jul
(35) |
Aug
(32) |
Sep
(5) |
Oct
(5) |
Nov
(58) |
Dec
(34) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(114) |
Feb
(184) |
Mar
(153) |
Apr
(90) |
May
(153) |
Jun
(59) |
Jul
(24) |
Aug
(43) |
Sep
(17) |
Oct
(34) |
Nov
(11) |
Dec
(204) |
2007 |
Jan
(84) |
Feb
(119) |
Mar
(38) |
Apr
(28) |
May
(52) |
Jun
(105) |
Jul
(64) |
Aug
(67) |
Sep
(14) |
Oct
(3) |
Nov
(28) |
Dec
(55) |
2008 |
Jan
(228) |
Feb
(55) |
Mar
(30) |
Apr
(30) |
May
(15) |
Jun
(20) |
Jul
(12) |
Aug
(3) |
Sep
(13) |
Oct
(54) |
Nov
(35) |
Dec
(35) |
2009 |
Jan
(19) |
Feb
(20) |
Mar
(34) |
Apr
(4) |
May
(60) |
Jun
(25) |
Jul
(16) |
Aug
(51) |
Sep
(19) |
Oct
(62) |
Nov
(21) |
Dec
(12) |
2010 |
Jan
(1) |
Feb
|
Mar
(4) |
Apr
(12) |
May
(23) |
Jun
(13) |
Jul
(1) |
Aug
(40) |
Sep
(18) |
Oct
(21) |
Nov
(26) |
Dec
(34) |
2011 |
Jan
(17) |
Feb
(23) |
Mar
(1) |
Apr
(10) |
May
(1) |
Jun
(5) |
Jul
(1) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(43) |
2012 |
Jan
(5) |
Feb
(19) |
Mar
(6) |
Apr
(24) |
May
(39) |
Jun
(83) |
Jul
(29) |
Aug
(36) |
Sep
(64) |
Oct
(55) |
Nov
(12) |
Dec
(7) |
2013 |
Jan
(17) |
Feb
(10) |
Mar
(37) |
Apr
(27) |
May
(13) |
Jun
(9) |
Jul
(7) |
Aug
(61) |
Sep
(23) |
Oct
(23) |
Nov
(30) |
Dec
(16) |
2014 |
Jan
(23) |
Feb
(13) |
Mar
(9) |
Apr
(17) |
May
(2) |
Jun
(11) |
Jul
(2) |
Aug
|
Sep
(9) |
Oct
(24) |
Nov
(2) |
Dec
(14) |
2015 |
Jan
(6) |
Feb
(4) |
Mar
(17) |
Apr
|
May
(7) |
Jun
(3) |
Jul
|
Aug
|
Sep
(2) |
Oct
(21) |
Nov
(6) |
Dec
(2) |
2016 |
Jan
(4) |
Feb
(2) |
Mar
(7) |
Apr
(3) |
May
(11) |
Jun
(6) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(6) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(4) |
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(8) |
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Andreas F. <an...@fa...> - 2013-08-09 13:56:15
|
Hi, I need to get wxLua running with Lua 5.0.2. I think I made all the necessary changes and I have it basically working now but at the end when lua_close() is called on the lua_State it always crashes. Digging deeper into the issue, I found out that the destructor functions invoked by the garbage collector are always the cause for this crash. Most of the time it crashes in the destructor for wxLua_wxGridCellCoords_delete_function() which looks like this: void wxLua_wxGridCellCoords_delete_function(void** p) { wxGridCellCoords* o = (wxGridCellCoords*)(*p); delete o; } Precisely, the crash always occurs in the call to "delete". However, it doesn't always crash in the destructor of wxGridCellCoords class. Sometimes it also crashes in the destructor of wxBrush, wxImage, wxAcceleratorTable, etc. But it always crashes in one of the destructor functions! Could this have something to do with my adaptation for Lua 5.0? I know that there have been huge improvements in the garbage collector in Lua 5.1 and maybe wxLua depends on some 5.1 garbage collector feature that isn't there in my 5.0 version? Could this be the cause of these strange crashes on lua_close()? Thanks for some feedback! -- Best regards, Andreas Falkenhahn mailto:an...@fa... |
From: John L. <jla...@gm...> - 2013-08-09 04:11:59
|
On Thu, Aug 8, 2013 at 5:58 PM, klaas.holwerda <ng...@kl...> wrote: > Hi John, > > I managed to update wxArt2D to use the new binding rules. > Great, hopefully it wasn't too hard and the benefit is that the binding headers are now valid C++ code, though they need to be very simple. On windows all works again. > On Linux (Centos 6.4 and openSuse12.3) i am able to compile and install > wxLua. (-fPIC stilled needed for wxWidgest2.9.5) > I use Centos 6 and I didn't need to add -fPIC to either building wxWidgets or wxLua. Do you remember what you added -fPIC to? > Also i am able to compile wxArt2D with wxLua within again. > Now i need to link and i get this the errors down here. > I build wxLua with BUILD_SHARED_LIBS disabled, and debug. > > I have the libraries, the libwxlua_lua51-wx29gtk2ud-2.8.12.so is not > static it seems, don't know why? > > I made the static build also optionally build the shared libwx.so, for Lua's require("wx"), and this needs a shared Lua lib. You can also make this static by setting wxLua_LUA_LIBRARY_BUILD_SHARED=TRUE. > klaas@dhcppc2:/usr/local/lib> ls libwxlua* > libwxlua_bind-wx29gtk2ud-2.8.12.a libwxlua_debugger-wx29gtk2ud-2.8.12.a > libwxlua_debug-wx29gtk2ud-2.8.12.a libwxlua_lua51-wx29gtk2ud-2.8.12.so > libwxlua-wx29gtk2ud-2.8.12.a > > Do you see something wrong? Like order of libraries to link, or maybe a > missing library?? > I know they are there several times, but normally that does not cause > problems, although order of libraries did before. > > It looks ok, this would be the ideal order of the libs. wxart2d libs libwxlua_bind-wx28gtk2ud-2.8.12.a libwxlua_debugger-wx28gtk2ud-2.8.12.a libwxlua_debug-wx28gtk2ud-2.8.12.a libwxlua-wx28gtk2ud-2.8.12.a libwxlua_lua51-wx28gtk2ud-2.8.12.so wxwidgets libs libpng etc. The only thing I can really suggest is to do the clean and rebuild thing and hope it fixes it. The functions you're missing are in libwxlua-wx28gtk2ud-2.8.12.a, which is the main wxLua lib. Regards, John |
From: klaas.holwerda <ng...@kl...> - 2013-08-08 19:57:01
|
Hi John, I managed to update wxArt2D to use the new binding rules. On windows all works again. On Linux (Centos 6.4 and openSuse12.3) i am able to compile and install wxLua. (-fPIC stilled needed for wxWidgest2.9.5) Also i am able to compile wxArt2D with wxLua within again. Now i need to link and i get this the errors down here. I build wxLua with BUILD_SHARED_LIBS disabled, and debug. I have the libraries, the libwxlua_lua51-wx29gtk2ud-2.8.12.so is not static it seems, don't know why? klaas@dhcppc2:/usr/local/lib> ls libwxlua* libwxlua_bind-wx29gtk2ud-2.8.12.a libwxlua_debugger-wx29gtk2ud-2.8.12.a libwxlua_debug-wx29gtk2ud-2.8.12.a libwxlua_lua51-wx29gtk2ud-2.8.12.so libwxlua-wx29gtk2ud-2.8.12.a Do you see something wrong? Like order of libraries to link, or maybe a missing library?? I know they are there several times, but normally that does not cause problems, although order of libraries did before. Regards, Klaas Linking CXX executable sample_editor_wires cd /home/klaas/soft/svncheckout/buildall/unix/gcc_gtkud/packages/wxart2d/samples/editor/wires && /usr/bin/cmake -E cmake_link_script CMakeFiles/sample_editor_wires.dir/link.txt --verbose=1 /usr/bin/c++ -Wformat=0 -pthread -Wformat=0 -g CMakeFiles/sample_editor_wires.dir/wires.cpp.o CMakeFiles/sample_editor_wires.dir/elements.cpp.o -o sample_editor_wires -L/usr/local/lib64 -L/home/klaas/soft/svncheckout/buildall/unix/gcc_gtkud/packages/wxart2d/lib -L/home/klaas/soft/svncheckout/buildall/unix/gcc_gtkud/thirdparty/kbool/lib -L/home/klaas/soft/svncheckout/buildall/unix/gcc_gtkud/thirdparty/agg-2.4/bin/../lib -L/home/klaas/soft/wxlua/trunk/wxLua/lib -L/home/klaas/soft/wxcode/trunk/wxCode/components/stedit/lib -L/home/klaas/soft/svncheckout/buildall/unix/gcc_gtkud/packages/wxdocview/share/wxdocview/../../lib -rdynamic ../../../lib/libwxart2d_gtk2ud_luawraps-2.9.a ../../../lib/libwxart2d_gtk2ud_editor-2.9.a ../../../lib/libwxart2d_gtk2ud_keyio-2.9.a ../../../lib/libwxart2d_gtk2ud_gdsio-2.9.a ../../../lib/libwxart2d_gtk2ud_svgio-2.9.a ../../../lib/libwxart2d_gtk2ud_curves-2.9.a ../../../lib/libwxart2d_gtk2ud_canextobj-2.9.a ../../../lib/libwxart2d_gtk2ud_canvas-2.9.a ../../../lib/libwxart2d_gtk2ud_artbase-2.9.a ../../../lib/libwxart2d_gtk2ud_aggdrawer-2.9.a ../../../lib/libwxart2d_gtk2ud_genart-2.9.a -lwxartbase_gtk2ud_generalt-2.9 -lwxartbase_gtk2ud_xmlparse-2.9 -lwxdocview_gtk2ud_docview-2.9 -Wl,-Bstatic -lwxstedit-wx29gtk2ud-1.6.0 -Wl,-Bdynamic -lwxlua_bind-wx29gtk2ud-2.8.12 -lwxlua_debugger-wx29gtk2ud-2.8.12 -lwxlua_debug-wx29gtk2ud-2.8.12 -lwxlua_lua51-wx29gtk2ud-2.8.12 -lwxlua_bind-wx29gtk2ud-2.8.12 -lwxlua_debugger-wx29gtk2ud-2.8.12 -lwxlua_debug-wx29gtk2ud-2.8.12 -lwxlua_lua51-wx29gtk2ud-2.8.12 -lwxlua_bind-wx29gtk2ud-2.8.12 -lwxlua_debugger-wx29gtk2ud-2.8.12 -lwxlua_debug-wx29gtk2ud-2.8.12 -lwxlua_lua51-wx29gtk2ud-2.8.12 -lfreetype -laggctrl -laggplatform -lagg -lkbool /usr/local/lib64/libwx_gtk2u_stc-2.9.a /usr/local/lib64/libwx_gtk2u_aui-2.9.a /usr/local/lib64/libwx_gtk2u_qa-2.9.a /usr/local/lib64/libwx_gtk2u_xrc-2.9.a /usr/local/lib64/libwx_baseu_net-2.9.a /usr/local/lib64/libwx_gtk2u_html-2.9.a /usr/local/lib64/libwx_gtk2u_adv-2.9.a /usr/local/lib64/libwx_gtk2u_core-2.9.a /usr/local/lib64/libwx_baseu_xml-2.9.a /usr/local/lib64/libwx_baseu-2.9.a -lwxscintilla-2.9 -lgthread-2.0 -lX11 -lXxf86vm -lSM -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 -lpng -ljpeg -lexpat -lwxregexu-2.9 -lwxtiff-2.9 -lz -ldl -lm -lwxlua_bind-wx29gtk2ud-2.8.12 -lwxlua_debugger-wx29gtk2ud-2.8.12 -lwxlua_debug-wx29gtk2ud-2.8.12 -lwxlua_lua51-wx29gtk2ud-2.8.12 -lfreetype -laggctrl -laggplatform -lagg -lkbool /usr/local/lib64/libwx_gtk2u_stc-2.9.a /usr/local/lib64/libwx_gtk2u_aui-2.9.a /usr/local/lib64/libwx_gtk2u_qa-2.9.a /usr/local/lib64/libwx_gtk2u_xrc-2.9.a /usr/local/lib64/libwx_baseu_net-2.9.a /usr/local/lib64/libwx_gtk2u_html-2.9.a /usr/local/lib64/libwx_gtk2u_adv-2.9.a /usr/local/lib64/libwx_gtk2u_core-2.9.a /usr/local/lib64/libwx_baseu_xml-2.9.a /usr/local/lib64/libwx_baseu-2.9.a -lwxscintilla-2.9 -lgthread-2.0 -lX11 -lXxf86vm -lSM -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 -lpng -ljpeg -lexpat -lwxregexu-2.9 -lwxtiff-2.9 -lz -ldl -lm -Wl,-rpath,/usr/local/lib64:/home/klaas/soft/svncheckout/buildall/unix/gcc_gtkud/packages/wxart2d/lib:/home/klaas/soft/svncheckout/buildall/unix/gcc_gtkud/thirdparty/kbool/lib:/home/klaas/soft/svncheckout/buildall/unix/gcc_gtkud/thirdparty/agg-2.4/bin/../lib:/home/klaas/soft/wxlua/trunk/wxLua/lib:/home/klaas/soft/wxcode/trunk/wxCode/components/stedit/lib:/home/klaas/soft/svncheckout/buildall/unix/gcc_gtkud/packages/wxdocview/share/wxdocview/../../lib CMakeFiles/sample_editor_wires.dir/wires.cpp.o: In function `MyApp::OnInit()': /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxart2d/samples/editor/wires/wires.cpp:2171: undefined reference to `wxLuaBinding_wxlua_init()' ../../../lib/libwxart2d_gtk2ud_luawraps-2.9.a(wxart2d_bind.cpp.o): In function `wxLua_function_Aberration': /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxart2d/luawraps/src/wxart2d_bind.cpp:344: undefined reference to `wxlua_touserdata(lua_State*, int, bool)' /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxart2d/luawraps/src/wxart2d_bind.cpp:346: undefined reference to `wxlua_touserdata(lua_State*, int, bool)' /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxart2d/luawraps/src/wxart2d_bind.cpp:348: undefined reference to `wxlua_getnumbertype(lua_State*, int)' /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxart2d/luawraps/src/wxart2d_bind.cpp:350: undefined reference to `wxlua_getnumbertype(lua_State*, int)' /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxart2d/luawraps/src/wxart2d_bind.cpp:352: undefined reference to `wxlua_getnumbertype(lua_State*, int)' ../../../lib/libwxart2d_gtk2ud_luawraps-2.9.a(wxart2d_bind.cpp.o): In function `wxLua_function_ClclDistSqrPntLine': /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxart2d/luawraps/src/wxart2d_bind.cpp:365: undefined reference to `wxluaT_getuserdatatype(lua_State*, int, int)' /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxart2d/luawraps/src/wxart2d_bind.cpp:367: undefined reference to `wxluaT_getuserdatatype(lua_State*, int, int)' /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxart2d/luawraps/src/wxart2d_bind.cpp:369: undefined reference to `wxluaT_getuserdatatype(lua_State*, int, int)' ../../../lib/libwxart2d_gtk2ud_luawraps-2.9.a(wxart2d_bind.cpp.o): In function `wxLua_function_ClclDistSqrPntPnt': /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxart2d/luawraps/src/wxart2d_bind.cpp:384: undefined reference to `wxluaT_getuserdatatype(lua_State*, int, int)' /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxart2d/luawraps/src/wxart2d_bind.cpp:386: undefined reference to `wxluaT_getuserdatatype(lua_State*, int, int)' ../../../lib/libwxart2d_gtk2ud_luawraps-2.9.a(wxart2d_bind.cpp.o): In function `wxLua_function_CmdMenu_AddMeasurement': /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxart2d/luawraps/src/wxart2d_bind.cpp:402: undefined reference to `wxluaT_pushuserdatatype(lua_State*, void const*, int, bool, bool)' ../../../lib/libwxart2d_gtk2ud_luawraps-2.9.a(wxart2d_bind.cpp.o): In function `wxLua_function_CmdMenu_AddMeasurement1': /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxart2d/luawraps/src/wxart2d_bind.cpp:414: undefined reference to `wxluaT_pushuserdatatype(lua_State*, void const*, int, bool, bool)' ../../../lib/libwxart2d_gtk2ud_luawraps-2.9.a(wxart2d_bind.cpp.o): In function `wxLua_function_CmdMenu_ChangeCanvasObjectStyle': /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxart2d/luawraps/src/wxart2d_bind.cpp:426: undefined reference to `wxluaT_pushuserdatatype(lua_State*, void const*, int, bool, bool)' ../../../lib/libwxart2d_gtk2ud_luawraps-2.9.a(wxart2d_bind.cpp.o): In function `wxLua_function_CmdMenu_ChangeCentralStyle': /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxart2d/luawraps/src/wxart2d_bind.cpp:438: undefined reference to `wxluaT_pushuserdatatype(lua_State*, void const*, int, bool, bool)' ../../../lib/libwxart2d_gtk2ud_luawraps-2.9.a(wxart2d_bind.cpp.o): In function `wxLua_function_CmdMenu_ClearMeasurements': much more down here. |
From: Paul K <pau...@ya...> - 2013-08-04 07:57:48
|
Hi All, I'm trying to make my application accept files that can be dragged on it. This is what I currently have: pcall(function() frame:DragAcceptFiles(true) end) frame:Connect(wx.wxEVT_DROP_FILES, function(evt) local files = evt:GetFiles() -- do something to open files end) This works on Windows, but doesn't work on OSX at all (this is why I have the call wrapped in pcall) and only copies filename on Linux (instead of opening the file). I read that DragAcceptFiles is deprecated and should be replaced with drop target processing (http://wxwidgets.10942.n7.nabble.com/Why-EVT-DROP-FILES-is-not-on-all-wx-ports-td7164.html). This is what I'm trying to do: local filedo = wx.wxFileDataObject() local droptarget = wx.wxDropTarget --(filedo) -- doesn't work, see below function droptarget:OnData(x, y, result) return result end function droptarget:OnDrop() return true end frame:SetDropTarget(droptarget) SetDropTarget requires wxDropTarget object passed to it, but wx.wxDropTarget is an empty table and doesn't have "new" method to construct an object. Also, theer is no wxFileDropTarget (only wxDropTarget), so I'm not sure how it's supposed to work. I found one relevant feature request (http://sourceforge.net/p/wxlua/feature-requests/3/) that was closed as "fixed", but the Lua code that is in that ticket doesn't work for me. Anyone has an example that allows to accept a filename after D&D that works on Windows/OSX/Linux? Thank you. Paul. |
From: Paul K <pau...@ya...> - 2013-07-20 21:47:14
|
Hi John, > Interesting, but that means that they're emulating the removed functions and I wonder what their setfenv() does. Right; the code for setfenv is here: https://github.com/corsix/twoface/blob/master/twoface.c#L492-L532 > In 5.2 setfenv() function was removed and the environment for a function is set by the _ENV table which should be the first upvalue for the function. I believe that this is automatic so the 5.2 behavior should be more expected, but I haven't rigorously tested what happens with callbacks in modules or even if you swap out the _ENV before setting the callback. > http://stackoverflow.com/questions/14290527/recreating-setfenv-in-lua-5-2 yes, I'm familiar with this logic (in fact, one of the answers is mine), but only on the Lua side. I'm not sure how it maps to C calls. > Is there any way to detect when the twoface DLL is being used so that the code can take the 5.2 path? Possibly, but I can't answer that question. > Or maybe compile wxLua for 5.2 and use woface to treat 5.1 as 5.2 instead of the other way around. No, this won't work as Twoface only works one way (mapping 5.1 calls to 5.2 engine). For now I patched my build process to remove those fragments and so far have been running with twoface and Lua 5.2 without issues. I'm still not sure what that fragment I removed does as my event callbacks use various upvalues and seem to work correctly without that setfenv check (and they were throwing the error before I removed the checks), which makes me think that the check is not really needed. I'll leave the decision up to you and let you know if I run into any issues, but so far I only have two patches that make my wxlua libraries deviate from yours: this change (not deployed yet) and the live coding fix I applied (http://comments.gmane.org/gmane.comp.lib.wxwidgets.wxlua.user/3273). Actually, there is one more interesting issue, related to the live coding fix. I'll describe it briefly here, maybe you can add some details to it. The classes you create in wxlua conveniently allow additional properties to be assigned to them. For example, I can do "local editor = wxstc.wxStyledTextCtrl(...)" and then "editor.foo = 'bar'" and it all works. However, if I then try to access editor.foo from *another* coroutine, it doesn't "see" that property and I get "wxLua: Unable to call an unknown method ..." error, even though the property is there. I haven't been able to figure out where exactly it fails and for now I just worked around these cases, but it would be great if this could be fixed (if there is a fix for that). Ideally, editor.foo should return nil and editor.foo() should return an error, but the comment you have in the code seems to point out that it may not be possible to distinguish between these two cases. I think it's because in editor.foo(), it gets the value of editor.foo first and then calls it as a function. I'll be fine if it returns `nil` and then fails on the function call. Paul. On Sat, Jul 20, 2013 at 11:26 AM, John Labenski <jla...@gm...> wrote: > > On Fri, Jul 19, 2013 at 7:54 PM, Paul K <pau...@ya...> wrote: >> >> Hi John, >> >> I've been looking into using twoface ABI mapper >> (http://corsix.github.io/twoface/) to run ZeroBrane Studio on top of >> Lua 5.2 without recompiling wxlua and luasocket (both are compiled for >> Lua 5.1). For those not familiar with it, it allows to run Lua 5.2 >> engine with modules compiled for Lua 5.1 without any changes to those >> modules. In my case, I use it with ZBS that is compiled for Lua 5.1 >> and can make it run with Lua 5.2 by replacing lua51.dll with a >> different one (and adding lua52.dll). >> > > Interesting, but that means that they're emulating the removed functions and > I wonder what their setfenv() does. > > >> >> I have been able to run it with wxlua, but I ended up patching wxlua >> in one place. For some reason when I ran it originally, I was getting >> "wxLua: wxEvtHandler::Connect() in wxLuaEventCallback::OnEvent(), >> callback function is not a Lua function." messages in more or less >> random places. This error comes from an event handler check in >> wxlcallb.cpp and it appears to be only active for Lua 5.1: >> >> #if LUA_VERSION_NUM < 502 >> // lua_setfenv() is not in Lua 5.2 nor can you set an env for >> a function anymore >> wxlState.GetGlobals(); >> if (wxlState.lua_SetFenv(-2) != 0) >> #endif // LUA_VERSION_NUM < 502 >> { >> // Don't track the wxEvent since we don't own it and tracking >> it >> // causes clashes in the object registry table since many can >> be >> // created and deleted and the mem address is resused by C++. >> wxlState.wxluaT_PushUserDataType(event, event_wxl_type, >> false); >> wxlState.LuaPCall(1, 0); // one input no returns >> } >> #if LUA_VERSION_NUM < 502 >> else >> wxlState.wxlua_Error("wxLua: wxEvtHandler::Connect() in >> wxLuaEventCallback::OnEvent(), callback function is not a Lua >> function."); >> #endif // LUA_VERSION_NUM < 502 >> >> I have never seen this error with 5.1 and am not sure what the purpose >> of it is. Given that it doesn't even run for Lua 5.2, I completely >> disabled this check and everything appears to be working as expected. >> > > It's there for backwards compatibility so that programs run as expected in > 5.1, but in 5.2 things are a little different. See below. > > >> >> Is there any reason for this check (especially given that it behaves >> differently for lua 5.1 and 5.2) and is it possible to remove/disable >> it? >> > > In < 5.2 wxLua used the globals as the environment for the callback function > to give a uniform state. This was how it was before I took over wxLua and > though it wasn't strictly necessary I didn't see any reason to change it. > > In 5.2 setfenv() function was removed and the environment for a function is > set by the _ENV table which should be the first upvalue for the function. I > believe that this is automatic so the 5.2 behavior should be more expected, > but I haven't rigorously tested what happens with callbacks in modules or > even if you swap out the _ENV before setting the callback. > > http://stackoverflow.com/questions/14290527/recreating-setfenv-in-lua-5-2 > > -------------------------------- > > Is there any way to detect when the twoface DLL is being used so that the > code can take the 5.2 path? Or maybe compile wxLua for 5.2 and use woface to > treat 5.1 as 5.2 instead of the other way around. > > > Regards, > John > > > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > |
From: John L. <jla...@gm...> - 2013-07-20 18:39:08
|
On Fri, Jul 19, 2013 at 3:34 PM, Paul K <pau...@ya...> wrote: > Hi John, > > I tried to compile the current trunk on Windows using mingw and ran > into a compilation error: > > ...wxLua/modules/wxbind/src/wxcore_bind.cpp: In member function > 'virtual bool wxLuaBinding_wxcore::RegisterBinding(const > wxLuaState&)': > ...wxlua/wxLua/modules/wxbind/src/wxcore_bind.cpp:7495:46: error: > 'wxEVT_COMMAND_DIRPICKER_CHANGED' was not declared in this scope > ...wxLua/modules/wxbind/src/wxcore_bind.cpp:7496:46: error: > 'wxEVT_COMMAND_FILEPICKER_CHANGED' was not declared in this scope > > This follows a warning about re-definition: > > ...wxLua/modules/wxbind/src/wxcore_bind.cpp:73:0: warning: > "wxEVT_COMMAND_DIRPICKER_CHANGED" redefined [enabled by default] > ...include/wx-2.9/wx/filepicker.h:418:0: note: this is the location of > the previous definition > ...wxLua/modules/wxbind/src/wxcore_bind.cpp:74:0: warning: > "wxEVT_COMMAND_FILEPICKER_CHANGED" redefined [enabled by default] > ...include/wx-2.9/wx/filepicker.h:417:0: note: this is the location of > the previous definition > > The issue seems to be caused by this #if in > modules/wxbind/src/wxcore_bind.cpp: > > #if defined(__MINGW32__) || defined(__GNUWIN32__) > // FIX: "internal compiler error: output_operand: invalid > expression as operand" > > I'm not sure if the comment still applies, but I removed this #if (and > another one around line 7488 in the same file) and compiled without > any errors/issues. > > When you say remove the #if you mean just the #if statement or all of the code in the #if statement. As you can tell that is a strange hack for that compiler and I wish I documented the version. > Can you please take a look at this and check if this #if is still > needed? It's seems like you can safely remove it. Thank you. > > > I'm using the latest wxwidgets (2.9.5 release candidate) and gcc 4.6.2. > > What gcc are you using? MingW as per these directions or something else and from where and why? http://wxlua.sourceforge.net/docs/install.html#C2.4 http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/ The mingw-get-inst-20120426<http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/mingw-get-inst-20120426/>is gcc 4.7.0 and I do believe that that #if is needed for that compiler. Regards, John |
From: John L. <jla...@gm...> - 2013-07-20 18:26:34
|
On Fri, Jul 19, 2013 at 7:54 PM, Paul K <pau...@ya...> wrote: > Hi John, > > I've been looking into using twoface ABI mapper > (http://corsix.github.io/twoface/) to run ZeroBrane Studio on top of > Lua 5.2 without recompiling wxlua and luasocket (both are compiled for > Lua 5.1). For those not familiar with it, it allows to run Lua 5.2 > engine with modules compiled for Lua 5.1 without any changes to those > modules. In my case, I use it with ZBS that is compiled for Lua 5.1 > and can make it run with Lua 5.2 by replacing lua51.dll with a > different one (and adding lua52.dll). > > Interesting, but that means that they're emulating the removed functions and I wonder what their setfenv() does. > I have been able to run it with wxlua, but I ended up patching wxlua > in one place. For some reason when I ran it originally, I was getting > "wxLua: wxEvtHandler::Connect() in wxLuaEventCallback::OnEvent(), > callback function is not a Lua function." messages in more or less > random places. This error comes from an event handler check in > wxlcallb.cpp and it appears to be only active for Lua 5.1: > > #if LUA_VERSION_NUM < 502 > // lua_setfenv() is not in Lua 5.2 nor can you set an env for > a function anymore > wxlState.GetGlobals(); > if (wxlState.lua_SetFenv(-2) != 0) > #endif // LUA_VERSION_NUM < 502 > { > // Don't track the wxEvent since we don't own it and tracking > it > // causes clashes in the object registry table since many can > be > // created and deleted and the mem address is resused by C++. > wxlState.wxluaT_PushUserDataType(event, event_wxl_type, false); > wxlState.LuaPCall(1, 0); // one input no returns > } > #if LUA_VERSION_NUM < 502 > else > wxlState.wxlua_Error("wxLua: wxEvtHandler::Connect() in > wxLuaEventCallback::OnEvent(), callback function is not a Lua > function."); > #endif // LUA_VERSION_NUM < 502 > > I have never seen this error with 5.1 and am not sure what the purpose > of it is. Given that it doesn't even run for Lua 5.2, I completely > disabled this check and everything appears to be working as expected. > > It's there for backwards compatibility so that programs run as expected in 5.1, but in 5.2 things are a little different. See below. > Is there any reason for this check (especially given that it behaves > differently for lua 5.1 and 5.2) and is it possible to remove/disable > it? > > In < 5.2 wxLua used the globals as the environment for the callback function to give a uniform state. This was how it was before I took over wxLua and though it wasn't strictly necessary I didn't see any reason to change it. In 5.2 setfenv() function was removed and the environment for a function is set by the _ENV table which should be the first upvalue for the function. I believe that this is automatic so the 5.2 behavior should be more expected, but I haven't rigorously tested what happens with callbacks in modules or even if you swap out the _ENV before setting the callback. http://stackoverflow.com/questions/14290527/recreating-setfenv-in-lua-5-2 -------------------------------- Is there any way to detect when the twoface DLL is being used so that the code can take the 5.2 path? Or maybe compile wxLua for 5.2 and use woface to treat 5.1 as 5.2 instead of the other way around. Regards, John |
From: Paul K <pau...@ya...> - 2013-07-19 23:54:49
|
Hi John, I've been looking into using twoface ABI mapper (http://corsix.github.io/twoface/) to run ZeroBrane Studio on top of Lua 5.2 without recompiling wxlua and luasocket (both are compiled for Lua 5.1). For those not familiar with it, it allows to run Lua 5.2 engine with modules compiled for Lua 5.1 without any changes to those modules. In my case, I use it with ZBS that is compiled for Lua 5.1 and can make it run with Lua 5.2 by replacing lua51.dll with a different one (and adding lua52.dll). I have been able to run it with wxlua, but I ended up patching wxlua in one place. For some reason when I ran it originally, I was getting "wxLua: wxEvtHandler::Connect() in wxLuaEventCallback::OnEvent(), callback function is not a Lua function." messages in more or less random places. This error comes from an event handler check in wxlcallb.cpp and it appears to be only active for Lua 5.1: #if LUA_VERSION_NUM < 502 // lua_setfenv() is not in Lua 5.2 nor can you set an env for a function anymore wxlState.GetGlobals(); if (wxlState.lua_SetFenv(-2) != 0) #endif // LUA_VERSION_NUM < 502 { // Don't track the wxEvent since we don't own it and tracking it // causes clashes in the object registry table since many can be // created and deleted and the mem address is resused by C++. wxlState.wxluaT_PushUserDataType(event, event_wxl_type, false); wxlState.LuaPCall(1, 0); // one input no returns } #if LUA_VERSION_NUM < 502 else wxlState.wxlua_Error("wxLua: wxEvtHandler::Connect() in wxLuaEventCallback::OnEvent(), callback function is not a Lua function."); #endif // LUA_VERSION_NUM < 502 I have never seen this error with 5.1 and am not sure what the purpose of it is. Given that it doesn't even run for Lua 5.2, I completely disabled this check and everything appears to be working as expected. Is there any reason for this check (especially given that it behaves differently for lua 5.1 and 5.2) and is it possible to remove/disable it? Paul. |
From: Paul K <pau...@ya...> - 2013-07-19 19:34:29
|
Hi John, I tried to compile the current trunk on Windows using mingw and ran into a compilation error: ...wxLua/modules/wxbind/src/wxcore_bind.cpp: In member function 'virtual bool wxLuaBinding_wxcore::RegisterBinding(const wxLuaState&)': ...wxlua/wxLua/modules/wxbind/src/wxcore_bind.cpp:7495:46: error: 'wxEVT_COMMAND_DIRPICKER_CHANGED' was not declared in this scope ...wxLua/modules/wxbind/src/wxcore_bind.cpp:7496:46: error: 'wxEVT_COMMAND_FILEPICKER_CHANGED' was not declared in this scope This follows a warning about re-definition: ...wxLua/modules/wxbind/src/wxcore_bind.cpp:73:0: warning: "wxEVT_COMMAND_DIRPICKER_CHANGED" redefined [enabled by default] ...include/wx-2.9/wx/filepicker.h:418:0: note: this is the location of the previous definition ...wxLua/modules/wxbind/src/wxcore_bind.cpp:74:0: warning: "wxEVT_COMMAND_FILEPICKER_CHANGED" redefined [enabled by default] ...include/wx-2.9/wx/filepicker.h:417:0: note: this is the location of the previous definition The issue seems to be caused by this #if in modules/wxbind/src/wxcore_bind.cpp: #if defined(__MINGW32__) || defined(__GNUWIN32__) // FIX: "internal compiler error: output_operand: invalid expression as operand" I'm not sure if the comment still applies, but I removed this #if (and another one around line 7488 in the same file) and compiled without any errors/issues. Can you please take a look at this and check if this #if is still needed? It's seems like you can safely remove it. Thank you. I'm using the latest wxwidgets (2.9.5 release candidate) and gcc 4.6.2. Paul. |
From: Javier Mr <jav...@ym...> - 2013-07-02 09:00:30
|
Hi, i respond to my self thanks to the solution given in the wxWidgets forum. http://forums.wxwidgets.org/viewtopic.php?f=27&t=37637 The solution is to use the wxST_NO_AUTORESIZE flag described here; http://docs.wxwidgets.org/stable/wx_wxstatictext.html Regards. Javi ----- Mensaje original ----- > De: Javier Mr <jav...@ym...> > Para: "wxl...@li..." <wxl...@li...> > CC: > Enviado: Lunes 1 de julio de 2013 14:56 > Asunto: [wxlua-users] wxStaticText alignment reset on text update > > Hi, > > i'm not an expert with wxLua neither with wxWidgets. I think that what > i'm trying to do is quite simple but i can't get it to work. I have a > simple user interface with a label, the label is inside a horizontal sizer, I > want the text to be centered in the label, for accomplish i have done: > > local panel = wx.wxPanel(parent, wx.wxID_ANY); > > local label = wx.wxStaticText(panel, wx.wxID_ANY, "---", > wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxALIGN_CENTER); > > label:SetForegroundColour(wx.wxColour("RED")); > local labelFont = label:GetFont(); > labelFont:SetPointSize(15); > labelFont:SetWeight(wx.wxFONTWEIGHT_BOLD); > label:SetFont(labelFont); > > local vSizer = wx.wxBoxSizer(wx.wxVERTICAL); > local hSizer1 = wx.wxBoxSizer(wx.wxHORIZONTAL); > > hSizer1:Add(label, 1, wx.wxEXPAND + wx.wxTOP + wx.wxBOTTOM + wx.wxRIGHT + > wx.wxLEFT); > > vSizer:Add(hSizer1, 5, wx.wxEXPAND +wx.wxCENTER, 5); > > panel:SetSizer(vSizer); > > > This gets the job done (in the snippet of code i also se the text to red color > and change the font). However the text needs to change dynamically and when i > try to change is with: > > label:SetForegroundColour(wx.wxColour("GREEN")); > label:SetLabel("+++"); > label:SetWindowStyleFlag(wx.wxALIGN_CENTER); > label:Refresh(); > > The label defaults to left align ( First I tried without the SetWindowStyleFlag > call, but that didn't work). What i'm doing wrong?, why is the align > reset to left? > Wich one is the correct way to update the text value without changing the label > aligment? > > TIA. > > Best regards. > Javi. > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > |
From: Javier Mr <jav...@ym...> - 2013-07-01 12:56:55
|
Hi, i'm not an expert with wxLua neither with wxWidgets. I think that what i'm trying to do is quite simple but i can't get it to work. I have a simple user interface with a label, the label is inside a horizontal sizer, I want the text to be centered in the label, for accomplish i have done: local panel = wx.wxPanel(parent, wx.wxID_ANY); local label = wx.wxStaticText(panel, wx.wxID_ANY, "---", wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxALIGN_CENTER); label:SetForegroundColour(wx.wxColour("RED")); local labelFont = label:GetFont(); labelFont:SetPointSize(15); labelFont:SetWeight(wx.wxFONTWEIGHT_BOLD); label:SetFont(labelFont); local vSizer = wx.wxBoxSizer(wx.wxVERTICAL); local hSizer1 = wx.wxBoxSizer(wx.wxHORIZONTAL); hSizer1:Add(label, 1, wx.wxEXPAND + wx.wxTOP + wx.wxBOTTOM + wx.wxRIGHT + wx.wxLEFT); vSizer:Add(hSizer1, 5, wx.wxEXPAND +wx.wxCENTER, 5); panel:SetSizer(vSizer); This gets the job done (in the snippet of code i also se the text to red color and change the font). However the text needs to change dynamically and when i try to change is with: label:SetForegroundColour(wx.wxColour("GREEN")); label:SetLabel("+++"); label:SetWindowStyleFlag(wx.wxALIGN_CENTER); label:Refresh(); The label defaults to left align ( First I tried without the SetWindowStyleFlag call, but that didn't work). What i'm doing wrong?, why is the align reset to left? Wich one is the correct way to update the text value without changing the label aligment? TIA. Best regards. Javi. |
From: Paul K <pau...@ya...> - 2013-06-24 23:50:36
|
Hi John, >> Can you add a new method GetContentScaleFactor that can be used to >> detect Retina displays >> (https://groups.google.com/d/msg/wx-users/waj_tC1AU4k/q55_Q3Z4TGUJ) >> and a missing constant (wxDIR_NO_FOLLOW) when you get a chance? > Sure, I can do that on Monday. It would be great! I also noticed that we don't expose wxOverlay (http://docs.wxwidgets.org/trunk/classwx_overlay.html). Can you add it as well? It includes only a couple of methods and can be useful for drawing on top of other controls, for example, over a minimap as suggested here: https://groups.google.com/d/msg/wx-dev/OMOTMN-D3F4/ETrm7M7qTpcJ. Thank you! Paul. On Thu, Jun 20, 2013 at 9:34 PM, John Labenski <jla...@gm...> wrote: > On Thu, Jun 20, 2013 at 11:51 PM, Paul K <pau...@ya...> wrote: >> >> Hi John, >> >> Can you add a new method GetContentScaleFactor that can be used to >> detect Retina displays >> (https://groups.google.com/d/msg/wx-users/waj_tC1AU4k/q55_Q3Z4TGUJ) >> and a missing constant (wxDIR_NO_FOLLOW) when you get a chance? Thank >> you! >> > > Sure, I can do that on Monday. > > Regards, > John > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > |
From: John L. <jla...@gm...> - 2013-06-21 04:34:24
|
On Thu, Jun 20, 2013 at 11:51 PM, Paul K <pau...@ya...> wrote: > Hi John, > > Can you add a new method GetContentScaleFactor that can be used to > detect Retina displays > (https://groups.google.com/d/msg/wx-users/waj_tC1AU4k/q55_Q3Z4TGUJ) > and a missing constant (wxDIR_NO_FOLLOW) when you get a chance? Thank > you! > > Sure, I can do that on Monday. Regards, John |
From: Paul K <pau...@ya...> - 2013-06-21 03:51:45
|
Hi John, Can you add a new method GetContentScaleFactor that can be used to detect Retina displays (https://groups.google.com/d/msg/wx-users/waj_tC1AU4k/q55_Q3Z4TGUJ) and a missing constant (wxDIR_NO_FOLLOW) when you get a chance? Thank you! Paul. |
From: Paul K <pau...@ya...> - 2013-06-18 00:44:08
|
Hi John, > lua_yield is a coroutine function, are you running coroutines? If so, then Lua will be swapping lua_States in and out and pausing them whenever it wants to, making the stack seem very strange. I do (in general), but it's in a completely different part (for debugging) and is not involved there; so, it's indeed puzzling. > You're not trying to install event handlers in a coroutine are you? As we discussed, that's always a bad idea. No; this affects the applications that I debug, but not ZBS itself. I'm careful not to even open new windows while in coroutines and all events like this are delayed in the application until it's safe to do (and is only done in the main thread). > Did you ever create a wxProgressDialog? The Lua garbage collector may simply be running and finally getting around to deleting it. No; and that's another puzzling part. I don't use wxProgressDialog at all. Not sure why it would be deleted... > Can you rebuild in debug mode? The stack should have line numbers which will clear things up. That's a good suggestion; I prepared a debug build, but haven't heard back from the user yet. BTW, the dll is 186M in debug more ;). > Everything is "normal" up to LuaPCall, but then I presume you're running a coroutine that's calling the lua_yield, and wxLua does use lua_getinfo for a few things so that may be normal, but the lua_close is very wrong unless you're closing a coroutine, perhaps the coroutine had a wxProgressDialog and that's why it's getting deleted at this point? I can't imagine who's calling AddPendingEvent though, are you? I agree; everything looks "normal" up to that LuaPCall, but very strange after that. I do have one AddPendingEvent call (and it's in one of the branches for AddChar event, so it *can* be related), but definitely not from wxProgressDialog destructor. Thank you for confirming my suspicions. I'll see if I can get any additional information from the debug build... Paul. |
From: John L. <jla...@gm...> - 2013-06-14 05:02:55
|
On Mon, Jun 3, 2013 at 2:13 AM, Paul K <pau...@ya...> wrote: > Hi John, > > I've been looking for ways to catch and report run-time errors in the > application. Lua errors are covered with your recent support for > EVT_LUA_ERROR (http://sourceforge.net/p/wxlua/svn/180/), but there are > still fatal exceptions in the application that may happen. > > As far as I can see from wxwdigets docs, these are controlled by > wxHandleFatalExceptions and OnFatalExceptions; wxlua does provide a > methods for wxHandleFatalExceptions, but I don't see anything similar > to OnFatalExceptions? How do I get set up a handler that gets called > when a fatal exception happens? It would be super useful to also have > a way to access Lua state from it to gather Lua stack information to > include in the crash report. Or is there an existing alternative I am > missing? > > I have not used these functions, but typically there is not a lot that can be done at that point since, it is... fatal. Digging through the Lua stack, which may have been the problem in the first place, may be too much. > Would it be possible to use OnFatalExceptions to set a callback (a Lua > function) that will be called when a fatal exception happens? > > This is a MSVC only thing, do you use it or MingW? http://docs.wxwidgets.org/trunk/group__group__funcmacro__appinitterm.html#ga28a4fb827b93fa6bac18c9666c23ee10 > While we are on the topic of crash reports, there is wxDebugReport, > but it doesn't seem to be available in the binding. Does it make sense > to expose it, or is it better try to gather and report as much as > possible at the Lua level? > > It would be nice to have, but I have not used it so I don't know how much work it is. At first glance it seems like you could use it without having to override any virtual functions which makes binding it much simpler. > Also, there are some other methods documents (OnExceptionInMainLoop > and OnUnhandledException) and I can't figure out if these are also > needed or if OnFatalExceptions is enough if exposed in wxlua. Thank > you! > I can't tell from the docs what the difference between them really are. Presumably, OnExcept... and OnUnhandl... are caught earlier? I think for your purpose OnFatal... is what you want. Regards, John |
From: John L. <jla...@gm...> - 2013-06-14 04:38:20
|
On Thu, Jun 13, 2013 at 1:17 AM, Paul K <pau...@ya...> wrote: > Hi John, > > I got several reports (from the same machine) of crashes in my > application when a user types something in wxSTC control. It's > difficult to reproduce and seems to happen infrequently, but the > captured stack trace points to wxLuaState::LuaPCall call. This is > running wxlua 2.8.12.2 and wxwidgets 2.9.5 (compiled at the end of > April). > > The wxLua C++ event handler callback uses LuaPCall() to run your Lua event handler function for the wxStyledTextEvent. From the stack it looks like the event is a char added event. I'm including the top part of the stack trace below (the full stack is > in this ticket: > https://github.com/pkulchenko/ZeroBraneStudio/issues/164), but there > are several odd things I noticed. > > 1. The trace shows lua51!lua_yield call after wxLuaState::LuaPCall > call, but I don't see any lua_yield calls in that function. > > lua_yield is a coroutine function, are you running coroutines? If so, then Lua will be swapping lua_States in and out and pausing them whenever it wants to, making the stack seem very strange. You're not trying to install event handlers in a coroutine are you? As we discussed, that's always a bad idea. > 2. The trace shows wxProgressDialog_delete_function call in the stack, > but I don't use that component anywhere in the application; the stack > looks wrong at that point as I wouldn't expect any wxProgressDialog > call from lua_getinfo. > > Did you ever create a wxProgressDialog? The Lua garbage collector may simply be running and finally getting around to deleting it. 3. The crash seems to be in this fragment in wxlua/wxlcallb.cpp: > > // Don't track the wxEvent since we don't own it and tracking > it > // causes clashes in the object registry table since many can > be > // created and deleted and the mem address is resused by C++. > wxlState.wxluaT_PushUserDataType(event, event_wxl_type, false); > wxlState.LuaPCall(1, 0); // one input no returns > > What events are being referred to here as "we don't own it"? Is it > possible to check for these events explicitly? Any idea why it may be > crashing here and how to avoid this? Thank you! > > "We" meaning, wxLua/Lua, does not own the allocated memory for the wxEvent class so even though wxLua pushes it onto the Lua stack wxLua/Lua will not try to delete it when the function ends. Think of wxMouseEvents, if you have a very simple event handler function it may happen that each successive wxMouseEvent will use the same memory. Therefore, wxLua cannot "track" the event since the Lua garbage collector can be slow to clean up and we get seemingly duplicate tracked items, but the first one is long gone, this is merely book keeping. The event is a wxStyledTextEvent based on the stack. Can you rebuild in debug mode? The stack should have line numbers which will clear things up. Everything is "normal" up to LuaPCall, but then I presume you're running a coroutine that's calling the lua_yield, and wxLua does use lua_getinfo for a few things so that may be normal, but the lua_close is very wrong unless you're closing a coroutine, perhaps the coroutine had a wxProgressDialog and that's why it's getting deleted at this point? I can't imagine who's calling AddPendingEvent though, are you? In any case, if you do create a wxProgressDialog I suggest that you explicitly call dlg:Destroy() on it to ensure that it's cleaned up immediately instead of waiting for the garbage collector. Regards, John > 0028eb1c 5dac0207 unknown!unknown+0x0 > 0028eb20 02270b3f wx!ZN12wxEvtHandler15AddPendingEventERK7wxEvent+0x1b > 0028eb40 01ed3fe7 wx!Z38wxLua_wxProgressDialog_delete_functionPPv+0x88a > 0028eb60 66d85a49 lua51!lua_getinfo+0x1015 > 0028eb70 66d8ddd1 lua51!lua_close+0x1eb9 > 0028ebb0 66d8ea14 lua51!lua_close+0x2afc > 0028ec50 66d85e34 lua51!lua_getinfo+0x1400 > 0028ed00 66d85f89 lua51!lua_yield+0x81 > 0028ed10 66d86431 lua51!lua_yield+0x529 > 0028ed80 01f65c4e wx!ZN10wxLuaState8LuaPCallEii+0x7c > 0028edc0 01f5b2da wx!ZN18wxLuaEventCallback7OnEventEP7wxEvent+0x1f4 > 0028ee20 01f5b09b wx!ZN18wxLuaEventCallback11OnAllEventsER7wxEvent+0x59 > 0028ee70 02197e3a > > wx!ZNK16wxAppConsoleBase16CallEventHandlerEP12wxEvtHandlerR14wxEventFunctorR7wxEvent+0x42 > 0028eec0 02199839 > > wx!ZN12wxEvtHandler23ProcessEventIfMatchesIdERK21wxEventTableEntryBasePS_R7wxEvent+0x65 > 0028eef0 02199aa3 > wx!ZN12wxEvtHandler23SearchDynamicEventTableER7wxEvent+0x4f > 0028ef20 02199ae2 wx!ZN12wxEvtHandler11TryHereOnlyER7wxEvent+0x28 > 0028ef40 02199b48 wx!ZN12wxEvtHandler19ProcessEventLocallyER7wxEvent+0x1a > 0028ef60 02199bc9 wx!ZN12wxEvtHandler12ProcessEventER7wxEvent+0x63 > 0028ef90 01f72fb0 > wx!ZN16wxStyledTextCtrl12NotifyParentEP14SCNotification+0x252 > 0028f070 01f75022 wx!ZN11ScintillaWX12NotifyParentE14SCNotification+0x1e > 0028f090 01f82de0 wx!ZN6Editor10NotifyCharEi+0x3a > 0028f160 01f92f85 wx!ZN6Editor10AddCharUTFEPcjb+0x3e1 > 0028f1c0 01f7c151 wx!ZN13ScintillaBase10AddCharUTFEPcjb+0x9f > 0028f200 01f766a9 wx!ZN11ScintillaWX9DoAddCharEi+0x6f > ... > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > |
From: Paul K <pau...@ya...> - 2013-06-13 05:43:08
|
Hi John, I got several reports (from the same machine) of crashes in my application when a user types something in wxSTC control. It's difficult to reproduce and seems to happen infrequently, but the captured stack trace points to wxLuaState::LuaPCall call. This is running wxlua 2.8.12.2 and wxwidgets 2.9.5 (compiled at the end of April). I'm including the top part of the stack trace below (the full stack is in this ticket: https://github.com/pkulchenko/ZeroBraneStudio/issues/164), but there are several odd things I noticed. 1. The trace shows lua51!lua_yield call after wxLuaState::LuaPCall call, but I don't see any lua_yield calls in that function. 2. The trace shows wxProgressDialog_delete_function call in the stack, but I don't use that component anywhere in the application; the stack looks wrong at that point as I wouldn't expect any wxProgressDialog call from lua_getinfo. 3. The crash seems to be in this fragment in wxlua/wxlcallb.cpp: // Don't track the wxEvent since we don't own it and tracking it // causes clashes in the object registry table since many can be // created and deleted and the mem address is resused by C++. wxlState.wxluaT_PushUserDataType(event, event_wxl_type, false); wxlState.LuaPCall(1, 0); // one input no returns What events are being referred to here as "we don't own it"? Is it possible to check for these events explicitly? Any idea why it may be crashing here and how to avoid this? Thank you! I also asked in wx-user maillist, but it may be more wxlua related than wxwidgets related. I'll post an update if I get any additional information. Paul. 0028eb1c 5dac0207 unknown!unknown+0x0 0028eb20 02270b3f wx!ZN12wxEvtHandler15AddPendingEventERK7wxEvent+0x1b 0028eb40 01ed3fe7 wx!Z38wxLua_wxProgressDialog_delete_functionPPv+0x88a 0028eb60 66d85a49 lua51!lua_getinfo+0x1015 0028eb70 66d8ddd1 lua51!lua_close+0x1eb9 0028ebb0 66d8ea14 lua51!lua_close+0x2afc 0028ec50 66d85e34 lua51!lua_getinfo+0x1400 0028ed00 66d85f89 lua51!lua_yield+0x81 0028ed10 66d86431 lua51!lua_yield+0x529 0028ed80 01f65c4e wx!ZN10wxLuaState8LuaPCallEii+0x7c 0028edc0 01f5b2da wx!ZN18wxLuaEventCallback7OnEventEP7wxEvent+0x1f4 0028ee20 01f5b09b wx!ZN18wxLuaEventCallback11OnAllEventsER7wxEvent+0x59 0028ee70 02197e3a wx!ZNK16wxAppConsoleBase16CallEventHandlerEP12wxEvtHandlerR14wxEventFunctorR7wxEvent+0x42 0028eec0 02199839 wx!ZN12wxEvtHandler23ProcessEventIfMatchesIdERK21wxEventTableEntryBasePS_R7wxEvent+0x65 0028eef0 02199aa3 wx!ZN12wxEvtHandler23SearchDynamicEventTableER7wxEvent+0x4f 0028ef20 02199ae2 wx!ZN12wxEvtHandler11TryHereOnlyER7wxEvent+0x28 0028ef40 02199b48 wx!ZN12wxEvtHandler19ProcessEventLocallyER7wxEvent+0x1a 0028ef60 02199bc9 wx!ZN12wxEvtHandler12ProcessEventER7wxEvent+0x63 0028ef90 01f72fb0 wx!ZN16wxStyledTextCtrl12NotifyParentEP14SCNotification+0x252 0028f070 01f75022 wx!ZN11ScintillaWX12NotifyParentE14SCNotification+0x1e 0028f090 01f82de0 wx!ZN6Editor10NotifyCharEi+0x3a 0028f160 01f92f85 wx!ZN6Editor10AddCharUTFEPcjb+0x3e1 0028f1c0 01f7c151 wx!ZN13ScintillaBase10AddCharUTFEPcjb+0x9f 0028f200 01f766a9 wx!ZN11ScintillaWX9DoAddCharEi+0x6f ... |
From: Paul K <pau...@ya...> - 2013-06-03 06:13:11
|
Hi John, I've been looking for ways to catch and report run-time errors in the application. Lua errors are covered with your recent support for EVT_LUA_ERROR (http://sourceforge.net/p/wxlua/svn/180/), but there are still fatal exceptions in the application that may happen. As far as I can see from wxwdigets docs, these are controlled by wxHandleFatalExceptions and OnFatalExceptions; wxlua does provide a methods for wxHandleFatalExceptions, but I don't see anything similar to OnFatalExceptions? How do I get set up a handler that gets called when a fatal exception happens? It would be super useful to also have a way to access Lua state from it to gather Lua stack information to include in the crash report. Or is there an existing alternative I am missing? Would it be possible to use OnFatalExceptions to set a callback (a Lua function) that will be called when a fatal exception happens? While we are on the topic of crash reports, there is wxDebugReport, but it doesn't seem to be available in the binding. Does it make sense to expose it, or is it better try to gather and report as much as possible at the Lua level? Also, there are some other methods documents (OnExceptionInMainLoop and OnUnhandledException) and I can't figure out if these are also needed or if OnFatalExceptions is enough if exposed in wxlua. Thank you! Paul. |
From: Les N. <les...@fa...> - 2013-05-22 14:51:18
|
I am using a fairly recent trunk of wxLua with wxWidgets 2.9.4 and have found a problem with lua_PushString and GetStringType. lua_PushString relies on wxString to convert the wxString to char *. The default conversion uses c_str which causes a problem when converting non-ASCII characters. GetStringType uses lua2wx which by default converts from UTF8 to wxString. For versions of wxWidgets before 2.9.0 lua_PushString uses wx2lua to convert the wxString to UTF8. Why is this disabled for 2.9.x? Les |
From: Milind G. <mil...@gm...> - 2013-05-18 23:19:55
|
Hi Paul, Thanks for looking at this. Actually it is not just Lua 4 windows. If you just download the wxlua binary for windows and copy editor.wx.lua to the bin directory which has all the executables and run it with lua and also run it with wxluafreeze.exe you will see the same differences. So either the wx.dll in the wxlua distribution is different somehow than wxluafreeze's statically linked library or wxluafreeze does something extra than just having the wx library. I am really curious to find out about this since it raises a question in my mind is whether wxlua is truly a lua module or it is a separate lua distribution. Thanks, Milind On Sat, May 18, 2013 at 4:13 PM, Paul K <pau...@ya...> wrote: > Hi Milind, > > > So any ideas why are these subtle differences? > > No; I'd not expect to see any differences. I just checked and I do see > them between using lua.exe and wlua.exe. For example, when running > from wlua.exe, the toolbar has a gradient that I don't see when > running lua.exe. > > We may need to find L4W sources to see what really happens in > wlua.exe. As far as I can tell, lua.exe is just a normal lua > interpreter that loads wx.dll. > > Paul. > > On Sat, May 18, 2013 at 2:47 PM, Milind Gupta <mil...@gm...> > wrote: > > Hi Paul, > > I have attached 2 screen shots of my application. 1 is from > > wlua/wxluafreeze and one is from lua. I have circled the gui differences. > > The calendar control comes out different. Also the button toolbar shows a > > gradient in the wlua version while it is flat in the lua version. The Lua > > version GUI lacks the gradients in other places also. I am not sure what > > other widgets may be different but the calendar control is seen clearly. > > So any ideas why are these subtle differences? > > > > > > > > Thanks, > > Milind > > > > > > > > On Sat, May 18, 2013 at 9:46 AM, Paul K <pau...@ya...> wrote: > >> > >> Hi Milind, > >> > >> The only difference should be is that wxluafreeze includes wx library > >> statically compiled (so you don't need anything else) and in other > >> cases your executables expect wx.dll. > >> > >> I'm not sure what graphics are different. Can you do two screenshots > >> and mark the differences on them? I don't use wxluafreeze, but I > >> wouldn't expect to see any differences. > >> > >> Paul. > >> > >> On Sat, May 18, 2013 at 2:11 AM, Milind Gupta <mil...@gm...> > >> wrote: > >> > Hi, > >> > I have installed Lua for windows and when I run my program with > >> > Lua.exe (my program has require("wx")) the graphics are a little > >> > different > >> > compared to if I run it with an executable wlua also in the package. I > >> > see > >> > the same graphics as wlua if I run my program using wxluafreeze from > the > >> > downloaded wxlua binary package. > >> > Is there a difference of launching the program through Lua or > >> > through > >> > wLua? I am not sure what is different in wLua because it is just a > 35KB > >> > executable and if I remove all wx.dll from the system then it is not > >> > able to > >> > execute the program while wxluafreeze still can execute the program > >> > without > >> > the wx.dll file. > >> > > >> > So what is the difference? > >> > > >> > Thanks, > >> > Milind > >> > > >> > > >> > > >> > > ------------------------------------------------------------------------------ > >> > AlienVault Unified Security Management (USM) platform delivers > complete > >> > security visibility with the essential security capabilities. Easily > and > >> > efficiently configure, manage, and operate all of your security > controls > >> > from a single console and one unified framework. Download a free > trial. > >> > http://p.sf.net/sfu/alienvault_d2d > >> > _______________________________________________ > >> > wxlua-users mailing list > >> > wxl...@li... > >> > https://lists.sourceforge.net/lists/listinfo/wxlua-users > >> > > >> > >> > >> > ------------------------------------------------------------------------------ > >> AlienVault Unified Security Management (USM) platform delivers complete > >> security visibility with the essential security capabilities. Easily and > >> efficiently configure, manage, and operate all of your security controls > >> from a single console and one unified framework. Download a free trial. > >> http://p.sf.net/sfu/alienvault_d2d > >> _______________________________________________ > >> wxlua-users mailing list > >> wxl...@li... > >> https://lists.sourceforge.net/lists/listinfo/wxlua-users > > > > > > > > > ------------------------------------------------------------------------------ > > AlienVault Unified Security Management (USM) platform delivers complete > > security visibility with the essential security capabilities. Easily and > > efficiently configure, manage, and operate all of your security controls > > from a single console and one unified framework. Download a free trial. > > http://p.sf.net/sfu/alienvault_d2d > > _______________________________________________ > > wxlua-users mailing list > > wxl...@li... > > https://lists.sourceforge.net/lists/listinfo/wxlua-users > > > > > ------------------------------------------------------------------------------ > AlienVault Unified Security Management (USM) platform delivers complete > security visibility with the essential security capabilities. Easily and > efficiently configure, manage, and operate all of your security controls > from a single console and one unified framework. Download a free trial. > http://p.sf.net/sfu/alienvault_d2d > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > |
From: Paul K <pau...@ya...> - 2013-05-18 23:13:28
|
Hi Milind, > So any ideas why are these subtle differences? No; I'd not expect to see any differences. I just checked and I do see them between using lua.exe and wlua.exe. For example, when running from wlua.exe, the toolbar has a gradient that I don't see when running lua.exe. We may need to find L4W sources to see what really happens in wlua.exe. As far as I can tell, lua.exe is just a normal lua interpreter that loads wx.dll. Paul. On Sat, May 18, 2013 at 2:47 PM, Milind Gupta <mil...@gm...> wrote: > Hi Paul, > I have attached 2 screen shots of my application. 1 is from > wlua/wxluafreeze and one is from lua. I have circled the gui differences. > The calendar control comes out different. Also the button toolbar shows a > gradient in the wlua version while it is flat in the lua version. The Lua > version GUI lacks the gradients in other places also. I am not sure what > other widgets may be different but the calendar control is seen clearly. > So any ideas why are these subtle differences? > > > > Thanks, > Milind > > > > On Sat, May 18, 2013 at 9:46 AM, Paul K <pau...@ya...> wrote: >> >> Hi Milind, >> >> The only difference should be is that wxluafreeze includes wx library >> statically compiled (so you don't need anything else) and in other >> cases your executables expect wx.dll. >> >> I'm not sure what graphics are different. Can you do two screenshots >> and mark the differences on them? I don't use wxluafreeze, but I >> wouldn't expect to see any differences. >> >> Paul. >> >> On Sat, May 18, 2013 at 2:11 AM, Milind Gupta <mil...@gm...> >> wrote: >> > Hi, >> > I have installed Lua for windows and when I run my program with >> > Lua.exe (my program has require("wx")) the graphics are a little >> > different >> > compared to if I run it with an executable wlua also in the package. I >> > see >> > the same graphics as wlua if I run my program using wxluafreeze from the >> > downloaded wxlua binary package. >> > Is there a difference of launching the program through Lua or >> > through >> > wLua? I am not sure what is different in wLua because it is just a 35KB >> > executable and if I remove all wx.dll from the system then it is not >> > able to >> > execute the program while wxluafreeze still can execute the program >> > without >> > the wx.dll file. >> > >> > So what is the difference? >> > >> > Thanks, >> > Milind >> > >> > >> > >> > ------------------------------------------------------------------------------ >> > AlienVault Unified Security Management (USM) platform delivers complete >> > security visibility with the essential security capabilities. Easily and >> > efficiently configure, manage, and operate all of your security controls >> > from a single console and one unified framework. Download a free trial. >> > http://p.sf.net/sfu/alienvault_d2d >> > _______________________________________________ >> > wxlua-users mailing list >> > wxl...@li... >> > https://lists.sourceforge.net/lists/listinfo/wxlua-users >> > >> >> >> ------------------------------------------------------------------------------ >> AlienVault Unified Security Management (USM) platform delivers complete >> security visibility with the essential security capabilities. Easily and >> efficiently configure, manage, and operate all of your security controls >> from a single console and one unified framework. Download a free trial. >> http://p.sf.net/sfu/alienvault_d2d >> _______________________________________________ >> wxlua-users mailing list >> wxl...@li... >> https://lists.sourceforge.net/lists/listinfo/wxlua-users > > > > ------------------------------------------------------------------------------ > AlienVault Unified Security Management (USM) platform delivers complete > security visibility with the essential security capabilities. Easily and > efficiently configure, manage, and operate all of your security controls > from a single console and one unified framework. Download a free trial. > http://p.sf.net/sfu/alienvault_d2d > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > |
From: Paul K <pau...@ya...> - 2013-05-18 16:46:49
|
Hi Milind, The only difference should be is that wxluafreeze includes wx library statically compiled (so you don't need anything else) and in other cases your executables expect wx.dll. I'm not sure what graphics are different. Can you do two screenshots and mark the differences on them? I don't use wxluafreeze, but I wouldn't expect to see any differences. Paul. On Sat, May 18, 2013 at 2:11 AM, Milind Gupta <mil...@gm...> wrote: > Hi, > I have installed Lua for windows and when I run my program with > Lua.exe (my program has require("wx")) the graphics are a little different > compared to if I run it with an executable wlua also in the package. I see > the same graphics as wlua if I run my program using wxluafreeze from the > downloaded wxlua binary package. > Is there a difference of launching the program through Lua or through > wLua? I am not sure what is different in wLua because it is just a 35KB > executable and if I remove all wx.dll from the system then it is not able to > execute the program while wxluafreeze still can execute the program without > the wx.dll file. > > So what is the difference? > > Thanks, > Milind > > > ------------------------------------------------------------------------------ > AlienVault Unified Security Management (USM) platform delivers complete > security visibility with the essential security capabilities. Easily and > efficiently configure, manage, and operate all of your security controls > from a single console and one unified framework. Download a free trial. > http://p.sf.net/sfu/alienvault_d2d > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > |
From: Milind G. <mil...@gm...> - 2013-05-18 09:21:56
|
As a simple test that can be done to see the difference is, just copy the editor.wx.lua file into the bin directory of the wxlua package and run it with lua.exe and wxluafreeze.exe. The graphics are slightly different. What is missing in the Lua.exe execution to cause it to show different graphics? Thanks, Milind On Sat, May 18, 2013 at 2:11 AM, Milind Gupta <mil...@gm...>wrote: > Hi, > I have installed Lua for windows and when I run my program with > Lua.exe (my program has require("wx")) the graphics are a little different > compared to if I run it with an executable wlua also in the package. I see > the same graphics as wlua if I run my program using wxluafreeze from the > downloaded wxlua binary package. > Is there a difference of launching the program through Lua or > through wLua? I am not sure what is different in wLua because it is just a > 35KB executable and if I remove all wx.dll from the system then it is not > able to execute the program while wxluafreeze still can execute the program > without the wx.dll file. > > So what is the difference? > > Thanks, > Milind > > |
From: Milind G. <mil...@gm...> - 2013-05-18 09:11:50
|
Hi, I have installed Lua for windows and when I run my program with Lua.exe (my program has require("wx")) the graphics are a little different compared to if I run it with an executable wlua also in the package. I see the same graphics as wlua if I run my program using wxluafreeze from the downloaded wxlua binary package. Is there a difference of launching the program through Lua or through wLua? I am not sure what is different in wLua because it is just a 35KB executable and if I remove all wx.dll from the system then it is not able to execute the program while wxluafreeze still can execute the program without the wx.dll file. So what is the difference? Thanks, Milind |