[Kde-bindings] installing an event filter on a widget causes a crash with latest revision of smoke and korundum from 4.4 branch

Stefano Crocco stefano.crocco at alice.it
Sun Jan 31 16:39:15 UTC 2010


Using the latest revision of smoke and korundum from the 4.4 branch, I get a
crash when I try to use an event filter with a widget. This can be seen with
the following code:

require 'Qt4'

class Filter < Qt::Object
  def eventFilter o, e
    false
  end
end

class MyWidget < Qt::Widget
  
  def initialize
    super
    @filter = Filter.new self
    install_event_filter @filter
  end
  
  def eventFilter o, e
    false
  end
  
end

a = Qt::Application.new []
w = MyWidget.new
w.show
a.exec

The crash happens both if I use @filter or self as filter. Using an old smoke
version the crash doesn't happen.

The backtrace is this:

-- control frame ----------
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC  :method_missing
c:0003 p:0099 s:0008 b:0008 l:001274 d:00177c EVAL   /home/stefano/documenti/scripts/prova.rb:25
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:001274 d:001274 TOP
---------------------------
-- Ruby level backtrace information-----------------------------------------
/home/stefano/documenti/scripts/prova.rb:25:in `method_missing'
/home/stefano/documenti/scripts/prova.rb:25:in `<main>'

-- C level backtrace information -------------------------------------------
0xb76f691d /usr/lib/libruby19.so.1.9(rb_vm_bugreport+0x65) [0xb76f691d]
0xb761ac1b /usr/lib/libruby19.so.1.9(+0x44c1b) [0xb761ac1b]
0xb761acab /usr/lib/libruby19.so.1.9(rb_bug+0x34) [0xb761acab]
0xb769f239 /usr/lib/libruby19.so.1.9(+0xc9239) [0xb769f239]
0xb775640c [0xb775640c]
0xb60265e4 /usr/lib/libqtruby4shared19.so.2(_Z20resolve_classname_qtP16smokeruby_object+0x3c3) [0xb60265e4]
0xb5ff950c /usr/lib/libqtruby4shared19.so.2(_Z17resolve_classnameP16smokeruby_object+0x3d1) [0xb5ff950c]
0xb6026085 /usr/lib/libqtruby4shared19.so.2(+0x3e085) [0xb6026085]
0xb602f641 /usr/lib/libqtruby4shared19.so.2(_ZN6QtRuby14MethodCallBase4nextEv+0x75) [0xb602f641]
0xb5ff6209 /usr/lib/libqtruby4shared19.so.2(_ZN6QtRuby7Binding10callMethodEsPvPN5Smoke9StackItemEb+0x12b) [0xb5ff6209]
0xb64e843d /usr/lib/libsmokeqtcore.so.3(+0x6d43d) [0xb64e843d]
0xb703f7e7 /usr/lib/qt4/libQtCore.so.4(_ZN23QCoreApplicationPrivate29sendThroughObjectEventFiltersEP7QObjectP6QEvent+0x8f) [0xb703f7e7]
0xb67fadcd /usr/lib/qt4/libQtGui.so.4(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0x7f) [0xb67fadcd]
0xb68034d6 /usr/lib/qt4/libQtGui.so.4(_ZN12QApplication6notifyEP7QObjectP6QEvent+0x202) [0xb68034d6]
0xb6285b38 /usr/lib/libsmokeqtgui.so.3(+0x10db38) [0xb6285b38]
0xb7040390 /usr/lib/qt4/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x70) [0xb7040390]
0xb6849a04 /usr/lib/qt4/libQtGui.so.4(_ZN14QWidgetPrivate30sendPendingMoveAndResizeEventsEbb+0x1e2) [0xb6849a04]
0xb684f5a5 /usr/lib/qt4/libQtGui.so.4(_ZN14QWidgetPrivate11show_helperEv+0x39) [0xb684f5a5]
0xb684fc1f /usr/lib/qt4/libQtGui.so.4(_ZN7QWidget10setVisibleEb+0x1c5) [0xb684fc1f]
0xb63b9aa2 /usr/lib/libsmokeqtgui.so.3(+0x241aa2) [0xb63b9aa2]
0xb63a1b0e /usr/lib/libsmokeqtgui.so.3(+0x229b0e) [0xb63a1b0e]
0xb603174a /usr/lib/libqtruby4shared19.so.2(+0x4974a) [0xb603174a]
0xb602f5fd /usr/lib/libqtruby4shared19.so.2(_ZN6QtRuby14MethodCallBase4nextEv+0x31) [0xb602f5fd]
0xb5ff81f7 /usr/lib/libqtruby4shared19.so.2(_Z14method_missingiPmm+0x445) [0xb5ff81f7]
0xb76e3ad5 /usr/lib/libruby19.so.1.9(+0x10dad5) [0xb76e3ad5]
0xb76e5d0d /usr/lib/libruby19.so.1.9(+0x10fd0d) [0xb76e5d0d]
0xb76e8a49 /usr/lib/libruby19.so.1.9(rb_funcall2+0x69) [0xb76e8a49]
0xb76e8b1f /usr/lib/libruby19.so.1.9(+0x112b1f) [0xb76e8b1f]
0xb76e8e8d /usr/lib/libruby19.so.1.9(+0x112e8d) [0xb76e8e8d]
0xb76ebc83 /usr/lib/libruby19.so.1.9(+0x115c83) [0xb76ebc83]
0xb76f0116 /usr/lib/libruby19.so.1.9(+0x11a116) [0xb76f0116]
0xb76f026a /usr/lib/libruby19.so.1.9(rb_iseq_eval_main+0xab) [0xb76f026a]
0xb761c969 /usr/lib/libruby19.so.1.9(ruby_exec_node+0xb5) [0xb761c969]
0xb761de96 /usr/lib/libruby19.so.1.9(ruby_run_node+0x52) [0xb761de96]
0x804884e ruby(main+0x6e) [0x804884e]
0xb73f8bb5 /lib/libc.so.6(__libc_start_main+0xe5) [0xb73f8bb5]
0x8048741 ruby() [0x8048741]

Thanks for the attention

Stefano



More information about the Kde-bindings mailing list