Does the following code crash for anyone else? My app is unpredictably crashing with a segmentation fault, which I can sometimes reproduce with this contrived test case. require ''fox16''; include Fox start = Time.now count = 0 items = [] while true 28125.times {|i| items[i] = FXTableItem.new '''' } count += 1 puts "#{count}, after #{Time.now - start} seconds" end The eventual error: c:/program files/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.16-x86-mswin32-60/lib/fox16 /kwargs.rb:2367: [BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [i386-mswin32] I''ve had this code crash on XP and Vista (but not Linux), often in under a minute, though not always. Does anyone know what might be going on? Thanks for any help, Tim Smith -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20080919/ff3b105f/attachment.html>
are you running out of GDI handles? On Fri, Sep 19, 2008 at 10:31 PM, Tim Smith <tsmith at tektone.net> wrote:> Does the following code crash for anyone else? My app is unpredictably > crashing with a segmentation fault, which I can sometimes reproduce with > this contrived test case. > > > > require ''fox16''; include Fox > > > > start = Time.now > > count = 0 > > items = [] > > while true > > 28125.times {|i| > > items[i] = FXTableItem.new '''' > > } > > count += 1 > > puts "#{count}, after #{Time.now - start} seconds" > > end > > > > The eventual error: > > > > c:/program files/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.16-x86-mswin32-60/lib/fox16/kwargs.rb:2367: [BUG] Segmentation fault > > ruby 1.8.6 (2007-09-24) [i386-mswin32] > > > > I''ve had this code crash on XP and Vista (but not Linux), often in under a > minute, though not always. Does anyone know what might be going on? > > > > Thanks for any help, > > > > Tim Smith > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20080919/360be19c/attachment.html>
I don''t think so. For that process, Task Manager shows 38 Handles, 1 USER Object, and 5 GDI Objects on my XP machine, and 72 Handles, 1 USER Object, and 4 GDI Objects on my Vista machine. None of those numbers seem to increase before it crashes. Tim Smith ________________________________ From: fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] On Behalf Of Meinrad Recheis Sent: Friday, September 19, 2008 5:29 PM To: fxruby-users at rubyforge.org Subject: Re: [fxruby-users] FXTableItem.new segmentation fault are you running out of GDI handles? On Fri, Sep 19, 2008 at 10:31 PM, Tim Smith <tsmith at tektone.net> wrote: Does the following code crash for anyone else? My app is unpredictably crashing with a segmentation fault, which I can sometimes reproduce with this contrived test case. require ''fox16''; include Fox start = Time.now count = 0 items = [] while true 28125.times {|i| items[i] = FXTableItem.new '''' } count += 1 puts "#{count}, after #{Time.now - start} seconds" end The eventual error: c:/program files/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.16-x86-mswin32-60/lib/fox16 /kwargs.rb:2367: [BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [i386-mswin32] I''ve had this code crash on XP and Vista (but not Linux), often in under a minute, though not always. Does anyone know what might be going on? Thanks for any help, Tim Smith _______________________________________________ fxruby-users mailing list fxruby-users at rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20080919/455301a4/attachment-0001.html>
Hi, Your program is running just fine on my computer, for over 220 seconds now. I''m using: - Windows XP SP2 - ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] - fxruby (1.6.14) Philippe _____ De : fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] De la part de Tim Smith Envoy? : vendredi, 19. septembre 2008 22:32 ? : fxruby-users at rubyforge.org Objet : [fxruby-users] FXTableItem.new segmentation fault Does the following code crash for anyone else? My app is unpredictably crashing with a segmentation fault, which I can sometimes reproduce with this contrived test case. require ''fox16''; include Fox start = Time.now count = 0 items = [] while true 28125.times {|i| items[i] = FXTableItem.new '''' } count += 1 puts "#{count}, after #{Time.now - start} seconds" end The eventual error: c:/program files/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.16-x86-mswin32-60/lib/fox16/kwargs.rb:2367: [BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [i386-mswin32] I''ve had this code crash on XP and Vista (but not Linux), often in under a minute, though not always. Does anyone know what might be going on? Thanks for any help, Tim Smith -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20080922/7fd5c494/attachment.html>
It can be unpredictable. Sometimes it crashes if you just tweak it a bit, say by increasing the array size from 28125 to 281250, or creating multiple arrays. I''ve now had it crash on Linux, with ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-linux], and FXRuby 1.6.16. That error message is more detailed: FXRuby.cpp:1472: FXASSERT(!NIL_P(obj)) failed. /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.6.16/lib/fox16/kwargs.rb:2367:in `old_initialize'': undefined method `getIcon'' for nil:NilClass (NoMethodError) from /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.6.16/lib/fox16/kwargs.rb:2367:in `initialize'' So it looks like in FXRuby.cpp, FXRbCallIconMethod() is calling FXRbGetRubyObj() and getting back nil? Tim Smith ________________________________ From: fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] On Behalf Of Philippe Lang Sent: Monday, September 22, 2008 3:10 AM To: fxruby-users at rubyforge.org Subject: Re: [fxruby-users] FXTableItem.new segmentation fault Hi, Your program is running just fine on my computer, for over 220 seconds now. I''m using: - Windows XP SP2 - ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] - fxruby (1.6.14) Philippe ________________________________ De : fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] De la part de Tim Smith Envoy? : vendredi, 19. septembre 2008 22:32 ? : fxruby-users at rubyforge.org Objet : [fxruby-users] FXTableItem.new segmentation fault Does the following code crash for anyone else? My app is unpredictably crashing with a segmentation fault, which I can sometimes reproduce with this contrived test case. require ''fox16''; include Fox start = Time.now count = 0 items = [] while true 28125.times {|i| items[i] = FXTableItem.new '''' } count += 1 puts "#{count}, after #{Time.now - start} seconds" end The eventual error: c:/program files/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.16-x86-mswin32-60/lib/fox16/kwargs.rb:2367: [BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [i386-mswin32] I''ve had this code crash on XP and Vista (but not Linux), often in under a minute, though not always. Does anyone know what might be going on? Thanks for any help, Tim Smith -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20080924/861187d7/attachment-0001.html>
Maybe you should try with FXRuby 1.6.14? _____ De : fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] De la part de Tim Smith Envoy? : jeudi, 25. septembre 2008 02:20 ? : fxruby-users at rubyforge.org Objet : Re: [fxruby-users] FXTableItem.new segmentation fault It can be unpredictable. Sometimes it crashes if you just tweak it a bit, say by increasing the array size from 28125 to 281250, or creating multiple arrays. I''ve now had it crash on Linux, with ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-linux], and FXRuby 1.6.16. That error message is more detailed: FXRuby.cpp:1472: FXASSERT(!NIL_P(obj)) failed. /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.6.16/lib/fox16/kwargs.rb:2367:in `old_initialize'': undefined method `getIcon'' for nil:NilClass (NoMethodError) from /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.6.16/lib/fox16/kwargs.rb:2367:in `initialize'' So it looks like in FXRuby.cpp, FXRbCallIconMethod() is calling FXRbGetRubyObj() and getting back nil? Tim Smith _____ From: fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] On Behalf Of Philippe Lang Sent: Monday, September 22, 2008 3:10 AM To: fxruby-users at rubyforge.org Subject: Re: [fxruby-users] FXTableItem.new segmentation fault Hi, Your program is running just fine on my computer, for over 220 seconds now. I''m using: - Windows XP SP2 - ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] - fxruby (1.6.14) Philippe _____ De : fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] De la part de Tim Smith Envoy? : vendredi, 19. septembre 2008 22:32 ? : fxruby-users at rubyforge.org Objet : [fxruby-users] FXTableItem.new segmentation fault Does the following code crash for anyone else? My app is unpredictably crashing with a segmentation fault, which I can sometimes reproduce with this contrived test case. require ''fox16''; include Fox start = Time.now count = 0 items = [] while true 28125.times {|i| items[i] = FXTableItem.new '''' } count += 1 puts "#{count}, after #{Time.now - start} seconds" end The eventual error: c:/program files/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.16-x86-mswin32-60/lib/fox16/kwargs.rb:2367: [BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [i386-mswin32] I''ve had this code crash on XP and Vista (but not Linux), often in under a minute, though not always. Does anyone know what might be going on? Thanks for any help, Tim Smith -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20080925/949ea621/attachment.html>
Tim Smith wrote:> > Does the following code crash for anyone else? My app is unpredictably > crashing with a segmentation fault, which I can sometimes reproduce > with this contrived test case. > > require ''fox16''; include Fox > > start = Time.now > count = 0 > items = [] > while true > 28125.times {|i| > items[i] = FXTableItem.new '''' > } > count += 1 > puts "#{count}, after #{Time.now - start} seconds" > end > > The eventual error: > > c:/program files/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.16-x86-mswin32-60/lib/fox16/kwargs.rb:2367: [BUG] Segmentation fault > ruby 1.8.6 (2007-09-24) [i386-mswin32] > > I?ve had this code crash on XP and Vista (but not Linux), often in > under a minute, though not always. Does anyone know what might be > going on? > > Thanks for any help, >Hi Tim It has been running for nearly an hour now on kernel 2.6.24.7-desktop-1mnb with ruby 1.8.7 (2008-05-31 patchlevel 0) [x86_64-linux] fxruby 1.6.14 swapping cores at regular intervals, average cpu use 50%. 4 Gb RAM. Count 4641 after 3680 seconds. Len
I''ve had it crash with FXRuby 1.6.14 on XP, Vista, and Linux. I''ve also had it crash with ruby 1.8.7 on Linux, with the same failed assertion (FXRuby.cpp:1472), and the message "object allocation during garbage collection phase". I''m including a tweaked version below which seems to crash more reliably within the first few minutes. I''m also including a backtrace below. It appears that during the initialization of an FXTableItem, FXRbRegisterRubyObj() was called to associate the Ruby object with the Fox object in FXRuby_Objects. But while this was happening, garbage collection occurred, causing FXRbTableItem::markfunc() to be called, which called getIcon(), which led to a lookup in FXRuby_Objects for the Ruby object which was still in the process of being inserted there. Tim Smith require ''fox16''; include Fox start = Time.now count = 0 items = [] while true 10.times {|j| items[j] = [] 28125.times {|i| items[j][i] = FXTableItem.new '''' } } count += 1 puts "#{count}, after #{Time.now - start} seconds" end FXRuby.cpp:1472: FXASSERT(!NIL_P(obj)) failed. Breakpoint 1, rb_exc_raise (mesg=0) at eval.c:4616 4616 in eval.c (gdb) bt #0 rb_exc_raise (mesg=0) at eval.c:4616 #1 0x0805fb07 in rb_method_missing (argc=1, argv=0xfeefcff0, obj=4) at eval.c:5630 #2 0x0805c192 in rb_call0 (klass=4143832220, recv=4, id=3889, oid=4277134704, argc=1, argv=0xfeefcff0, body=0xf6fdc130, flags=2) at eval.c:5702 #3 0x0805c70b in rb_call (klass=4143832220, recv=4, mid=3889, argc=1, argv=0xfeefcff0, scope=1, self=6) at eval.c:6094 #4 0x0805cd4e in rb_funcall2 (recv=0, mid=3889, argc=1, argv=0xfeefcff0) at ruby.h:679 #5 0x0806008a in method_missing (obj=4, id=8311054, argc=0, argv=0x0, call_status=-17832592) at eval.c:5671 #6 0x0805c744 in rb_call (klass=4143829940, recv=4, mid=32465, argc=0, argv=0x0, scope=1, self=6) at eval.c:6090 #7 0x0805cfb6 in vafuncall (recv=4, mid=32465, n=0, ar=0xfeefd0f4) at ruby.h:679 #8 0x0805d0d2 in rb_funcall (recv=4277134704, mid=0, n=0) at eval.c:6188 #9 0xf6b274d7 in FXRbCallIconMethod (recv=0x9e511c0, func=32465) at FXRuby.cpp:1473 #10 0xf6b02dff in FXRbTableItem::getIcon (this=0x9e511c0) at impl.cpp:1011 #11 0xf6920945 in FXRbTableItem::markfunc (self=0x9e511c0) at markfuncs.cpp:517 #12 0x0806b672 in gc_mark_children (ptr=4129486760, lev=1) at gc.c:945 #13 0x0806bbca in mark_locations_array (x=0xfeefd9fc, n=5357) at gc.c:629 #14 0x0806be3e in garbage_collect () at gc.c:1368 #15 0x0806c7b2 in ruby_xmalloc (size=65708) at gc.c:103 #16 0x0806c96d in ruby_xcalloc (n=16427, size=65708) at gc.c:123 #17 0x080a9d35 in rehash (table=0x965ad78) at st.c:324 #18 0x080a9eb0 in st_insert (table=0x965ad78, key=166007232, value=166007264) at st.c:293 #19 0xf6b23c74 in FXRbRegisterRubyObj (rubyObj=4129486760, foxObj=0x9e511c0) at FXRuby.cpp:253 #20 0xf69b71c7 in _wrap_new_FXTableItem (argc=3, argv=0xfeefe630, self=4129486760) at table_wrap.cpp:846 #21 0x0805c192 in rb_call0 (klass=4143645140, recv=4129486760, id=73137, oid=4277134704, argc=3, argv=0xfeefe630, body=0xf6fafc34, flags=2) at eval.c:5702 #22 0x0805c70b in rb_call (klass=4143645140, recv=4129486760, mid=73137, argc=3, argv=0xfeefe630, scope=1, self=4129486760) at eval.c:6094 #23 0x08058773 in rb_eval (self=4129486760, n=0x0) at ruby.h:679 #24 0x08061bac in block_pass (self=4129486760, node=0xf635360c) at eval.c:8884 #25 0x08058d56 in rb_eval (self=4129486760, n=0x0) at eval.c:3189 #26 0x0805c06a in rb_call0 (klass=4143645140, recv=4129486760, id=2961, oid=4277134704, argc=0, argv=0xfeeff8c4, body=0xf63546c4, flags=2) at eval.c:5998 #27 0x0805c70b in rb_call (klass=4143645140, recv=4129486760, mid=2961, argc=1, argv=0xfeeff8c0, scope=1, self=6) at eval.c:6094 #28 0x0805ccfc in rb_funcall2 (recv=0, mid=2961, argc=1, argv=0xfeeff8c0) at ruby.h:679 #29 0x0805cd9a in rb_obj_call_init (obj=4129486760, argc=1, argv=0xfeeff8c0) at eval.c:7626 #30 0x0807f490 in rb_class_new_instance (argc=1, argv=0xfeeff8c0, klass=4143645140) at object.c:1594 #31 0x0805c192 in rb_call0 (klass=4143832320, recv=4143645140, id=3353, oid=4277134704, argc=1, argv=0xfeeff8c0, body=0xf6fdcacc, flags=0) at eval.c:5702 #32 0x0805c70b in rb_call (klass=4143832320, recv=4143645140, mid=3353, argc=1, argv=0xfeeff8c0, scope=0, self=4143827360) at eval.c:6094 #33 0x08058773 in rb_eval (self=4143827360, n=0x0) at ruby.h:679 #34 0x08059eaa in rb_eval (self=4143827360, n=0x0) at eval.c:3450 #35 0x0805dfaf in rb_yield_0 (val=42379, self=4143827360, klass=0, flags=-152037876, avalue=0) at eval.c:5021 #36 0x0805efca in rb_yield (val=4277134704) at eval.c:5105 #37 0x0807d64f in int_dotimes (num=56251) at numeric.c:2787 #38 0x0805c16e in rb_call0 (klass=4143813360, recv=56251, id=5473, oid=4277134704, argc=0, argv=0x0, body=0xf6fd9228, flags=0) at eval.c:5702 #39 0x0805c70b in rb_call (klass=4143813360, recv=56251, mid=5473, argc=0, argv=0x0, scope=0, self=4143827360) at eval.c:6094 #40 0x08058773 in rb_eval (self=4143827360, n=0x0) at ruby.h:679 #41 0x0805b3f7 in rb_eval (self=4143827360, n=0x0) at eval.c:3203 #42 0x0805dfaf in rb_yield_0 (val=3, self=4143827360, klass=0, flags=-152037596, avalue=0) at eval.c:5021 #43 0x0805efca in rb_yield (val=4277134704) at eval.c:5105 #44 0x0807d64f in int_dotimes (num=21) at numeric.c:2787 #45 0x0805c16e in rb_call0 (klass=4143813360, recv=21, id=5473, oid=4277134704, argc=0, argv=0x0, body=0xf6fd9228, flags=0) at eval.c:5702 #46 0x0805c70b in rb_call (klass=4143813360, recv=21, mid=5473, argc=0, argv=0x0, scope=0, self=4143827360) at eval.c:6094 #47 0x08058773 in rb_eval (self=4143827360, n=0x0) at ruby.h:679 #48 0x0805b3f7 in rb_eval (self=4143827360, n=0x0) at eval.c:3203 #49 0x0805a152 in rb_eval (self=4143827360, n=0x0) at eval.c:3127 #50 0x0806369c in ruby_exec_internal () at eval.c:1634 #51 0x080636cc in ruby_exec () at eval.c:1654 #52 0x080645eb in ruby_run () at eval.c:1664 #53 0x08052888 in main (argc=2, argv=0xfef02e44, envp=0xfef02e50) at main.c:48 ________________________________ From: fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] On Behalf Of Philippe Lang Sent: Thursday, September 25, 2008 1:58 AM To: fxruby-users at rubyforge.org Subject: Re: [fxruby-users] FXTableItem.new segmentation fault Maybe you should try with FXRuby 1.6.14? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20080925/c00c4b16/attachment-0001.html>
FXRuby does not work with Ruby 1.8.7 due to a bug in SWIG. http://sourceforge.net/tracker/index.php?func=detail&aid=2034216&group_id=1645&atid=101645 Unfortunately the same ruby change that results in the "object allocation during garbage collection phase" made it into the Ruby 1.8.6 releases as well at around version 117. So to use FXRuby, you must use a version of Ruby 1.8.6 that is before r117. Yes, this sucks. Hopefully SWIG will be fixed soon, or Lyle will work around the issue like the wxRuby group did. Ryan ________________________________ From: fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] On Behalf Of Tim Smith Sent: Thursday, September 25, 2008 11:44 AM To: fxruby-users at rubyforge.org Subject: Re: [fxruby-users] FXTableItem.new segmentation fault I''ve had it crash with FXRuby 1.6.14 on XP, Vista, and Linux. I''ve also had it crash with ruby 1.8.7 on Linux, with the same failed assertion (FXRuby.cpp:1472), and the message "object allocation during garbage collection phase". I''m including a tweaked version below which seems to crash more reliably within the first few minutes. I''m also including a backtrace below. It appears that during the initialization of an FXTableItem, FXRbRegisterRubyObj() was called to associate the Ruby object with the Fox object in FXRuby_Objects. But while this was happening, garbage collection occurred, causing FXRbTableItem::markfunc() to be called, which called getIcon(), which led to a lookup in FXRuby_Objects for the Ruby object which was still in the process of being inserted there. Tim Smith require ''fox16''; include Fox start = Time.now count = 0 items = [] while true 10.times {|j| items[j] = [] 28125.times {|i| items[j][i] = FXTableItem.new '''' } } count += 1 puts "#{count}, after #{Time.now - start} seconds" end FXRuby.cpp:1472: FXASSERT(!NIL_P(obj)) failed. Breakpoint 1, rb_exc_raise (mesg=0) at eval.c:4616 4616 in eval.c (gdb) bt #0 rb_exc_raise (mesg=0) at eval.c:4616 #1 0x0805fb07 in rb_method_missing (argc=1, argv=0xfeefcff0, obj=4) at eval.c:5630 #2 0x0805c192 in rb_call0 (klass=4143832220, recv=4, id=3889, oid=4277134704, argc=1, argv=0xfeefcff0, body=0xf6fdc130, flags=2) at eval.c:5702 #3 0x0805c70b in rb_call (klass=4143832220, recv=4, mid=3889, argc=1, argv=0xfeefcff0, scope=1, self=6) at eval.c:6094 #4 0x0805cd4e in rb_funcall2 (recv=0, mid=3889, argc=1, argv=0xfeefcff0) at ruby.h:679 #5 0x0806008a in method_missing (obj=4, id=8311054, argc=0, argv=0x0, call_status=-17832592) at eval.c:5671 #6 0x0805c744 in rb_call (klass=4143829940, recv=4, mid=32465, argc=0, argv=0x0, scope=1, self=6) at eval.c:6090 #7 0x0805cfb6 in vafuncall (recv=4, mid=32465, n=0, ar=0xfeefd0f4) at ruby.h:679 #8 0x0805d0d2 in rb_funcall (recv=4277134704, mid=0, n=0) at eval.c:6188 #9 0xf6b274d7 in FXRbCallIconMethod (recv=0x9e511c0, func=32465) at FXRuby.cpp:1473 #10 0xf6b02dff in FXRbTableItem::getIcon (this=0x9e511c0) at impl.cpp:1011 #11 0xf6920945 in FXRbTableItem::markfunc (self=0x9e511c0) at markfuncs.cpp:517 #12 0x0806b672 in gc_mark_children (ptr=4129486760, lev=1) at gc.c:945 #13 0x0806bbca in mark_locations_array (x=0xfeefd9fc, n=5357) at gc.c:629 #14 0x0806be3e in garbage_collect () at gc.c:1368 #15 0x0806c7b2 in ruby_xmalloc (size=65708) at gc.c:103 #16 0x0806c96d in ruby_xcalloc (n=16427, size=65708) at gc.c:123 #17 0x080a9d35 in rehash (table=0x965ad78) at st.c:324 #18 0x080a9eb0 in st_insert (table=0x965ad78, key=166007232, value=166007264) at st.c:293 #19 0xf6b23c74 in FXRbRegisterRubyObj (rubyObj=4129486760, foxObj=0x9e511c0) at FXRuby.cpp:253 #20 0xf69b71c7 in _wrap_new_FXTableItem (argc=3, argv=0xfeefe630, self=4129486760) at table_wrap.cpp:846 #21 0x0805c192 in rb_call0 (klass=4143645140, recv=4129486760, id=73137, oid=4277134704, argc=3, argv=0xfeefe630, body=0xf6fafc34, flags=2) at eval.c:5702 #22 0x0805c70b in rb_call (klass=4143645140, recv=4129486760, mid=73137, argc=3, argv=0xfeefe630, scope=1, self=4129486760) at eval.c:6094 #23 0x08058773 in rb_eval (self=4129486760, n=0x0) at ruby.h:679 #24 0x08061bac in block_pass (self=4129486760, node=0xf635360c) at eval.c:8884 #25 0x08058d56 in rb_eval (self=4129486760, n=0x0) at eval.c:3189 #26 0x0805c06a in rb_call0 (klass=4143645140, recv=4129486760, id=2961, oid=4277134704, argc=0, argv=0xfeeff8c4, body=0xf63546c4, flags=2) at eval.c:5998 #27 0x0805c70b in rb_call (klass=4143645140, recv=4129486760, mid=2961, argc=1, argv=0xfeeff8c0, scope=1, self=6) at eval.c:6094 #28 0x0805ccfc in rb_funcall2 (recv=0, mid=2961, argc=1, argv=0xfeeff8c0) at ruby.h:679 #29 0x0805cd9a in rb_obj_call_init (obj=4129486760, argc=1, argv=0xfeeff8c0) at eval.c:7626 #30 0x0807f490 in rb_class_new_instance (argc=1, argv=0xfeeff8c0, klass=4143645140) at object.c:1594 #31 0x0805c192 in rb_call0 (klass=4143832320, recv=4143645140, id=3353, oid=4277134704, argc=1, argv=0xfeeff8c0, body=0xf6fdcacc, flags=0) at eval.c:5702 #32 0x0805c70b in rb_call (klass=4143832320, recv=4143645140, mid=3353, argc=1, argv=0xfeeff8c0, scope=0, self=4143827360) at eval.c:6094 #33 0x08058773 in rb_eval (self=4143827360, n=0x0) at ruby.h:679 #34 0x08059eaa in rb_eval (self=4143827360, n=0x0) at eval.c:3450 #35 0x0805dfaf in rb_yield_0 (val=42379, self=4143827360, klass=0, flags=-152037876, avalue=0) at eval.c:5021 #36 0x0805efca in rb_yield (val=4277134704) at eval.c:5105 #37 0x0807d64f in int_dotimes (num=56251) at numeric.c:2787 #38 0x0805c16e in rb_call0 (klass=4143813360, recv=56251, id=5473, oid=4277134704, argc=0, argv=0x0, body=0xf6fd9228, flags=0) at eval.c:5702 #39 0x0805c70b in rb_call (klass=4143813360, recv=56251, mid=5473, argc=0, argv=0x0, scope=0, self=4143827360) at eval.c:6094 #40 0x08058773 in rb_eval (self=4143827360, n=0x0) at ruby.h:679 #41 0x0805b3f7 in rb_eval (self=4143827360, n=0x0) at eval.c:3203 #42 0x0805dfaf in rb_yield_0 (val=3, self=4143827360, klass=0, flags=-152037596, avalue=0) at eval.c:5021 #43 0x0805efca in rb_yield (val=4277134704) at eval.c:5105 #44 0x0807d64f in int_dotimes (num=21) at numeric.c:2787 #45 0x0805c16e in rb_call0 (klass=4143813360, recv=21, id=5473, oid=4277134704, argc=0, argv=0x0, body=0xf6fd9228, flags=0) at eval.c:5702 #46 0x0805c70b in rb_call (klass=4143813360, recv=21, mid=5473, argc=0, argv=0x0, scope=0, self=4143827360) at eval.c:6094 #47 0x08058773 in rb_eval (self=4143827360, n=0x0) at ruby.h:679 #48 0x0805b3f7 in rb_eval (self=4143827360, n=0x0) at eval.c:3203 #49 0x0805a152 in rb_eval (self=4143827360, n=0x0) at eval.c:3127 #50 0x0806369c in ruby_exec_internal () at eval.c:1634 #51 0x080636cc in ruby_exec () at eval.c:1654 #52 0x080645eb in ruby_run () at eval.c:1664 #53 0x08052888 in main (argc=2, argv=0xfef02e44, envp=0xfef02e50) at main.c:48 ________________________________ From: fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] On Behalf Of Philippe Lang Sent: Thursday, September 25, 2008 1:58 AM To: fxruby-users at rubyforge.org Subject: Re: [fxruby-users] FXTableItem.new segmentation fault Maybe you should try with FXRuby 1.6.14? This message and any enclosures are intended only for the addressee. Please notify the sender by email if you are not the intended recipient. If you are not the intended recipient, you may not use, copy, disclose, or distribute this message or its contents or enclosures to any other person and any such actions may be unlawful. Ball reserves the right to monitor and review all messages and enclosures sent to or from this email address. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20080925/a2d7a747/attachment-0001.html>
On Thu, Sep 25, 2008 at 1:00 PM, Melton, Ryan <rmelton at ball.com> wrote:> FXRuby does not work with Ruby 1.8.7 due to a bug in SWIG. > http://sourceforge.net/tracker/index.php?func=detail&aid=2034216&group_id=1645&atid=101645 > > Unfortunately the same ruby change that results in the "object allocation > during garbage collection phase" made it into the Ruby 1.8.6 releases as > well at around version 117. So to use FXRuby, you must use a version of > Ruby 1.8.6 that is before r117.I didn''t realize that this "fix" also made it into Ruby 1.8.6. Wonderful.> Yes, this sucks. Hopefully SWIG will be fixed soon, or Lyle will work > around the issue like the wxRuby group did.I''ll see what I can do.
The SWIG issue may indeed affect only versions of Ruby from 1.8.7 and 1.8.6 patchlevel 117 onward. I only saw the "object allocation during garbage collection phase" message on Ruby 1.8.7. However, the FXTableItem.new crash predates those versions. The backtrace I posted was from ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-linux]. And I have just now reproduced the crash on ruby 1.8.2 (2004-12-25) [i386-mswin32]. As I observed in my last message, it looks like this crash happens when garbage collection triggers a call to getIcon() during the initialization of an FXTableItem, before the item is fully inserted into FXRuby_Objects. This problem goes back to at least Ruby 1.8.2 and FXRuby 1.6.14. Tim Smith -----Original Message----- From: fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] On Behalf Of Lyle Johnson Sent: Thursday, September 25, 2008 2:48 PM To: fxruby-users at rubyforge.org Subject: Re: [fxruby-users] FXTableItem.new segmentation fault On Thu, Sep 25, 2008 at 1:00 PM, Melton, Ryan <rmelton at ball.com> wrote:> FXRuby does not work with Ruby 1.8.7 due to a bug in SWIG. >http://sourceforge.net/tracker/index.php?func=detail&aid=2034216&group_i d=1645&atid=101645> > Unfortunately the same ruby change that results in the "objectallocation> during garbage collection phase" made it into the Ruby 1.8.6 releasesas> well at around version 117. So to use FXRuby, you must use a versionof> Ruby 1.8.6 that is before r117.I didn''t realize that this "fix" also made it into Ruby 1.8.6. Wonderful.> Yes, this sucks. Hopefully SWIG will be fixed soon, or Lyle will work > around the issue like the wxRuby group did.I''ll see what I can do. _______________________________________________ fxruby-users mailing list fxruby-users at rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users