Michael S. Jessop wrote:> > This may belong elsewhere... but I downloaded and and installed wxGTK on > Fedora Core 2 (I know I know, beta software) then downloaded and built > wxRuby successfully (at least I didn''t get any errors - extconf.rb, make, > make install). Whenever I try to run a sample program I get... > > [mike@zootoo minimal]$ ruby minimal.rb > /usr/lib/site_ruby/1.8/i386-linux-gnu/wxruby.so: wrong argument type > false (expected Class) (TypeError) from minimal.rb:2 > > ....can anyone dangle a carrot in front of my face and lead me in > the right > direction here?The place to post stuff like this is the wxruby-users mailing list. You can subscribe at: http://rubyforge.org/mail/?group_id=35 In the meantime, I will cross-post this for you. Curt
Curt Hibbs wrote:> Michael S. Jessop wrote: > >>This may belong elsewhere... but I downloaded and and installed wxGTK on >>Fedora Core 2 (I know I know, beta software) then downloaded and built >>wxRuby successfully (at least I didn''t get any errors - extconf.rb, make, >>make install). Whenever I try to run a sample program I get... >> >>[mike@zootoo minimal]$ ruby minimal.rb >>/usr/lib/site_ruby/1.8/i386-linux-gnu/wxruby.so: wrong argument type >> false (expected Class) (TypeError) from minimal.rb:2Very, very strange. I have never seen anything like that. I can''t even begin to guess what could cause it, aside from a corrupted binary. It looks like this is under Ruby 1.8, but I would like to double-check the exact version of Ruby being used, as well as the version of wxGTK, and the version of gcc/g++. The error is somewhere inside the wxRuby library initialization code. Unfortunately, there is quite a bit of code there, so it is difficult to guiess where it might be. Since my gdb skills are weak, I would personally try to track it down using printfs. If Michael is willing, I would be happy to help guide that debugging process. Kevin
Kevin Smith wrote:>> Michael S. Jessop wrote: >>> >>> [mike@zootoo minimal]$ ruby minimal.rb >>> /usr/lib/site_ruby/1.8/i386-linux-gnu/wxruby.so: wrong argument type >>> false (expected Class) (TypeError) from minimal.rb:2 > > > Very, very strange. I have never seen anything like that.Even stranger: Today, for the first time ever, I just saw this myself, but under wxruby-swig. Talk about synchronicity! In my case, it was because I had recompiled some of the modules but not others. The result was that some of the global variables that hold the ruby Class VALUE''s had not been initialized. The code tried to extract a ruby class, but the VALUE was 0 ("false"), causing that error message. However, in wxRuby 0.3, we rely on C++ global object initializers. So this "shouldn''t happen". My best guess at this point is that there is something strange going on with g++ or the standard C++ library.> looks like this is under Ruby 1.8, but I would like to double-check the > exact version of Ruby being used, as well as the version of wxGTK, and > the version of gcc/g++.I am still interested in that information. And I have a pretty good idea of where to insert a few printfs if you (Michael) want to go that route. Thanks, Kevin