Hello, when i run the bigdemo sample, the app crashes initially after opening the "tip of the day" (it doesn''t when i don''t touch mouse and keyboard). can''t even get to the main window. i ran it in gdb, it gives me the following trace: Starting program: /usr/local/bin/ruby bigdemo.rb [Thread debugging using libthread_db enabled] [New Thread 0xb7c3ab60 (LWP 7428)] bigdemo.rb:591: [BUG] object allocation during garbage collection phase ruby 1.8.7 (2008-08-02 revision 0) [i686-linux] Program received signal SIGABRT, Aborted. [Switching to Thread 0xb7c3ab60 (LWP 7428)] 0xb7ef2410 in __kernel_vsyscall () (gdb) whe #0 0xb7ef2410 in __kernel_vsyscall () #1 0xb7c66085 in raise () from /lib/tls/i686/cmov/libc.so.6 #2 0xb7c67a01 in abort () from /lib/tls/i686/cmov/libc.so.6 #3 0xb7e3a1e2 in rb_bug ( fmt=0xb7ec62e8 "object allocation during garbage collection phase") at error.c:213 #4 0xb7e5dbf5 in rb_newobj () at gc.c:444 #5 0xb7e2b197 in bignew_1 (klass=0, len=6, sign=7428) at bignum.c:63 #6 0xb7e2bac9 in rb_uint2big (n=1074221808) at bignum.c:178 #7 0xb7e2bb51 in rb_int2big (n=0) at bignum.c:202 #8 0xb7e2bb98 in rb_int2inum (n=0) at bignum.c:222 #9 0xb7134c7e in ?? () from /usr/local/lib/ruby/gems/1.8/gems/wxruby-1.9.7-x86-linux/lib/wxruby2.so #10 0xb7134c8e in ?? () from /usr/local/lib/ruby/gems/1.8/gems/wxruby-1.9.7-x86-linux/lib/wxruby2.so #11 0xb7e5d6aa in garbage_collect () at gc.c:1275 #12 0xb7e5dbe5 in rb_newobj () at gc.c:446 #13 0xb7e2b197 in bignew_1 (klass=0, len=6, sign=7428) at bignum.c:63 #14 0xb7e2bac9 in rb_uint2big (n=1074225608) at bignum.c:178 #15 0xb7e2bb51 in rb_int2big (n=0) at bignum.c:202 #16 0xb7e2bb98 in rb_int2inum (n=0) at bignum.c:222 #17 0xb73de8ce in ?? () $ ruby -v ruby 1.8.7 (2008-08-02 revision 0) [i686-linux] don''t know if this is a bug, maybe its my own fault. i don''t really need the bigdemo so it''s no problem for me, but maybe the wxruby devs are interested. i remember that it was working when i compiled ruby (same version) without pthread support, maybe this is the prob (ruby 1.8.6 worked even with pthread support). if you need further info, please tell me. Greetings, Niklas _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users
Alex Fenton
2008-Aug-05 18:49 UTC
[wxruby-users] object allocation during garbage collection phase
Hi Niklas Niklas Baumstark wrote:> Hello, > > when i run the bigdemo sample, the app crashes initially after opening the "tip of the day" (it doesn''t when i don''t touch mouse and keyboard). can''t even get to the main window. i ran it in gdb, it gives me the following trace: > > Starting program: /usr/local/bin/ruby bigdemo.rb > [Thread debugging using libthread_db enabled] > [New Thread 0xb7c3ab60 (LWP 7428)] > bigdemo.rb:591: [BUG] object allocation during garbage collection phase > ruby 1.8.7 (2008-08-02 revision 0) [i686-linux] > > > Program received signal SIGABRT, Aborted. > [Switching to Thread 0xb7c3ab60 (LWP 7428)] > 0xb7ef2410 in __kernel_vsyscall () > (gdb) whe > #0 0xb7ef2410 in __kernel_vsyscall () > #1 0xb7c66085 in raise () from /lib/tls/i686/cmov/libc.so.6 > #2 0xb7c67a01 in abort () from /lib/tls/i686/cmov/libc.so.6 > #3 0xb7e3a1e2 in rb_bug ( > fmt=0xb7ec62e8 "object allocation during garbage collection phase") > at error.c:213... Firstly, thank you for taking the time to report this in detail with a backtrace. It''s much appreciated.> $ ruby -v > ruby 1.8.7 (2008-08-02 revision 0) [i686-linux] > > don''t know if this is a bug, maybe its my own fault. i don''t really need the bigdemo so it''s no problem for me, but maybe the wxruby devs are interested.No, it''s not your fault, and it''s not our fault either. With 1.8.7, the ruby developers chose to change both the public APIs and aspects of the GC/memory management internals. This broke any SWIG-generated ruby libraries that use certain SWIG features (object tracking). IMO this was a sloppy decision on a stable branch that reflects badly on ruby''s development process, but - there we are. Anyway, I recently committed a set of patches that I think fixed this problem for Ruby 1.9, which has the same problem. If you''re willing to test this out from wxRuby''s SVN with ruby 1.8.7 that would be very kind. cheers alex
Niklas Baumstark
2008-Aug-05 19:41 UTC
[wxruby-users] object allocation during garbage collection phase
Hello, Alex Fenton <alex at pressure.to> wrote:> Anyway, I recently committed a set of patches that I think fixed this > problem for Ruby 1.9, which has the same problem. If you''re willing to > test this out from wxRuby''s SVN with ruby 1.8.7 that would be very kind.i did what you told me, compiled wxruby from svn, but it doesn''t seem to work: irb(main):001:0> require ''wx'' LoadError: /usr/local/lib/ruby/site_ruby/1.8/i686-linux/wxruby2.so: undefined symbol: _ZNK11wxMediaCtrl12GetClassInfoEv - /usr/local/lib/ruby/site_ruby/1.8/i686-linux/wxruby2.so from /usr/local/lib/ruby/site_ruby/1.8/i686-linux/wxruby2.so from /usr/local/lib/ruby/site_ruby/1.8/wx.rb:12 from (irb):1:in `require'' from (irb):1 i have no idea of what''s going wrong here, i''m not this experienced with the internals of your code and with ruby development at all. Greetings, Niklas -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20080805/8e7f13b8/attachment.bin>
Alex Fenton
2008-Aug-05 20:25 UTC
[wxruby-users] object allocation during garbage collection phase
Niklas Baumstark wrote:> Hello, > > Alex Fenton <alex at pressure.to> wrote: > >> Anyway, I recently committed a set of patches that I think fixed this >> problem for Ruby 1.9, which has the same problem. If you''re willing to >> test this out from wxRuby''s SVN with ruby 1.8.7 that would be very kind. >> > > i did what you told me, compiled wxruby from svn, but it doesn''t seem to work: > > irb(main):001:0> require ''wx'' > LoadError: /usr/local/lib/ruby/site_ruby/1.8/i686-linux/wxruby2.so: undefined symbol: _ZNK11wxMediaCtrl12GetClassInfoEv - /usr/local/lib/ruby/site_ruby/1.8/i686-linux/wxruby2.so > from /usr/local/lib/ruby/site_ruby/1.8/i686-linux/wxruby2.so > from /usr/local/lib/ruby/site_ruby/1.8/wx.rb:12 > from (irb):1:in `require'' > from (irb):1 > > i have no idea of what''s going wrong here, i''m not this experienced with the internals of your code and with ruby development at all.Thanks for trying it. You should be able to work around this error by doing rake WXRUBY_EXCLUDED=MediaCtrl,MediaEvent Can I ask what wxWidgets you''re compiling against - eg a distro version, or a self-built one? thanks alex
Niklas Baumstark
2008-Aug-06 14:07 UTC
[wxruby-users] object allocation during garbage collection phase
Hello, Alex Fenton <alex at pressure.to> wrote:> Thanks for trying it. You should be able to work around this error by doing > > rake WXRUBY_EXCLUDED=MediaCtrl,MediaEventthis leaves me with exactly the same error: niklas at niklaspc:~/ruby-cvs/wxruby/svn/trunk/wxruby2$ rake WXRUBY_EXCLUDED=MediaCtrl,MediaEvent (in /home/niklas/ruby-cvs/wxruby/svn/trunk/wxruby2) Enabling DYNAMIC build Enabling RELEASE build Enabling UNICODE build The following wxWidgets features are not available and will be skipped: MediaCtrl MediaEvent PrinterDC niklas at niklaspc:~/ruby-cvs/wxruby/svn/trunk/wxruby2$ cd / niklas at niklaspc:/$ irb irb(main):001:0> require ''wx'' LoadError: /usr/local/lib/ruby/site_ruby/1.8/i686-linux/wxruby2.so: undefined symbol: _ZNK11wxMediaCtrl12GetClassInfoEv - /usr/local/lib/ruby/site_ruby/1.8/i686-linux/wxruby2.so from /usr/local/lib/ruby/site_ruby/1.8/i686-linux/wxruby2.so from /usr/local/lib/ruby/site_ruby/1.8/wx.rb:12 from (irb):1:in `require'' from (irb):1 irb(main):002:0> quit> Can I ask what wxWidgets you''re compiling against - eg a distro version, > or a self-built one?$ wx-config --version-full 2.8.7.1 it''s a distro version (libwxbase2.8-dev on ubuntu). compiling wxruby took long enough for me (about 30 minutes), so i didn''t try and compile wxwidgets. Greetings, Niklas -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20080806/196433c6/attachment.bin>
Alex Fenton
2008-Aug-06 14:55 UTC
[wxruby-users] object allocation during garbage collection phase
Niklas Baumstark wrote:>> Can I ask what wxWidgets you''re compiling against - eg a distro version, >> or a self-built one? >> > > $ wx-config --version-full > 2.8.7.1 > > it''s a distro version (libwxbase2.8-dev on ubuntu). compiling wxruby took long enough for me (about 30 minutes), so i didn''t try and compile wxwidgets. >Fair enough. I haven''t tried using the distro packages on Linux myself, but you might check that you also have libwxgtk-2.8 and libwxgtk2.8-dev libwxbase contains only the non GUI classes. Only libwxgtk has libgstreamer as a dependency, and that''s where the MediaCtrl code is found. Sorry for the inconvenience but wxwidgets has hundreds of compile-time options and different ways to organise the library files. It''s quite tricky to cope with all the variations. alex
Niklas Baumstark
2008-Aug-06 18:29 UTC
[wxruby-users] object allocation during garbage collection phase
Hello, finally solved the problem as described here: http://rubyforge.org/pipermail/wxruby-development/2008-May/001322.html could have sworn that i didn''t get this result when i asked google about the problem yesterday, but today i do :) maybe this should be fixed... back to topic: it does now work, bug is gone. Greetings, Niklas -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20080806/97ef97a7/attachment.bin>