Cups disrupts unity window theme

Bug #893676 reported by watgrad
28
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Fix Released
High
Till Kamppeter
Oneiric
Fix Released
High
Till Kamppeter
gnome-settings-daemon (Ubuntu)
Fix Released
High
Lars Karlitski
Oneiric
Invalid
Undecided
Unassigned

Bug Description

When printing in ubuntu 11.10 - the printing processes seem to somehow disrupt the windows theme in Unity. After printing, the window elements revert to an unthemed grey format. Login out and back in restores the ambiance theme to windows elements.

cups:
  Installed: 1.5.0-8ubuntu5
  Candidate: 1.5.0-8ubuntu5
  Version table:
 *** 1.5.0-8ubuntu5 0
        500 http://ca.archive.ubuntu.com/ubuntu/ oneiric-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     1.5.0-8 0

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: cups 1.5.0-8ubuntu5
ProcVersionSignature: Ubuntu 3.0.0-13.22-generic 3.0.6
Uname: Linux 3.0.0-13-generic x86_64
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Tue Nov 22 11:45:14 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
Lpstat:
 device for Lexmark-T640: dnssd://Lexmark%20T640%20(9)._pdl-datastream._tcp.local/
 device for Samsung_ML_1660_Series: ipp://10.246.149.51:631/printers/Samsung_ML_1660_Series
 device for WorkCentre-4250: dnssd://XEROX%20WorkCentre%204250%20(ZPR_PX0139)._pdl-datastream._tcp.local/
 device for WorkCentre-7665: socket://10.246.151.160:9100
 device for Xerox-WorkCentre-5665: socket://169.254.111.152:9100
MachineType: Apple Inc. MacBookPro8,1
Papersize: letter
PpdFiles:
 Xerox-WorkCentre-5665: Xerox WorkCentre 5665
 Lexmark-T640: Lexmark T640 Foomatic/Postscript (recommended)
 WorkCentre-4250: Xerox WorkCentre 4250
 WorkCentre-7665: Xerox WorkCentre 7655/7665/7675
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-13-generic root=UUID=f8957796-f6b4-4d98-b0ff-edf232980dba ro quiet splash pcie_aspm=force vt.handoff=7
SourcePackage: cups
UpgradeStatus: Upgraded to oneiric on 2011-10-13 (39 days ago)
dmi.bios.date: 04/22/11
dmi.bios.vendor: Apple Inc.
dmi.bios.version: MBP81.88Z.0047.B0E.1104221557
dmi.board.asset.tag: Base Board Asset Tag#
dmi.board.name: Mac-94245B3640C91C81
dmi.board.vendor: Apple Inc.
dmi.board.version: MacBookPro8,1
dmi.chassis.type: 10
dmi.chassis.vendor: Apple Inc.
dmi.chassis.version: Mac-94245B3640C91C81
dmi.modalias: dmi:bvnAppleInc.:bvrMBP81.88Z.0047.B0E.1104221557:bd04/22/11:svnAppleInc.:pnMacBookPro8,1:pvr1.0:rvnAppleInc.:rnMac-94245B3640C91C81:rvrMacBookPro8,1:cvnAppleInc.:ct10:cvrMac-94245B3640C91C81:
dmi.product.name: MacBookPro8,1
dmi.product.version: 1.0
dmi.sys.vendor: Apple Inc.

Revision history for this message
watgrad (watgrad) wrote :
Revision history for this message
Lars Karlitski (larsu) wrote :

Thank you for taking the time to report this bug.

The theme reverting to default is a sign of gnome-settings-daemon crashing. Unfortunately, I cannot reproduce this bug with the provided data. Could you please set CUPS' log level to debug with the command

  cupsctl LogLevel=debug

print again, and post /var/log/cups/error_log again? That way I can hopefully find out why gnome-settings-daemon is crashing.

Thanks!

Changed in cups (Ubuntu):
assignee: nobody → Lars Uebernickel (larsu)
Lars Karlitski (larsu)
Changed in cups (Ubuntu):
status: New → Incomplete
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

More instructions about setting CUPS into debug mode and getting the error_log you find in the section "CUPS error_log" of https://wiki.ubuntu.com/DesktopTeam/Meeting/2011-11-22.

Revision history for this message
watgrad (watgrad) wrote :

Hello,
I did as suggested by Lars in post #2.
I printed and had the same crash of the theme. (if it helps, I printed to a networked printer from Adobe Reader)
Attached is the error log.

Revision history for this message
Lars Karlitski (larsu) wrote :

According to your error_log, the dbus notifier process dies because of an invalid utf8 string. I wasn't able to reproduce this on my system yet. I'm also not sure how this could have happened, as dbus notifications are off be default.

A simple workaround is to remove all subscriptions: Go to the admin page of the CUPS web interface at

  http://localhost:631/admin

