[Kde-bindings] [Korundum] Crash KDE::Application.new

Richard Dale Richard_Dale at tipitina.demon.co.uk
Mon Jun 7 11:47:46 UTC 2004


On Monday 07 June 2004 12:06, Alex Martin Ugalde wrote:
> Hi folks,
>
> 	I'm experiencing segfaults, with the following ruby script:
>
> ----------8<-------------8<--------------
> #!/usr/bin/ruby
>
> require 'Korundum'
>
> about = KDE::AboutData.new("knotifywidgetbase", "KNotifyWidgetBase", "0.1")
> KDE::CmdLineArgs.init(ARGV, about)
> a = KDE::Application.new
> ----------8<-------------8<--------------
>
> a) Execution from ruby:
> $ ruby bomb.rb
> /usr/lib/ruby/site_ruby/1.8/Qt/qtruby.rb:220: [BUG] Segmentation fault
> ruby 1.8.1 (2003-12-25) [i686-linux]
>
> Aborted
>
> b) Execution from irb:
> $ irb bomb.rb
> bomb.rb(main):001:0> #!/usr/bin/ruby
> bomb.rb(main):002:0*
> bomb.rb(main):003:0* require 'Korundum'
> => true
> bomb.rb(main):004:0>
> bomb.rb(main):005:0* about = KDE::AboutData.new("knotifywidgetbase",
> "KNotifyWidgetBase", "0.1") => #<KDE::AboutData:0x42d411d0>
> bomb.rb(main):006:0> KDE::CmdLineArgs.init(ARGV, about)
> => nil
> bomb.rb(main):007:0> a = KDE::Application.new
> KCrash: crashing... crashRecursionCounter = 2
> KCrash: Application Name = bomb.rb path = <unknown> pid = 23383
>
>
> Ruby script /usr/lib/ruby/site_ruby/1.8/Qt/qtruby.rb:
>       def try_initialize(instance, *args)
>          initializer = instance.method(:initialize)
>          return callcc {
>
>                                 |continuation|
>
>             @@current_initializer = continuation
>             initializer.call(*args)          <------------ Line 220
>          }
>       end
>
> Any ideas?
Is this another symptom of the pthreads initialise bug that krubyinit is 
designed to work round. Normally, if you have the problem you either get a 
crash (or the app hangs) when just loading the Korundum extension - it 
doesn't get as far as trying to create a KDE::Application. Can you attach 
with gdb to the process to get a better idea of what is crashing?

You may need to add a 'sleep 60' call to the ruby script to give enough time, 
and then:

$ gdb attach <qtruby app process id>

Then 'cont' at the gdb prompt, followed by 'where' to look at the stack after 
the crash.

Could you try building krubyinit and run the example under that, to see if it 
still crashes?

-- Richard



More information about the Kde-bindings mailing list