How to debug #103713?

Enrico Ros eros.kde at email.it
Thu Apr 14 13:47:38 BST 2005


On Wednesday 13 April 2005 22:49, Michael Brade wrote:

> [ ... ] The slot
> KNoteEdit::textSuperScript() is called twice and KAction tells me that the
> button was clicked twice, although I really clicked only once.
>
> To me this seems to be a bug in kdelibs/KAction, but how am I going to
> debug that? Does anyone maybe have an idea already what's going on?

This seems a case in which the backtrace is needed.. simply place a 'backtrace 
call' function at the top of the method called twice and see the classes the 
call has traversed before reaching your slot.

I personally use the console output of kdenonbeta/ktracer (install it):
1) in code:
  #include <ktracer.h>
  void MyClass::slotSomeName()
  {KTRACER_ENTER
       .... other stuff of the class ...
  }
2) compile and install knotes
3) at runtime:
# KTRACER=20 knotes
where 20 is the depth of the trace. Then watch the output (or use ktracer 
itself (experimental program) for full output decoding).

You can also use kdBacktrace() in place of KTRACER_ENTER, but the output is 
less nicer and you cannot adjust trace depth at runtime.

You should be able to debug it now! Ciao,
Enrico
 

 

 --

 Email.it, the professional e-mail, gratis per te: http://www.email.it/f

 

 Sponsor:

 Manuali.net ti REGALA decine di corsi, da Dreamweaver a Photoshop, da WindowsXP ad Office. 

* Non devi far altro che cliccare e... scaricare!

 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2735&d=14-4




More information about the kde-core-devel mailing list