[Kde-bindings] Korundum: Segmentation fault

Richard Dale Richard_Dale at tipitina.demon.co.uk
Thu Apr 21 09:33:56 UTC 2005


On Thursday 21 April 2005 01:57, Arash Abedinzadeh wrote:
> Hi there,
>
> On my machine ruby -r korundum -e 'KDE::CmdLineArgs.init(ARGV, nil);
> KDE::Application.new' gives me:
>
> /usr/lib/ruby/site_ruby/1.8/KDE/korundum.rb:378: [BUG] Segmentation fault
> ruby 1.8.2 (2004-12-25) [i686-linux]
>
> korundum.rb:
>
> 376:    class Application
> 377:        def initialize(*k)
> 378:            super
> 379:            $kapp = self
> 380:        end
>
> I'm using Qt-3.3.4, KDE-3.4.0 (kdebindings-3.4.0), gcc-3.4.3-20050110,
> glibc-2.3.4.20050125, ruby 1.8.2 (2004-12-25) [i686-linux], compiled from
> source (Gentoo Linux).
>
> I also made a backtrace with gdb, but it doesn't seem to be very helpful:
>
> #0  0xb6130378 in KAboutData::appName ()
> from /usr/kde/3.4/lib/libkdecore.so.4
> #1  0xb61d382e in KInstance::KInstance ()
> from /usr/kde/3.4/lib/libkdecore.so.4
> #2  0x00000000 in ?? ()
> #3  0xb62a6d94 in ?? () from /usr/kde/3.4/lib/libkdecore.so.4
> #4  0x00000000 in ?? ()
> #5  0xb62b2188 in KCmdLineArgs::parsed ()
> from /usr/kde/3.4/lib/libkdecore.so.4
> #6  0x081a3108 in ?? ()
> #7  0xb7ff5aa0 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
> #8  0xb6203f2a in KApplication::KApplication ()
> from /usr/kde/3.4/lib/libkdecore.so.4
> #9  0xb7ff5b71 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
> #10 0xb7ff5aa0 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
> #11 0xb7425e6a in xcall_KApplication ()
> from /usr/kde/3.4/lib/libsmokekde.so.1
>
> Is there anything else I can do?
You need to pass a KDE::AboutData instance to KDE::CmdLineArgs.init:

ruby -r korundum -e 'KDE::CmdLineArgs.init(ARGV, KDE::AboutData.new("myapp", 
"My App", "0.1")); KDE::Application.new'

I tried it in C++ and that seg faulted too with a zero KAboutData arg, so 
there isn't much the bindings can do about that..

-- Richard



More information about the Kde-bindings mailing list