system-config-printer crashes when assigning a downloadable non-free Epson driver to a detected printer

Bug #1412729 reported by Till Kamppeter
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
system-config-printer (Ubuntu)
High
Unassigned
Trusty
High
Unassigned
Utopic
High
Unassigned

Bug Description

If a newer Epson printer which is not (yet) supported by Gutenprint is connected and set up, system-config-printer crashes when it finds the appropriate driver package from Epson via OpenPrinting. This is due to the fact that the Epson driver entries on the OpenPrinting web site do not contain the long license textst inline but in one centralized text file on Epson's web site. The driver entries only contain links to this file.

system-config-printer does only support inline license texts and crashes on this kind of driver entries.

[Impact]

Users of newer Epson inkjet printers are not able to set up their printers because system-config-printer crashes when choosing such a printer in the list of detected printers.

[Test Case]

If you do not have one of the mentioned printers, create a file named /usr/lib/cups/backend/testbackend containing the line

echo 'direct usb://EPSON/XP-215%20217%20Series "EPSON XP-215 217 Series" "EPSON XP-215 217 Series" "MFG:EPSON;CMD:ESCPL2,BDC,D4,D4PX,ESCPR2;MDL:XP-215 217 Series;CLS:PRINTER;DES:EPSON XP-215 217 Series;" ""'

and make it world-readable and -executable:

sudo chmod a+rx /usr/lib/cups/backend/testbackend

This emulates an Epson XP-215/217 printer on USB, at least for CUPS' printer discovery facility.

Start system-config-printer and click the "Add" button. In the printer setup wizard choose the Epson XP-215 217 Series printer under the detected printers. There will pop up "Searching driver" messages several times but in the end system-config-printer crashes.

With the proposed packages for Utopic and Trusty the driver selection screen will appear offering to download Epson's driver for this printer and after accepting the license the driver gets installed and the printer set up with this driver.

[Regression Potential]

Regression potential is low, as the fix only affects the code for retreiving the driver database record from OpenPrinting and displaying it on the driver selection screen. All other functionality of system-config-printer is unchanged.

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

Attached patch adds the code needed (~10 lines) to download the license text from a URL linked in the driver record from OpenPrinting. The download is a text file and treated as such, so no security risk by the extra download. This patch fixes this bug.

Changed in system-config-printer (Ubuntu):
status: New → In Progress
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Attached is a patch which is an additional crash guard in the driver record display code for the case that the licensetext field of the driver record is None.

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

This bug was fixed in the package system-config-printer - 1.5.4+20141212-0ubuntu2

