[Kde-bindings] members of class KDE::File missing from korundum4

Arno Rehn arno at arnorehn.de
Sat Jan 30 15:42:34 UTC 2010


On Saturday 30 January 2010 11:58:04 Stefano Crocco wrote:
> In the latest svn revision of smoke/kdebindings from 4.4 branch, the
> KDE::File class doesn't contain enumerators like KFile::Mode and similar.
> The reason seems to be that the KFile class is not included in the
> classList element of smoke/kio/smokeconfig.xml. Inserting it in the list
> made the enumerators work correctly.
> 
> By the way, looking into this issue, I found out two other things:
> 
> 1) calling the constants method on many classes causes a crash. For
> example:
> 
> require 'korundum4'
> 
> puts KDE::Application.constants
> 
> This is the backtrace
> 
> Application: Ruber (ruby19), signal: Segmentation fault
> [Current thread is 1 (Thread 0xb74acb20 (LWP 23545))]
> 
> Thread 2 (Thread 0xb76a0b70 (LWP 23546)):
> #0  0xb7821424 in __kernel_vsyscall ()
> #1  0xb76666d2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from
> /lib/libpthread.so.0
> #2  0xb77c2c67 in native_cond_timedwait (dummy=0x0) at thread_pthread.c:122
> #3  thread_timer (dummy=0x0) at thread_pthread.c:753
> #4  0xb7662670 in start_thread () from /lib/libpthread.so.0
> #5  0xb757e49e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
> 
> Thread 1 (Thread 0xb74acb20 (LWP 23545)):
> [KCrash Handler]
> #6  0xb624436c in findAllMethodNames (result=135429588, classid=135429476,
> flags_value=33)
>     at
> /var/tmp/paludis/kde-base-kdebindings-ruby-4.4.9999/work/kdebindings-
> ruby-4.4.9999/ruby19/qtruby/src/Qt.cpp:706
> #7  0xb77aea88 in call_cfunc (func=0xb6243bff <findAllMethodNames(unsigned
> long, unsigned long, unsigned long, unsigned long)>, recv=137727828,
> len=6875, argc=3, argv=0xa) at vm_insnhelper.c:298
> #8  0xb77aed78 in vm_call_cfunc (th=0x804bad0, reg_cfp=0xb72bbe88, num=3,
> id=12136, oid=12136, recv=137727828, klass=137725784, flag=0, mn=0x8357744,
> blockptr=0x0) at vm_insnhelper.c:384
> #9  0xb77b3d63 in vm_call_method (th=0x804bad0, cfp=0xb72bbe88, num=3,
> blockptr=0x0, flag=0, id=12136, mn=0x8357728, recv=137727828) at
> vm_insnhelper.c:517
> #10 0xb77b6c83 in vm_exec_core (th=0x804bad0, initial=<value optimized
> out>) at insns.def:999
> #11 0xb77bb116 in vm_exec (th=0x804bad0) at vm.c:1079
> #12 0xb77bb7e3 in invoke_block_from_c (th=0x804bad0, block=0xb72bbf2c,
> self=138397672, argc=1, argv=0xbfc333b0, blockptr=0x0, cref=0x0) at
> vm.c:524 #13 0xb77bc605 in vm_yield (val=135429476) at vm.c:554
> #14 rb_yield_0 (val=135429476) at vm_eval.c:505
> #15 rb_yield (val=135429476) at vm_eval.c:515
> #16 0xb76c1669 in rb_ary_each (ary=135429560) at array.c:1351
> #17 0xb77aeaba in call_cfunc (func=0xb76c161b <rb_ary_each>,
> recv=135429560, len=6875, argc=0, argv=0xa) at vm_insnhelper.c:289
> #18 0xb77aed78 in vm_call_cfunc (th=0x804bad0, reg_cfp=0xb72bbf18, num=0,
> id=424, oid=424, recv=135429560, klass=134732864, flag=0, mn=0x807d284,
> blockptr=0xb72bbf2c) at vm_insnhelper.c:384
> #19 0xb77b3d63 in vm_call_method (th=0x804bad0, cfp=0xb72bbf18, num=0,
> blockptr=0xb72bbf2c, flag=0, id=424, mn=0x807d268, recv=135429560) at
> vm_insnhelper.c:517
> #20 0xb77b6c83 in vm_exec_core (th=0x804bad0, initial=<value optimized
> out>) at insns.def:999
> #21 0xb77bb116 in vm_exec (th=0x804bad0) at vm.c:1079
> #22 0xb77bb26a in rb_iseq_eval_main (iseqval=135654596) at vm.c:1290
> #23 0xb76e7969 in ruby_exec_node (n=0x815ecc4, file=0x0) at eval.c:206
> #24 0xb76e8e96 in ruby_run_node (n=0x815ecc4) at eval.c:234
> #25 0x0804884e in main (argc=4, argv=0xbfc33ef4) at main.c:35
> 
> It doesn't happen for all classes, however. For example,
> Qt::Point.constants correctly returns an empty array. I'm not entierely
> sure, but I think the crash happens only with classes derived from
> Qt::Object. Of the classes I tried, KDE::File, KDE::Url, Qt::Object and
> Qt::Point worked, while KDE::Application, KDE::MainWindow, KDE::Action,
> Qt::Widget and Qt::MainWindow crashed.
> 
> 2) still related to the constants method. This may not be an issue at all,
> but I thought it strange enough to report it. KDE::File.constants and
> KDE::Url.constants both contained a set of constants which seem unrelated
> to the classes themselves. For example, KDE::File.constants returns:
> 
> [:File, "ApplicationWindowIconChange", "Australia", "Austria",
> "AutoDither", "CaymanIslands", "CentralAfricanRepublic", "CheckStateRole",
> "ClickFocus", "Clipboard", "ForwardedChannels", "GraphicsSceneHoverEnter",
> "GroupSeparator", "Honduras", "ImhDialableCharactersOnly",
> "ImhDigitsOnly", "InvalidSize", "ItemIsDropEnabled", "ItemIsSelectable",
> "Key_Ampersand"]
> 
> Unless I'm missing something, according to the KDE API documentation, those
> constants don't belong to class KFile.
Ok, these two things should be fixed in trunk and branch 4.4 now :) Thanks for 
the report!

-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list