How to debug whilst logging off

I'm developing a Gnome Applet in python, and somewhere along the line
I've tickled a bug somewhere that's causing crashes.  Not regular
crashes, but crashes only when I log out of Gnome.  Something, somewhere
along the line is broken - but it's hard to debug because I can only
trigger it by logging out.  Adding applet instances, removing them,
moving them around, playing with the UI doesn't cause crashes - only
logging out.  Yes, it's weird.

The actual crash is that I get a message box that says something like
"The program 'deskbar-applet' has stopped unexpectedly" or something
like that - I can't remember the exact wording off the top of my head.
And sometimes (but not always!) it brings up two boxes - one with the
above message and another similar one with "multi-load applet" in place
of "deskbar-applet".  (Deskbar-applet is the one I'm developing, Multi-
Load is just another applet that happens to hang out on my panel).

Now, I can predictably and repeatedly trigger the bug.  But if, at a
certain place in the code (a constructor), I add the following:
# wait for 0.1 seconds
import time
time_to_wait_until = time.time() + 0.1
while time.time() < time_to_wait_until:
then there are no crashes.  So, even weirder, something out there is
time-dependent or not properly multi-threaded or something.

Anyway, after having said all that, what I would like to know is:

1) Does this look familiar to anyone?  Any suggestions on what's going


2) Any suggestions on how to debug an applet bug which I can only tickle
by logging off?  How can I get some sort of stack trace or log or
anything useful?  Right now I'm just guessing, coding, and hoping.


FWIW, I am running Fedora Core 3, and the versions of relevant (I think)
packages are:

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]