---------------
system-config-printer (1.5.4+20141212-0ubuntu2) vivid; urgency=medium

  * debian/patches/35_fix-driver-package-installation-with-install-printerdriver.patch:
    Simplified communication between system-config-printer and
    install-printerdriver helper script (LP: #1412722).
  * debian/patches/37_do-not-crash-on-licensetext-being-none.patch: Crash
    guard for displaying OpenPrinting driver record where the licensetext
    field is None (LP: #1412729).
  * debian/patches/40_support-licensetext-in-separate-url.patch: Added support
    for OpenPrinting driver records with license text linked from separate
    download URL (LP: #1412729).
 -- Till Kamppeter <email address hidden> Tue, 20 Jan 2015 11:56:08 +0100

Changed in system-config-printer (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Uploaded a package fixing bug 1412729 and bug 1412722 to utopic-proposed.

Changed in system-config-printer (Ubuntu Utopic):
status: New → In Progress
Changed in system-config-printer (Ubuntu):
importance: Undecided → High
Changed in system-config-printer (Ubuntu Trusty):
importance: Undecided → High
Changed in system-config-printer (Ubuntu Utopic):
importance: Undecided → High
milestone: none → utopic-updates
Changed in system-config-printer (Ubuntu Trusty):
milestone: none → trusty-updates
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Uploaded a package fixing bug 1412729 and bug 1412722 to trusty-proposed.

Changed in system-config-printer (Ubuntu Trusty):
status: New → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Till, or anyone else affected,

Accepted system-config-printer into utopic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/system-config-printer/1.5.1+20141010-0ubuntu2.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in system-config-printer (Ubuntu Utopic):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Updated my Utopic system and got the proposed package. Now the Epson drivers install correctly. The package description/confirmation screen appears with the correct license text and after confirming the package gets installed.

tags: added: verification-done
removed: verification-needed
Timo Aaltonen (tjaalton)
tags: added: verification-done-utopic
removed: verification-done
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package system-config-printer - 1.5.1+20141010-0ubuntu2.3

---------------
system-config-printer (1.5.1+20141010-0ubuntu2.3) utopic-proposed; urgency=medium

  * debian/patches/75_fix-driver-package-installation-with-install-printerdriver.patch:
    Simplified communication between system-config-printer and
    install-printerdriver helper script (LP: #1412722).
  * debian/patches/77_do-not-crash-on-licensetext-being-none.patch: Crash
    guard for displaying OpenPrinting driver record where the licensetext
    field is None (LP: #1412729).
  * debian/patches/80_support-licensetext-in-separate-url.patch: Added support
    for OpenPrinting driver records with license text linked from separate
    download URL (LP: #1412729).
  * debian/patches/83_fix-crash-in-nextnptab-if-driver-is-zero.patch: Trivial
    patch to avoid crashes when installing downloadable printer driver
    packages via OpenPrinting. These crashes were observed via the Ubuntu
    error reporting system.
 -- Till Kamppeter <email address hidden> Tue, 20 Jan 2015 13:40:08 +0100

Changed in system-config-printer (Ubuntu Utopic):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for system-config-printer has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Till, or anyone else affected,

Accepted system-config-printer into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/system-config-printer/1.4.3+20140219-0ubuntu2.6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in system-config-printer (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Updated my Trusty VM with the proposed package and all works correctly now.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Bruno Nova (brunonova) wrote :

I confirm it works.

I already had my wireless Epson printer setup in Ubuntu, so I removed it from the settings, uninstalled the driver package and removed the Epson repository.
Then I upgraded the 4 packages built by system-config-printer to the version in trusty-proposed and tried to add the printer. It worked correctly and the printer is working (again).
But, since the printer was already installed, the result may not have been accurate (even though I uninstalled it before testing).

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

Bruno thank you for testing. Your test is perfectly OK, you have removed the print queue, the driver package, and the repo, so your system is absolutely neutral. There is nothing more you can remove.

Revision history for this message
Bruno Nova (brunonova) wrote :

I just tested this in a VirtualBox VM (which contains a very "vanilla" 14.04 install with very few extra packages installed), and it didn't work.
I tried several times. The Epson repository is added successfully, but it hangs while it's installing the driver package (epson-inkjet-printer-nx420). The package is not installed.

The last output of "system-config-printer --debug" is:
  pk.refresh_cache succeeded
  pk.resolve
  pk.resolve succeeded
  package_id: epson-inkjet-printer-nx420;1.0.0-1lsb3.2;amd64;printdriver
  package not installed
  pk.install_packages
  Signature key supplied

After this, when I try to install the package manually, it fails because /var/cache/debconf/config.dat (and other files there) is locked by another process.
Here are the relevant lines (I think) of "ps aux":
  root 3331 0.0 0.0 0 0 pts/0 ZN+ 16:57 0:00 [dpkg] <defunct>
  root 3332 0.0 0.0 4444 648 pts/0 SN+ 16:57 0:00 /bin/sh -c /usr/sbin/dpkg-preconfigure --apt || true
  root 3333 0.0 1.0 64128 15628 pts/0 SN+ 16:57 0:00 /usr/bin/perl -w /usr/sbin/dpkg-preconfigure --apt
  root 3335 0.0 0.0 0 0 pts/0 ZN+ 16:57 0:00 [dpkg-preconfigu] <defunct>

However, if I install the packages "alien", "build-essential" and "lsb" before installing the printer through system-config-printer, the installation completes successfully.
Also, there was one time when apt failed to install the driver package (manually) because one of the dependencies, which was "lsb", was not properly configured.
So, is sytem-config-printer failing to configure a package (i.e. debconf), or is this a quirk with Virtualbox?

Another note. The driver installation window is too large to fit in my 1366x768 monitor, so the buttons in the bottom are not visible.

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

The "lsb" or at least the "lsb-printing" package should be in the dependencies of the printer driver package and this way get automatically installed along with it.

The dpkg processes running on yout VM and blocking the installation of the driver is more a problem of your individual system (or perhaps the VM?). Installing apt alien build-essential, ... gives perhaps some kick to these processes making them terminating.

Note that the printer driver packages do not use debconf (they are converted from RPMs).

Revision history for this message
Bruno Nova (brunonova) wrote :

@Till, before installing the "alien", "build-essential" and "lsb" packages, I reverted the VM to a previous snapshot (which is "clean"). I did this before every attempt at installing the printer.
In the attempt where I installed these packages manually (and their dependencies), system-config-printer succeeded in installing the driver. In the other attempts it hanged.
There was also one attempt where I installed "alien" and "build-essential", but not "lsb", and it didn't work.

Was the VM that you used for testing in a "after installation" state?
If not, could you, or anybody, else test this fix right after installing Ubuntu in a VM or an actual machine?
This way we would know if this is really an issue or if it's just a problem with VirtualBox (which it may be).
(Sorry, I can't test this in a real computer because I have only one working computer right now, and I don't want to reinstall the system).

Relative to THIS bug ("system-config-printer crashes..."), it's fixed! It doesn't crash anymore with the fix.
The issue I reported would be a new bug (if confirmed).

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

This bug was fixed in the package system-config-printer - 1.4.3+20140219-0ubuntu2.6

---------------
system-config-printer (1.4.3+20140219-0ubuntu2.6) trusty-proposed; urgency=medium

  * debian/patches/43_fix-driver-package-installation-with-install-printerdriver.patch:
    Simplified communication between system-config-printer and
    install-printerdriver helper script (LP: #1412722).
  * debian/patches/45_do-not-crash-on-licensetext-being-none.patch: Crash
    guard for displaying OpenPrinting driver record where the licensetext
    field is None (LP: #1412729).
  * debian/patches/47_support-licensetext-in-separate-url.patch: Added support
    for OpenPrinting driver records with license text linked from separate
    download URL (LP: #1412729).
  * debian/patches/50_fix-crash-in-nextnptab-if-driver-is-zero.patch: Trivial
    patch to avoid crashes when installing downloadable printer driver
    packages via OpenPrinting. These crashes were observed via the Ubuntu
    error reporting system.
 -- Till Kamppeter <email address hidden> Tue, 20 Jan 2015 14:59:59 +0100

Changed in system-config-printer (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
john thomas (johnthomas1) wrote :

This information is really good for knowing about the Epson printer and its drivers. We should be using genuine drivers for the printer and always protect software from virus and malware. Sometimes Epson printer shows Epson error code 0xEa visit this link http://printertechsupportnumbers.com/blog/how-to-fix-epson-error-code-0xea/ for knowing about Epson error code 0xEa it is harmful to our printer. The reason of this error printer work slow.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers