From: Grant M. <gr...@mc...> - 2010-10-10 22:18:35
|
Hi I had a report from Steve Wills that attempting to use SSHMenu on FreeBSD gave the error: /usr/local/lib/ruby/site_ruby/1.8/sshmenu.rb:877:in `initialize': integer 34382765312 too big to convert to `int' from /usr/local/lib/ruby/site_ruby/1.8/sshmenu.rb:877:in `new' We tracked this down to a call to Gtk::ItemFactory and Steve was then able to fix the problem by changing a FIX2INT call in rbgtkitemfactory.c to FIX2LONG. I am aware that Gtk::ItemFactory is deprecated and plan to remove it from SSHMenu in a future release. As long as ruby-gnome2 includes rbgtkitemfactory.c it probably ought to be patched to work on 64bit systems. I'm pretty sure the attached patch is what Steve described. Cheers Grant -------- Forwarded Message -------- > From: Steve Wills <st...@mo...> > To: Grant McLean <gr...@mc...> > Subject: Re: sshmenu problem > Date: Sun, 10 Oct 2010 17:20:49 -0400 > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 10/10/10 16:12, Steve Wills wrote: > > On 10/10/10 16:04, Grant McLean wrote: > >> On Sun, 2010-10-10 at 15:50 -0400, Steve Wills wrote: > >>> Hi Grant, > >>> > >>> FYI, I found the problem. > > > >> Excellent! > > > >>> After attempting to reproduce the problem on Linux and failing, I > >>> decided to dig in and find the problem. Luckily, it was fairly easy to > >>> discover that the problem was a bug in ruby-gnome where they were > >>> calling FIX2INT in rbgtkitemfactory.c instead of FIX2LONG. Changing that > >>> seemed to fix it. The problem seems to be limited to 64bit platforms. > >>> Perhaps Linux treats int as 64bit or gtk is built differently or something. > > > >> Given that information, the "integer too big" error message even makes > >> sense. > > > >> If you have a diff, I'm happy to pass it upstream to the ruby-gnome2 > >> team or you could send it to their mailing list yourself: > > > >> https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en > > > > Yeah, I was thinking of that, but dealing with sf.net's web site to find > > the list wasn't worth it. Thanks for the pointer. Done. > > > > Steve > > Hmm, looks like my message hasn't shown up yet. Perhaps it blocked... > Perhaps you can submit it. It's just a matter of changing FIX2INT to > FIX2LONG in gtk2/ext/gtk2/rbgtkitemfactory.c where gtk_item_factory_new > is called. > > Their test cases need updating to reflect the renamed dirs gtk -> gtk2, > etc. too. I suppose no one actually runs the tests before releasing... ;) > > Steve > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.16 (FreeBSD) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iQEcBAEBAgAGBQJMsi4xAAoJEPXPYrMgexuhzUwIAI3dTdRRs+7hGJb16/9qxOOf > zALubsX8ah7ywqRe/HC4h5g2dbuoA0MTENk0TW49Iz0x4TYEGRZ4BE6nlt8GF0yQ > ccYiRjvCVLAO6pAgdL7iY8IIOB5pgTV4qM1lveeN7ql58+z6St+id00fQnmMO66n > rFKi70tskOnUVEj5kXqmfDG2f7aJWuzEL6Z1cfzwe/eQLCnmv5mTpbLrlU0vJe7x > Rx66L1UY0WPvzozcnowVvZSyDmeztNba/bCpQENjXtLjJmaY9iAcJJ2j+dB2xWfI > Ce+CgP5ACywiET2QTL4XdA1wQ6lBhPoyRVDb8saMtdyxV0alE3JC3SuCDFf+tWM= > =/g97 > -----END PGP SIGNATURE----- |