Bug 555569

Summary: system-config-printer fails to start
Product: [openSUSE] openSUSE 11.2 Reporter: Bernhard Wiedemann <novellbmw>
Component: GNOMEAssignee: E-mail List <gnome-bugs>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P3 - Medium CC: holgi, jsmeix, meissner, vuntz
Version: Final   
Target Milestone: ---   
Hardware: i686   
OS: openSUSE 11.2   
Whiteboard: maint:released:11.2:29903
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Bernhard Wiedemann 2009-11-14 10:35:35 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.4) Gecko/20091016 SUSE/3.5.4-1.1.2 Firefox/3.5.4

when calling system-config-printer it only outputs a backtrace (see below)

Reproducible: Always

Steps to Reproduce:
1. have fresh install from KDE4-LiveCD
2. sudo zypper in system-config-printer
3. system-config-printer
Actual Results:  
Traceback (most recent call last):
  File "/usr/share/system-config-printer/system-config-printer.py", line 6846, in <module>
    focus_on_map)
  File "/usr/share/system-config-printer/system-config-printer.py", line 6794, in main
    print_test_page, focus_on_map)
  File "/usr/share/system-config-printer/system-config-printer.py", line 822, in __init__
    self.populateList()
  File "/usr/share/system-config-printer/system-config-printer.py", line 1472, in populateList
    default_emblem = theme.load_icon (def_emblem, w/2, 0)
glib.GError: Icon 'emblem-default' not present in theme


Expected Results:  
should start and show printers as it did on some install from gnome liveCD

maybe related to bug 546013 

installing gnome-themes did not help.
Comment 1 Bernhard Wiedemann 2009-11-21 20:20:30 UTC
found that it works without printers or only local printers, so

Steps to Reproduce:
2.5:
echo ServerName 192.168.11.92 > /etc/cups/client.conf
(with the IP being reachable and having a cupsd+printer configured)


Then I diffed the strace -f output from a working Gnome-install and a non-working KDE4-install and the last lines before the error look thus:

 stat64("/usr/share/icons/hicolor/index.theme", {st_mode=S_IFREG|0644, st_size=27759, ...}) = 0
-open("/usr/share/system-config-printer/icons/i-network-printer.png", O_RDONLY|O_LARGEFILE) = 14
-fstat64(14, {st_mode=S_IFREG|0644, st_size=1762, ...}) = 0
-mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7397000
-read(14, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0000\0\0\0000\10\6\0\0\0W\2\371"..., 4096) = 1762
-read(14, "", 4096)                = 0
-_llseek(14, 0, [0], SEEK_SET)     = 0
-read(14, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0000\0\0\0000\10\6\0\0\0W\2\371"..., 4096) = 1762
-close(14)                         = 0
-munmap(0xb7397000, 4096)          = 0
-gettimeofday({1258829683, 360261}, NULL) = 0
-write(2, "Traceback (most recent call last"..., 35) = 35
Comment 2 Bernhard Wiedemann 2009-11-29 20:44:34 UTC
By coincidence I hit bug 551929 again and did log in over ssh , su - bernhard ; export DISPLAY=:0.0 before running system-config-printer there and it worked.

after some diffing of environment variables and trying system-config-printer I found a workaround:
unset GTK2_RC_FILES

the original value was:
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/usr/share/themes//QtCurve/gtk-2.0/gtkrc:/home/bernhard/.gtkrc-2.0-qtengine:/home/bernhard/.gtkrc-2.0:/home/bernhard/.kde4/share/config/gtkrc-2.0

Omitting just /usr/share/themes//QtCurve/gtk-2.0/gtkrc also makes it work, so this bug appears to be some incompatibility between QtCurve and system-config-printer.
Comment 3 Bernhard Wiedemann 2009-12-03 20:48:12 UTC
bug also occurs with
GTK2_RC_FILES= system-config-printer

as well as with old qtcurve-gtk2-0.59.7-2.4 from openSUSE-11.1 so it is rather a bug in system-config-printer or its dependencies.
Comment 8 Vincent Untz 2009-12-17 15:03:33 UTC
Can you try the system-config-printer package in home:vuntz:11.2-testing? It should contain a fix for this bug.
Comment 9 Bernhard Wiedemann 2009-12-18 20:10:06 UTC
I tried http://download.opensuse.org/repositories/home:/vuntz:/11.2-testing/openSUSE_11.2/i586/system-config-printer-1.1.12-4.1.i586.rpm

now it does (with the standard env including QtCurve)
> system-config-printer
  File "/usr/share/system-config-printer/system-config-printer.py", line 1482
    except gobject.GError:
                         ^
IndentationError: unindent does not match any outer indentation level


to be sure, I also upgraded to
udev-configure-printer-1.1.12-4.1.i586.rpm
python-cupshelpers-1.1.12-4.1.i586.rpm
but still the same effect.
Comment 10 Vincent Untz 2009-12-23 14:20:58 UTC
Oops, sorry, I updated the package. Can you try again?

(and in case this happens in the future, just edit the file and try to make sure the indentation is correct).
Comment 11 Bernhard Wiedemann 2009-12-24 09:48:44 UTC
This works now and also fixes original bug.
Comment 12 Vincent Untz 2010-01-05 12:15:18 UTC
Maintenance team: can we push the home:vuntz:11.2-testing/system-config-printer package as a maintenance update for 11.2? It just adds a small patch to make the application work under KDE.
Comment 13 Marcus Meissner 2010-01-05 14:18:47 UTC
it misses to load icons? and you add a try/except section ...

Why not add a require of the package that provides the icons to fix it?
Comment 14 Vincent Untz 2010-01-05 14:55:01 UTC
(In reply to comment #13)
> it misses to load icons? and you add a try/except section ...

It's emblems, not all icons. So it's not really visible. Also note that the patch comes from upstream.

> Why not add a require of the package that provides the icons to fix it?

Because it won't work: the user would have to use this theme anyway. I think most KDE users won't use gnome-icon-theme, so it really wouldn't help.

(A complete fix would involve fixing the base KDE theme to provide those icons, or to have system-config-printer ship those icons -- the latter is unlikely to happen, I think)
Comment 15 Marcus Meissner 2010-01-05 15:15:25 UTC
then i guess we can do it this way. as it fixes a non working package +1 for update
Comment 16 Swamp Workflow Management 2010-01-05 15:40:31 UTC
The SWAMPID for this issue is 29899.
Please submit the patch and patchinfo file using this ID.
(https://swamp.suse.de/webswamp/wf/29899)
Comment 17 Christian Dengler 2010-01-05 15:40:57 UTC
+1
update process started
Comment 18 Vincent Untz 2010-01-05 16:14:10 UTC
Patchinfo filled, package submitted (sr#28056) => closing.
Comment 19 Swamp Workflow Management 2010-01-19 10:33:35 UTC
Update released for: python-cupshelpers, system-config-printer, system-config-printer-debugsource, system-config-printer-lang, udev-configure-printer, udev-configure-printer-debuginfo
Products:
openSUSE 11.2 (debug, i586, x86_64)
Comment 20 Bernhard Wiedemann 2016-04-15 10:31:11 UTC
This is an autogenerated message for OBS integration:
This bug (555569) was mentioned in
https://build.opensuse.org/request/show/28056 11.2:Test / system-config-printer