[Kde-bindings] QtRuby virtual method callbacks

Germain Garand germain at ebooksfrance.org
Thu Jul 17 00:10:23 UTC 2003


Le Mardi 15 Juillet 2003 18:57, Richard Dale a écrit :
> I've got QtRuby virtual method callbacks working, like paintEvent() in the
> example below. But I've hit a snag with calling the C++ super method from
> ruby, which is why 'super' has been commented out.

By Heisenberg's ashes!
Holidays are a great occasion to experience how things happen only when you 
don't observe them :-)
Well done Richard!!
The ruby code is amazingly clear when compared to its perl counterpart...

Now, I must confess that I failed to run the actual examples, though the 
extension compiled flawlessly (following your directions). 
No matter how I compile it, it keeps segfaulting that way:

[Switching to Thread 16384 (LWP 12247)]
0x40ed0d55 in __pthread_unlock () from /lib/i686/libpthread.so.0
(gdb) bt
#0  0x40ed0d55 in __pthread_unlock () from /lib/i686/libpthread.so.0
#1  0x40ecde85 in pthread_mutex_unlock () from /lib/i686/libpthread.so.0
#2  0x401830e9 in _dl_open () from /lib/i686/libc.so.6
#3  0x40024f21 in dlopen () from /lib/libdl.so.2
#4  0x4000a828 in _dl_catch_error (objname=0x40026f60, errstring=0x40026f64,
    operate=0x40024ef0 <dlopen+80>, args=0xbfffd720) at dl-error.c:162
#5  0x40025294 in dlerror () from /lib/libdl.so.2
#6  0x40024ed3 in dlopen () from /lib/libdl.so.2
#7  0x080ba737 in dln_load ()
#8  0x0805d0d6 in rb_f_require ()
#9  0x0805a292 in rb_stack_check ()
#10 0x0805a986 in rb_stack_check ()
#11 0x0805b1f1 in rb_stack_check ()
#12 0x08055de1 in rb_alias ()
#13 0x080543de in rb_alias ()
#14 0x08052696 in ruby_run ()
#15 0x08050ac5 in main ()
#16 0x4008b7f7 in __libc_start_main () from /lib/i686/libc.so.6

That is with ruby 1.6.8, Qt-3.1.1 (stock Mandrake 9.1)/ Qt-3.1.2 (old qt-copy)

I tried compiling with  -DQT_THREAD_SUPPORT  -D_REENTRANT
to no avail :-/

Germain




More information about the Kde-bindings mailing list