Using up to date Sidux. Seems to occur when unattended and screen has locked, Functions normal when computer in use. Thanks.
Application: Back In Time (backintime.py), signal: Segmentation fault
[KCrash Handler]
#5 0x00007f201fdc2404 in QWidget::metric(QPaintDevice::PaintDeviceMetric) const () from /usr/lib/libQtGui.so.4
#6 0x00007f201ff0ea4a in QFont::QFont(QFont const&, QPaintDevice*) () from /usr/lib/libQtGui.so.4
#7 0x00007f201fd84654 in QWidgetPrivate::updateFont(QFont const&) () from /usr/lib/libQtGui.so.4
#8 0x00007f201fd8458c in QWidgetPrivate::resolveFont() () from /usr/lib/libQtGui.so.4
#9 0x00007f201fd8f3ea in QWidget::setParent(QWidget*, QFlags<Qt::WindowType>) () from /usr/lib/libQtGui.so.4
#10 0x00007f201fd8f712 in QWidget::setParent(QWidget*) () from /usr/lib/libQtGui.so.4
#11 0x00007f201fd94dc6 in QWidgetAction::releaseWidget(QWidget*) () from /usr/lib/libQtGui.so.4
#12 0x00007f2020132c9f in QMenu::~QMenu() () from /usr/lib/libQtGui.so.4
#13 0x00007f201cb750bb in KMenu::~KMenu() () from /usr/lib/libkdeui.so.5
#14 0x00007f201cb22e0e in KSystemTrayIcon::~KSystemTrayIcon() () from /usr/lib/libkdeui.so.5
#15 0x00007f201d2730ee in sipKSystemTrayIcon::~sipKSystemTrayIcon() () from /usr/lib/pymodules/python2.5/PyKDE4/kdeui.so
#16 0x00007f201d25223d in ?? () from /usr/lib/pymodules/python2.5/PyKDE4/kdeui.so
#17 0x00007f2022addf79 in ?? () from /usr/lib/pymodules/python2.5/sip.so
#18 0x000000000045e0d5 in ?? ()
#19 0x0000000000445b33 in ?? ()
#20 0x000000000045e15c in ?? ()
#21 0x0000000000445b33 in ?? ()
#22 0x000000000042249c in ?? ()
#23 0x00000000004387c2 in ?? ()
#24 0x0000000000445b33 in ?? ()
#25 0x000000000042249c in ?? ()
#26 0x00000000004458cb in PyDict_Clear ()
#27 0x0000000000445909 in ?? ()
#28 0x00000000004ba3de in ?? ()
#29 0x00000000004baab4 in PyGC_Collect ()
#30 0x00000000004aeed1 in Py_Finalize ()
#31 0x00000000004ae94e in ?? ()
#32 0x00000000004aeb4d in PyErr_PrintEx ()
#33 0x00000000004af85b in PyRun_SimpleFileExFlags ()
#34 0x0000000000414572 in Py_Main ()
#35 0x00007f202619e5c6 in __libc_start_main () from /lib/libc.so.6
#36 0x00000000004139d9 in _start ()
Now, I have no idea if the following applies, but the explanation seems to fit: that when the display is active, backintime-kde works fine, however, when the display is not, it fails with no backup, and the systray icon remains frozen in place. Also, when the systray icon is frozen, a mouseover message as follows: "Compare with snapshot 2009-10-05 19:00 :01 (rsync: >F+++++ +++++++ ++++++ etx/X11/ Xwrapper. config) ".
My skill level is such that I have no idea if the above or below information is useful in detecting the Segmentation Fault problem originally posted or if it is related, however, hope it of assistance if anyone else has this problem. Should also point out that if I install backintime-gnome on the kde system, no systray icon ever appears, and subsequently, backintime does not experience any issues, and is the solution I use at this time.
The following is quoted from the le-web.org site: http:// www.le- web.org/ 2008/11/ 06/pygtk- how-to- display- a-systray- icon-from- a-cronjob/.
PyGTK: How to display a systray icon from a cronjob
It is nice to give some user feedback when someting happen in a background application. For example when a cronjob is running it would be nice to show a systray icon.
When the cron-job runs the DISPLAY environment variable is not defined so your gtk application can’t access to xserver. So before importing pygtk you should check if DISPLAY is defined. If not just define it to default value “:0.0″.
import os
#if DISPLAY is not set, then set it to default ':0.0'
if len( os.getenv( 'DISPLAY', '' ) ) == 0:
os.putenv( 'DISPLAY', ':0.0' )
import pygtk "2.0")
pygtk.require(
But what happens if your gtk application really can’t connect to the xserver (xserver is not runnig, you are not logged in …). In this case your application should not try to use xserver related functions. For example when I try to use gtk.StatusIcon the application ends with a segmentation fault.
To check if your application can access to xserver just get the default display. If it is None then you can’t access it.
display = gtk.gdk. display_ get_default( )
if not display is None:
...
Now, putting all together I made this simple application: notify.py.
import os
#if DISPLAY is not set, then set it to default ':0.0'
if len( os.getenv( 'DISPLAY', '' ) ) == 0:
os.putenv( 'DISPLAY', ':0.0' )
import pygtk "2.0")
pygtk.require(
import gtk
import threading
import time
#GTK main loop thread threading. Thread) :
class GTKMainThread(
def run(self):
gtk.main()
#get default display. None means it can't connect to xserver display_ get_default( )
display = gtk.gdk.
statusIcon = None
#if the display is not None show status icon threads_ init() ).start( )
if not display is None:
#start a gtk loop in another thread
gtk.gdk.
GTKMainThread(
try: set_from_ stock( gtk.STOCK_INFO ) set_visible( True ) set_tooltip( _("Back In Time: take snapshot ..."))
statusIcon = gtk.StatusIcon()
statusIcon.
statusIcon.
statusIcon.
except:
pass
#do something here
print "Begin"
time.sleep( 5 ) #wait 5 seconds
print "End"
#hide status icon set_visible( False )
if not statusIcon is None:
statusIcon.
#quit GTK main look
if not display is None:
gtk.main...