and click on "cancel rss subscription" for all listed subscriptions. You will be asked for your username and password (has to be an admin account).

This is not the real solution to this, of course, but it should stop your theme from disappearing.

Changed in cups (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
watgrad (watgrad) wrote :

I am using a personalize printer description file - could that cause a problem. I couldn't get ubuntu specific drivers for the WorkCenter copiers at my work so had to adapt ppd files to make them work...would this be causing the problem?

Revision history for this message
Lars Karlitski (larsu) wrote :

Your personalized PPD file might contain the invalid utf-8 string I was talking about in comment #5. Please attach it to this bug so that I can try to reproduce your problem with it.

Nevertheless, the notifier program should not crash when such an invalid string appears.

Revision history for this message
watgrad (watgrad) wrote :

Here are the ppds that are in use on this computer.

Revision history for this message
watgrad (watgrad) wrote :

and the second one...

Revision history for this message
Lars Karlitski (larsu) wrote :

Found the problem: when generating a d-bus message, CUPS's dbus notifier ignores parameters which contain invalid utf8 strings, but sends the message anyway. This results in a PrinterStateChanged message with less than the needed 6 parameters. This in turn crashes gnome-settings-daemon.

Attached is a patch for CUPS which doesn't send the malformed d-bus message in the first place. This means that you won't get notifications for that print job, but it will work nevertheless.

@Till, I think this is worth SRUing.

@watgrad, I still don't know where the invalid utf8 string comes from in your case. Your PPD files are valid. Maybe it's the name of the document you were trying to print? Please look for strange characters in the list of completed print jobs:

  http://localhost:631/jobs?which_jobs=completed

I'm adding gnome-settings-daemon to the list of affected packages, as it shouldn't crash when receiving a malformed message.

Changed in cups (Ubuntu):
status: Confirmed → In Progress
Changed in gnome-settings-daemon (Ubuntu):
status: New → Confirmed
Revision history for this message
Lars Karlitski (larsu) wrote :

Submitted the patch upstream at http://cups.org/str.php?L3984

tags: added: patch-forwarded-upstream
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Lars, thank you for the patch. I will include it in the CUPS package for Precise and also in an Oneiric SRU for CUPS, together with the fix for bug 897723.

Changed in cups (Ubuntu):
assignee: Lars Uebernickel (larsu) → Till Kamppeter (till-kamppeter)
Changed in gnome-settings-daemon (Ubuntu Oneiric):
status: New → Invalid
Changed in cups (Ubuntu Oneiric):
status: New → Triaged
Changed in cups (Ubuntu):
importance: Undecided → High
Changed in cups (Ubuntu Oneiric):
importance: Undecided → High
assignee: nobody → Till Kamppeter (till-kamppeter)
milestone: none → oneiric-updates
Revision history for this message
Sebastien Bacher (seb128) wrote :

bug #894341 is similar, that also shows up an issue in gnome-settings-daemon which should segfault on invalid messages received over dbus

Changed in gnome-settings-daemon (Ubuntu):
importance: Undecided → High
status: Confirmed → Triaged
status: Triaged → Confirmed
Changed in gnome-settings-daemon (Ubuntu):
assignee: nobody → Lars Uebernickel (larsu)
Revision history for this message
Giorgio (gioloi72) wrote :

I'me the reporter of bug #894341, which I think it is the same.
In the attachment there are the log from gdb as suggested by Sebastien, the /var/log/cups/error_log as suggested in comment 2,
and my the ppd from lexmark (I use this because in the one shipped with ubuntu some settings are missing)

Revision history for this message
Giorgio (gioloi72) wrote :
Revision history for this message
Giorgio (gioloi72) wrote :

Sorry, I don't know how to put multiple attachments in a single comment...

Revision history for this message
Lars Karlitski (larsu) wrote :

Giorgio, you do have the same issue. Your PPD file contains an invalid utf8 sequence at position 18679 (last char in line 429). You can check for invalid utf8 by running

    iconv -f UTF-8 FILENAME

If you know which charset the file is in, you can fix it by running

    iconv -f CHARSET FILENAME > NEW_FILENAME

Revision history for this message
Giorgio (gioloi72) wrote :

Lars, I have fixed the ppd as you suggested, (the original charset of the file was ISO8859-1).. now I have no errors checking for invalid utf8, but after replacing the printer driver with the new ppd generated by the iconv command, the bug is still present.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Patch reviewed and committed to the Debian BZR repository of CUPS. It will appear in the next CUPS package of Precise.

Changed in cups (Ubuntu):
status: In Progress → Fix Committed
Changed in cups (Ubuntu Oneiric):
status: Triaged → Fix Committed
Revision history for this message
watgrad (watgrad) wrote :

Thanks for your help with this - I will watch for an update to CUPS in the future to resolve the problem...

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Uploaded a new CUPS package for Oneiric fixing this bug and bug 897723 to oneiric-proposed. As soon as this upload will get approved another comment with testing instructions will be posted here. Please test the fixed package then and tell here whether it solves your problem.

A debdiff of the changes is attached.

Revision history for this message
watgrad (watgrad) wrote :

Hi Lars,
I tried this, however there is no history stored on the computer - it shows no past or current print jobs - so I can't tell you if this was the problem - sorry.

LARS Wrote:
"@watgrad, I still don't know where the invalid utf8 string comes from in your case. Your PPD files are valid. Maybe it's the name of the document you were trying to print? Please look for strange characters in the list of completed print jobs:

  http://localhost:631/jobs?which_jobs=completed

I'm adding gnome-settings-daemon to the list of affected packages, as it shouldn't crash when receiving a malformed message."

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Updated the uploaded SRU to also fix the regressions on the IPP CUPS backend: bug 881843, bug 877958, bug 879625, and bug 883585

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups - 1.5.0-13

---------------
cups (1.5.0-13) unstable; urgency=low

  [ Till Kamppeter ]
  * debian/patches/ipp-patch-r8950+.patch: Revert the IPP backend to the state
    of CUPS 1.4.x, as the 1.5.x versiuon has major regressions (LP: #877958,
    LP: #879625, LP: #881843, LP: #883585, Closes: #638521, CUPS STR #3966,
    CUPS STR #3967). This patch will get removed as soon as upstream has fixed
    all these regressions. As upstream did not announce any new features for
    the IPP backend in the release notes for 1.5.x, we assume that with this
    step no features will get lost.
  * debian/patches/dont-send-malformed-dbus-messages.patch: Do not send D-Bus
    notifications with too few parameters when there are parameters which
    cannot be added to the D-Bus request, especially invalid UTF-8 strings.
    This made gnome-session-daemon crash (LP: #893676, CUPS STR #3984).
  * debian/local/filters/cpdftocps: The cpdftocps filter (used for PostScript
    printers and for drivers with PPDs which are not PDF-aware) did not
    recognize the duplex setting correctly, making duplex not working on
    many common printers (LP: #897723).
  * debian/local/filters/cpdftocps: Cleaned up the header comments.

  [ Martin-Éric Racine ]
  * [cups.postrm]: purge /etc/cups/ssl/server.[crt|key] and /etc/cups/ssl.

  [ Martin Pitt ]
  * debian/compat: Bump from 5 to 9, this apparently was forgotten in the
    Multi-Arch transition.
 -- Martin Pitt <email address hidden> Fri, 02 Dec 2011 11:05:51 +0100

Changed in cups (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello watgrad, or anyone else affected,

Accepted cups into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
watgrad (watgrad) wrote :

I have applied the proposed patch.
So far everything seems to work as it should - no more ugly window decorations after printing.
Thanks for the quick response to this.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

watgrad, thank you very much for testing. Marking the SRU as verified.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Lars Karlitski (larsu) wrote :

I just submitted a patch to gnome-settings-daemon upstream at

  https://bugzilla.gnome.org/show_bug.cgi?id=665689

which fixes the issue from the other side.

Changed in gnome-settings-daemon (Ubuntu):
status: Confirmed → In Progress
Lars Karlitski (larsu)
Changed in gnome-settings-daemon (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups - 1.5.0-8ubuntu6

---------------
cups (1.5.0-8ubuntu6) oneiric-proposed; urgency=low

  * debian/patches/ipp-patch-r8950+.patch: Revert the IPP backend to the state
    of CUPS 1.4.x, as the 1.5.x versiuon has major regressions (LP: #877958,
    LP: #879625, LP: #881843, LP: #883585, Closes: #638521, CUPS STR #3966,
    CUPS STR #3967). This patch will get removed as soon as upstream has fixed
    all these regressions. As upstream did not announce any new features for
    the IPP backend in the release notes for 1.5.x, we assume that with this
    step no features will get lost.
  * debian/patches/dont-send-malformed-dbus-messages.patch: Do not send D-Bus
    notifications with too few parameters when there are parameters which
    cannot be added to the D-Bus request, especially invalid UTF-8 strings.
    This made gnome-session-daemon crash (LP: #893676, CUPS STR #3984).
  * debian/local/filters/cpdftocps: The cpdftocps filter (used for PostScript
    printers and for drivers with PPDs which are not PDF-aware) did not
    recognize the duplex setting correctly, making duplex not working on
    many common printers (LP: #897723).
  * debian/local/filters/cpdftocps: Cleaned up the header comments.
 -- Till Kamppeter <email address hidden> Tue, 29 Nov 2011 21:49:41 +0100

Changed in cups (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Changed in gnome-settings-daemon (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.