[fxruby-users] FXTableItem.new segmentation fault

Philippe Lang philippe.lang at attiksystem.ch
Thu Sep 25 01:57:48 EDT 2008


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>


More information about the fxruby-users mailing list