[Kde-bindings] KUniqueApllication segfault

Richard Dale Richard_Dale at tipitina.demon.co.uk
Wed Feb 8 18:07:12 UTC 2006


On Sunday 05 February 2006 22:32, Han Holl wrote:
> Hello:
>
> Call this ttt.rb:
> #!/usr/bin/ruby -w
> require 'Korundum'
>
> class KdeWallPaper < (ENV['U'] ? KDE::UniqueApplication : KDE::Application)
>   def initialize
>     @aboutdata = KDE::AboutData.new("kdepaper", "", '', '', 0)
>     KDE::CmdLineArgs.init(@aboutdata)
>     super()
>     background = Qt::Widget.new()
>     setMainWidget(background)
>     background.show
>   end
> end
> #Qt.debug_level = Qt::DebugLevel::High
> app = KdeWallPaper.new
> app.exec
> ## end of ttt.rb
>
> If I do ttt.tb I get an empty widget I can close.
>
> If I do U=1 ttt.rb  I get:
> /usr/lib/site_ruby/1.8/KDE/korundum.rb:403: [BUG] Segmentation fault
> ruby 1.8.4 (2005-12-24) [i386-linux]
>
> FC4, kdebindings 3.5.0 from kde-redhat.org with 2 patches (1 for a
> constructor problem with newer rubies I got from Caleb Tennis, and the one
> to include KWin).
> (I also tried kdebindings 3.5.1 with the same result).
>
> I would really like to have an unique application, because it's much easier
> to locate with dcop.
It seems to be a bug in KDE::CmdLineArgs.init(), you need to call it with an 
ARGV argument.

        KDE::CmdLineArgs.init(ARGV, @aboutdata)

-- Richard



More information about the Kde-bindings mailing list