| Summary: | Porthole 0.5.0 segfaults when run as root | ||
|---|---|---|---|
| Product: | Portage Development | Reporter: | Greg Toombs <greg.toombs> |
| Component: | Third-Party Tools | Assignee: | Portage Tools Team <tools-portage> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | gentoo, gentoo |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Greg Toombs
2007-10-11 05:19:17 UTC
I also am experiencing a runtime failure with porthole when run as root. When run as non-root, the application executes OK, with only the following error output:
/usr/bin/porthole:62: GtkDeprecationWarning: gtk.threads_init is deprecated, use gtk.gdk.threads_init instead
gtk.threads_init()
/usr/lib/python2.5/site-packages/porthole/utils.py:31: DeprecationWarning: The sre module is deprecated, please import re.
import sre
However, when run as root, a longer stream of errors is output, and the applicatoin exits right away (without displaying the GUI, even):
/usr/bin/porthole:62: GtkDeprecationWarning: gtk.threads_init is deprecated, use gtk.gdk.threads_init instead
gtk.threads_init()
/usr/lib/python2.5/site-packages/porthole/utils.py:31: DeprecationWarning: The sre module is deprecated, please import re.
import sre
Traceback (most recent call last):
File "/usr/bin/porthole", line 184, in <module>
prefs = _utils.PortholePreferences(prefs_additions)
File "/usr/lib/python2.5/site-packages/porthole/utils.py", line 241, in __init__
dom = XMLManager(self.__PFILE)
File "/usr/lib/python2.5/site-packages/porthole/xmlmgr.py", line 111, in __init__
self.__dom = parse(source)
File "/usr/lib/python2.5/site-packages/_xmlplus/dom/minidom.py", line 1915, in parse
return expatbuilder.parse(file)
File "/usr/lib/python2.5/site-packages/_xmlplus/dom/expatbuilder.py", line 926, in parse
result = builder.parseFile(fp)
File "/usr/lib/python2.5/site-packages/_xmlplus/dom/expatbuilder.py", line 211, in parseFile
parser.Parse("", True)
xml.parsers.expat.ExpatError: no element found: line 1, column 0
Exception exceptions.AttributeError: "XMLManager instance has no attribute '_XMLManager__dom'" in <bound method XMLManager.__del__ of <porthole.xmlmgr.XMLManager instance at 0x864d10c>> ignored
If you need a stacktrace, it will take me until the end of next week to get back to that, due to other commitments (sorry).
From the output of gksudo porthole, I now get /usr/bin/porthole:62: GtkDeprecationWarning: gtk.threads_init is deprecated, use gtk.gdk.threads_init instead gtk.threads_init() /usr/lib/python2.5/site-packages/porthole/utils.py:31: DeprecationWarning: The sre module is deprecated, please import re. import sre and it doesn't start. Sorry, It has taken so long to find this bug on porthole. I have been very busy and never thought to check bugzilla. The only thing I can think of for all these is that a user recently had the problem that it would not run as root but was OK as a user. It turned out that it was a corrupted ./porthole/prefs.xml file. When he deleted it operation returned to normal. For the original poster: For whatever reason, it seems to have failed reading the glade file. It is possible that your /root/.porthole/prefs.xml file is corrupted, so it did not get a correct file name. Try renaming or deleting it. It may also affect any newer versions of porthole. For comment #1: this line in your output: xml.parsers.expat.ExpatError: no element found: line 1, column 0 indicates that your /root/.porthole/prefs.xml file is corrupted for sure. Deleting it will restore operation. For comment #2: There is not enough output there to determine any cause. Please run it from a terminal with the -d flag to turn on debug printing. Also if it runs as your user without gksudo, then it is likely that your prefs.xml file is also corrupted. The latest release of porthole version-0.6.0_rc5 has code changes to allow it to continue booting with a corrupted prefs.xml file. It will instead boot with the default options. Also porthole-0.5.0 will also be very soon getting out of date with changes to portage. porthole-0.5.0 has been removed from tree, please upgrade to >=porthole-0.6.0. |