[Kde-bindings] Segfault after traceback
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Sun Oct 10 19:48:53 UTC 2004
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?}"
It prints:
focusin 4 PalgaEdit Qt::Widget V:false
I think it's seg faulted in this case because you're catching the
method_missing() exception, and carrying on anyway. It doesn't seg fault
after the above fix.
-- Richard
More information about the Kde-bindings
mailing list