On Thu, Oct 14, 2010 at 11:13 PM, Jean-Yves F. Barbier <12u...@gmail.com> wrote:
> Hi list,
>
> There's something I don't understand in the example "controls.wx.lua",
> the insertion of the "wx.wxBitmapComboBox" crashes the program with this
> output:
>
> $ lua JY_controls.wx.lua
> lua: JY_controls.wx.lua:435: wxLua: Function call has invalid argument 2 on
> method 03.
>
> Function called: 'Add(wxFlexGridSizer, wxBitmapComboBox, number, number, 
> number)'
> 01. wxSizer::Add(wxSizer(self), number [, number, number, number, number, 
> wxObject])
> 02. wxSizer::Add(wxSizer(self) [, wxSizer, number, number, number, wxObject])
> 03. wxSizer::Add(wxSizer(self) [, wxWindow, number, number, number, wxObject])
> stack traceback: [C]: in function 'Add'
>        JY_controls.wx.lua:435: in function 'AddControl'
>        JY_controls.wx.lua:514: in function 'CreateControlsWindow'
>        JY_controls.wx.lua:1081: in function 'main'
>        JY_controls.wx.lua:1120: in main chunk
>        [C]: ?
>
> The file's almost genuine (I just added some print lines to try to
> understand what's wrong) and it works when I comment its last line:
> "AddControl("wxBitmapComboBox", control)", making this control obviously
> overlap the throbber (first) one.
>
> So my question is: is this example wrong, or has my wxLua compilation
> a hidden PB? - Debian sid 32 bits on an Athlon XP2600+ with regular LUA
> packages.

I have no problem with this sample in MSW and Mandriva Linux. What
wxLua are you using, did you compile it yourself? What wxWidgets
version and from where? What Lua version and are you sure you're
compiling wxLua using the lua-devel package from Debian sid or are you
compiling wxLua with it's own Lua (in modules/lua) and then running it
with the system installed Lua?

The fact that the wxBitmapComboBox is created and does show if not
added to the sizer, but crashes when added to the sizer makes me think
that you have mismatched libraries. You can get very strange and
nearly undebuggable errors in these cases. Try running ldd on the
wxLua libs to make sure that the libs it links to are appropriate,
especially liblua.so being in /lib/, /usr/lib/, or somewhere like that
to confirm that you're using the system Lua.

Hope this helps,
     John

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to