[Kde-bindings] Segfault after traceback

Richard Dale Richard_Dale at tipitina.demon.co.uk
Sun Oct 10 20:36:04 UTC 2004


On Sunday 10 October 2004 21:16, Han Holl wrote:
> On Sunday 10 October 2004 21:48, Richard Dale wrote:
> > On Sunday 10 October 2004 19:39, Han Holl wrote:
> > > Hi Richard,
> > >
> > > I've tried to create a simpler example, but it didn't work.
> > > Unpack this archive, run gotocelldialog.rb, and click on any field.
> > > You get (at least I get):
> > > ./palgaedit.rb:43:in `method_missing': undefined method `visible' for
> > > #<PalgaEdit:0x431c21d0> (NoMethodError)
> > >         from ./palgaedit.rb:43:in `focusInEvent'
> > >         from gotocelldialog.rb:151:in `method_missing'
> > >         from gotocelldialog.rb:151
> > > ./palgaedit.rb:70: [BUG] Segmentation fault
> > > ruby 1.8.1 (2004-03-08) [i686-linux-gnu]
> > >
> > > Aborted
> > >
> > > I used Qt::Widget#visible instead of isVisible.
> > > It might be an idea to translate ruby functions like
> > > visible?  to isVisible ? Looks more rubyish.
> >
> > QtRuby already does, but setVisible() is the same as 'visible?', not
> > 'visible'. It should be this:
> >
> >     STDERR.puts "focusin #{@rubid} #{self.class} #{self.parent.class}
> > V:#{self.visible?}"
>
> Ah, I had missed the visible? translation to isVisible, but I knew that
> calling visible was an error, and I'm not aware that I'm catching an
> exception and carry on anyway. There are only three rescues in my code, and
> each and everyone does a raise after giving some extra information:
...
Hmm, not that then.
>
> Also the address of the segmentation fault is phony.
(gdb) where
#0  0x0ff35df4 in jump_tag_but_local_jump (state=6) at eval.c:1628
#1  0x0ff35d78 in jump_tag_but_local_jump (state=2147477968) at eval.c:1602
#2  0x0ff4034c in rb_call (klass=0, recv=21441, mid=2147477968, argc=1, 
argv=0x101ab958, scope=2147478032)
    at eval.c:5287
#3  0x0ff408c0 in rb_funcall2 (recv=0, mid=268294792, argc=268294932, 
argv=0xffdda34) at ruby.h:631
#4  0x0fc6be08 in QtRubySmokeBinding::callMethod(short, void*, 
Smoke::StackItem*, bool) ()
   from /usr/lib/ruby/site_ruby/1.8/powerpc-linux/qtruby.so
#5  0x0fa3316c in x_QLineEdit::focusOutEvent(QFocusEvent*) () 
from /opt/kde3/lib/libsmokeqt.so.1
#6  0x0f175bac in QWidget::event(QEvent*) (this=0x10474280, e=0x7ffff130) at 
kernel/qwidget.cpp:4761
#7  0x0f2331d0 in QLineEdit::event(QEvent*) (this=0x10474280, e=0x7ffff130) at 
widgets/qlineedit.cpp:1409
#8  0x0fa32f20 in x_QLineEdit::event(QEvent*) () 
from /opt/kde3/lib/libsmokeqt.so.1

It crashes in the focusOutEvent event handler. So I'm not sure why it doesn't 
exit cleanly after the method_missing() - it probably isn't possible to do 
much about it though..

-- Richard



More information about the Kde-bindings mailing list