openprinting-ppds crashed with UnicodeEncodeError in ls(): 'ascii' codec can't encode character '\ufffd' in position 92: ordinal not in range(128)

Bug #1014852 reported by rand(@)mGenesis on 2012-06-18
40
This bug affects 7 people
Affects Status Importance Assigned to Milestone
foomatic-db (Ubuntu)
High
Till Kamppeter
pyppd (Ubuntu)
Medium
Unassigned

Bug Description

it occurred when restarting after updates.

ProblemType: Crash
DistroRelease: Ubuntu 12.10
Package: openprinting-ppds 20120322-0ubuntu3
ProcVersionSignature: Ubuntu 3.2.0-23.31-lowlatency-pae 3.2.14
Uname: Linux 3.2.0-23-lowlatency-pae i686
ApportVersion: 2.2.3-0ubuntu4
Architecture: i386
CupsErrorLog:

Date: Mon Jun 18 14:21:47 2012
ExecutablePath: /usr/lib/cups/driver/openprinting-ppds
InstallationMedia: Ubuntu-Studio 12.10 "Quantal Quetzal" - Alpha i386 (20120518)
InterpreterPath: /usr/bin/python3.2mu
Lpstat: Error: command ['lpstat', '-v'] failed with exit code 1: lpstat: No destinations added.
MachineType: Apple Inc. MacBook2,1
PackageArchitecture: all
Papersize: letter
ProcCmdline: python3 /usr/lib/cups/driver/openprinting-ppds list
ProcEnviron:
 PATH=(custom, no user)
 LANG=en.UTF8
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-23-lowlatency-pae root=UUID=28122c95-d67b-48eb-ae4a-c6d9cf50ab04 ro quiet splash vt.handoff=7
PythonArgs: ['/usr/lib/cups/driver/openprinting-ppds', 'list']
SourcePackage: foomatic-db
Title: openprinting-ppds crashed with UnicodeEncodeError in ls(): 'ascii' codec can't encode character '\ufffd' in position 92: ordinal not in range(128)
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

dmi.bios.date: 06/27/07
dmi.bios.vendor: Apple Inc.
dmi.bios.version: MB21.88Z.00A5.B07.0706270922
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: Mac-F4208CA9
dmi.board.vendor: Apple Inc.
dmi.board.version: PVT
dmi.chassis.asset.tag: Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: Apple Inc.
dmi.chassis.version: Mac-F4208CA9
dmi.modalias: dmi:bvnAppleInc.:bvrMB21.88Z.00A5.B07.0706270922:bd06/27/07:svnAppleInc.:pnMacBook2,1:pvr1.0:rvnAppleInc.:rnMac-F4208CA9:rvrPVT:cvnAppleInc.:ct10:cvrMac-F4208CA9:
dmi.product.name: MacBook2,1
dmi.product.version: 1.0
dmi.sys.vendor: Apple Inc.

rand(@)mGenesis (greannedsoims) wrote :
tags: removed: need-duplicate-check
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in foomatic-db (Ubuntu):
status: New → Confirmed
Sebastien Bacher (seb128) wrote :

The issue got some hundred reports with the current version on
https://errors.ubuntu.com/bucket/?id=%2Fusr%2Flib%2Fcups%2Fdriver%2Fopenprinting-ppds%3AUnicodeEncodeError%3A%3Cmodule%3E%3Amain%3Als

Till, could you look at it?

visibility: private → public
Changed in foomatic-db (Ubuntu):
assignee: nobody → Till Kamppeter (till-kamppeter)
importance: Undecided → High
Changed in foomatic-db (Ubuntu):
status: Confirmed → Fix Committed
Changed in pyppd (Ubuntu):
importance: Undecided → Medium
Till Kamppeter (till-kamppeter) wrote :

The real problem is in the PPD file compressor pyppd. The decompression code which it includes as head of the self-extracting PPD archives is not locale-agnostic. It only works with UTF-8 locales: en_US.UTF-8, C.UTF-8, ... As Ubuntu uses UTF-8 locales by default, foomatic-db usually works. To reproduce the bug one simply needs to run the self-extracting archive under a non-UTF-8 locale:

LC_ALL=C /usr/lib/cups/driver/openprinting-ppds list > out.txt

foomatic-db also works if the PPDs contain only pure ASCII in their make/model information. As a workaround I have patched the 2 PPDs with non-ASCII characters in foomatic-db in the foomatic-db 20120823-0ubuntu4 package.

Changed in foomatic-db (Ubuntu):
milestone: none → ubuntu-12.10
Changed in pyppd (Ubuntu):
status: New → Confirmed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package foomatic-db - 20120823-0ubuntu4

---------------
foomatic-db (20120823-0ubuntu4) quantal-proposed; urgency=low

  * debian/patches/fix-invalid-character-in-oce-varioprint-2100ps-ppd.patch:
    Fixed PPD file with invalid characters (LP: #1014852).
 -- Till Kamppeter <email address hidden> Tue, 9 Oct 2012 20:18:03 +0200

Changed in foomatic-db (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers