cups: Test Page /usr/lib/cups/filter/bannertops failed, test page and banner pages do not get printed

Bug #710881 reported by Juan Pedro Paredes
136
This bug affects 23 people
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Fix Released
High
Martin Pitt
Natty
Fix Released
High
Martin Pitt
libpng (Ubuntu)
Confirmed
Medium
Unassigned
Natty
Won't Fix
Medium
Unassigned

Bug Description

Binary package hint: cups

I can print with Libre Office, but when i try to send a test page bannertops crash

Description: Ubuntu natty (development branch)
Release: 11.04

apt-cache policy cups
cups:
  Instalados: 1.4.5-1ubuntu6
  Candidato: 1.4.5-1ubuntu6
  Tabla de versión:
 *** 1.4.5-1ubuntu6 0
        500 http://archive.ubuntu.com/ubuntu/ natty/main amd64 Packages
        100 /var/lib/dpkg/status

Is expected to print a Test Page for the printer configured.
The job ends with the message "/usr/lib/cups/filter/bannertops failed"

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: cups 1.4.5-1ubuntu6
ProcVersionSignature: Ubuntu 2.6.37-12.26-generic 2.6.37
Uname: Linux 2.6.37-12-generic x86_64
NonfreeKernelModules: fglrx
Architecture: amd64
Date: Mon Jan 31 21:12:55 2011
EcryptfsInUse: Yes
Lpstat: device for laser: socket://192.168.252.2:9100
Papersize: a4
PpdFiles: laser: HP LaserJet 4050 Series PS
ProcEnviron:
 LANGUAGE=
 LANG=es_ES.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.37-12-generic root=UUID=f588a7f4-49d3-42b9-8670-2c9fe1a2c6a0 ro vga=791 quiet splash vt.handoff=7
SourcePackage: cups
dmi.bios.date: 10/18/2010
dmi.bios.vendor: Intel Corp.
dmi.bios.version: TCIBX10H.86A.0040.2010.1018.1100
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: DH55HC
dmi.board.vendor: Intel Corporation
dmi.board.version: AAE70933-501
dmi.chassis.type: 3
dmi.modalias: dmi:bvnIntelCorp.:bvrTCIBX10H.86A.0040.2010.1018.1100:bd10/18/2010:svn:pn:pvr:rvnIntelCorporation:rnDH55HC:rvrAAE70933-501:cvn:ct3:cvr:

Revision history for this message
Juan Pedro Paredes (juampe) wrote :
Revision history for this message
Juan Pedro Paredes (juampe) wrote :
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

bannertops does not work in general. This command line already leads to the reported problem:

/usr/lib/cups/filter/bannertops 1 1 1 1 "PageSize=A4" < /usr/share/cups/data/testprint > x

Changed in cups (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Looks like a problem in the original code of the bannertops filter. Submitted problem upstream:

http://www.cups.org/str.php?L3787

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

According to the CUPS upstream bug report

http://www.cups.org/str.php?L3787

this is a problem of libpng. Mike Sweet, the author of CUPS recommends filing an upstream bug in libpng, with the Valgrind results which are attched to the CUPS upstream bug.

affects: cups (Ubuntu) → libpng (Ubuntu)
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Note that the offending PNG image is /usr/share/cups/doc-root/images/cups.png, an 8-bit-per-pixel colormap type image:

till@till:~/ubuntu/cups/bzr/build-area/cups-1.4.6$ file /usr/share/cups/doc-root/images/cups.png
/usr/share/cups/doc-root/images/cups.png: PNG image data, 128 x 128, 8-bit colormap, non-interlaced
till@till:~/ubuntu/cups/bzr/build-area/cups-1.4.6$

You get the same failure if you try to print the image by directly sending it to CUPS:

/usr/lib/cups/filter/imagetops 1 1 1 1 "PageSize=A4" /usr/share/cups/doc-root/images/cups.png > x

PNG images with 24/32-bit-per-pixel work correctly.

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

A workaround to be able to print the CUPS test page again is to convert /usr/share/cups/doc-root/images/cups.png to RGBA:

convert /usr/share/cups/doc-root/images/cups.png PNG32:cups.png
sudo cp cups.png /usr/share/cups/doc-root/images/

After that the test page prints again. But note that printing 8-bit-per-pixel PNG files directly to CUPS will not work. Those files you have to open with eog, shotwell, GIMP, or any other image application and then print out of the application.

Changed in cups (Ubuntu):
status: New → In Progress
importance: Undecided → High
milestone: none → ubuntu-11.04-beta-1
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Added CUPS task for the workaround. But note that this is not a fix. The problem in libpng needs to get fixed for Natty.

Changed in libpng (Ubuntu):
milestone: none → ubuntu-11.04
summary: - cups: Test Page /usr/lib/cups/filter/bannertops failed
+ cups: Test Page /usr/lib/cups/filter/bannertops failed, test page and
+ banner pages do not get printed
Changed in cups (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

The CUPS package with the workaround will get uploaded after the release of beta 1 of Natty this Friday. If you need the problem solved urgently, follow the instructions in comment #7.

Changed in cups (Ubuntu):
milestone: ubuntu-11.04-beta-1 → ubuntu-11.04-beta-2
Revision history for this message
Juan Pedro Paredes (juampe) wrote :

OK, I verified the workaround in #7. It works fine for testing purposes.
Good job

Revision history for this message
tonyfrasouza (toninhoquartelgeral) wrote : Re: [Bug 710881] Re: cups: Test Page /usr/lib/cups/filter/bannertops failed, test page and banner pages do not get printed

Me install hp firmware for HP1006 and printer now....

2011/3/29 Juan Pedro Paredes <email address hidden>

> OK, I verified the workaround in #7. It works fine for testing purposes.
> Good job
>
> --
> You received this bug notification because you are a direct subscriber
> of a duplicate bug (742708).
> https://bugs.launchpad.net/bugs/710881
>
> Title:
> cups: Test Page /usr/lib/cups/filter/bannertops failed, test page and
> banner pages do not get printed
>
> Status in “cups” package in Ubuntu:
> Fix Committed
> Status in “libpng” package in Ubuntu:
> Confirmed
>
> Bug description:
> Binary package hint: cups
>
> I can print with Libre Office, but when i try to send a test page
> bannertops crash
>
> Description: Ubuntu natty (development branch)
> Release: 11.04
>
> apt-cache policy cups
> cups:
> Instalados: 1.4.5-1ubuntu6
> Candidato: 1.4.5-1ubuntu6
> Tabla de versión:
> *** 1.4.5-1ubuntu6 0
> 500 http://archive.ubuntu.com/ubuntu/ natty/main amd64 Packages
> 100 /var/lib/dpkg/status
>
> Is expected to print a Test Page for the printer configured.
> The job ends with the message "/usr/lib/cups/filter/bannertops failed"
>
> ProblemType: Bug
> DistroRelease: Ubuntu 11.04
> Package: cups 1.4.5-1ubuntu6
> ProcVersionSignature: Ubuntu 2.6.37-12.26-generic 2.6.37
> Uname: Linux 2.6.37-12-generic x86_64
> NonfreeKernelModules: fglrx
> Architecture: amd64
> Date: Mon Jan 31 21:12:55 2011
> EcryptfsInUse: Yes
> Lpstat: device for laser: socket://192.168.252.2:9100
> Papersize: a4
> PpdFiles: laser: HP LaserJet 4050 Series PS
> ProcEnviron:
> LANGUAGE=
> LANG=es_ES.UTF-8
> SHELL=/bin/bash
> ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.37-12-generic
> root=UUID=f588a7f4-49d3-42b9-8670-2c9fe1a2c6a0 ro vga=791 quiet splash
> vt.handoff=7
> SourcePackage: cups
> dmi.bios.date: 10/18/2010
> dmi.bios.vendor: Intel Corp.
> dmi.bios.version: TCIBX10H.86A.0040.2010.1018.1100
> dmi.board.asset.tag: To be filled by O.E.M.
> dmi.board.name: DH55HC
> dmi.board.vendor: Intel Corporation
> dmi.board.version: AAE70933-501
> dmi.chassis.type: 3
> dmi.modalias:
> dmi:bvnIntelCorp.:bvrTCIBX10H.86A.0040.2010.1018.1100:bd10/18/2010:svn:pn:pvr:rvnIntelCorporation:rnDH55HC:rvrAAE70933-501:cvn:ct3:cvr:
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/ubuntu/+source/cups/+bug/710881/+subscribe
>

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

This bug was fixed in the package cups - 1.4.6-4

---------------
cups (1.4.6-4) unstable; urgency=low

  * debian/patches/fix-broken-ipv6-uris.dpatch: When accessing the web
    interface via http: (unencrypted) and one does an adminstrative task
    which requires encryption, on upgrading to https: (encrypted) mode
    IPv6 IP addresses without "[...]" get inserted into the URL and the
    browser cannot parse the URL correctly. Fixed with a patch from upstream
    (LP: #744674).
  * debian/rules: Convert cups.png (CUPS logo for test page) to RGBA, as the
    original 8-bit-per-pixel color map format leads to a crash in libpng. This
    prevents the CUPS test page and the banner pages from printing
    (LP: #710881).
  * debian/control: Add ImageMagick to the build dependencies, as it is
    needed for the CUPS logo image conversion.
 -- Martin Pitt <email address hidden> Fri, 01 Apr 2011 11:06:02 +0200

Changed in cups (Ubuntu Natty):
status: Fix Committed → Fix Released
Changed in cups (Ubuntu Natty):
status: Fix Released → Confirmed
milestone: ubuntu-11.04-beta-2 → ubuntu-11.04
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I have found a build problem. The fix works well with a package which I build on my local machine, but with a package built on buildds it fails.

So I get the following (having a locally rebuilt binary package of "cups", using 1.4.6-5 in all cases):

till@till:~/ubuntu/cups/bzr/debian-trunk$ sudo dpkg -i cups_1.4.6-5_amd64.deb
...
till@till:~/ubuntu/cups/bzr/debian-trunk$ file /usr/share/cups/doc-root/images/cups.png
/usr/share/cups/doc-root/images/cups.png: PNG image data, 128 x 128, 8-bit/color RGBA, non-interlaced
till@till:~/ubuntu/cups/bzr/debian-trunk$ sudo apt-get install --reinstall cups
...
till@till:~/ubuntu/cups/bzr/debian-trunk$ file /usr/share/cups/doc-root/images/cups.png
/usr/share/cups/doc-root/images/cups.png: PNG image data, 128 x 128, 8-bit colormap, non-interlaced
till@till:~/ubuntu/cups/bzr/debian-trunk$

So cups.png has the correct format with the locally built package but the wrong format with the package built by buildds.

The conversion is done in the debian/rules file, in the "binary-post-install/cups::" rule, by running the command line

convert debian/$(cdbs_curpkg)/usr/share/cups/doc-root/images/cups.png PNG32:cups.png && \
        mv -f cups.png debian/$(cdbs_curpkg)/usr/share/cups/doc-root/images/

How has this to be done correctly so that buildds produces the correct files.

pitti, can you help here? Thanks.

Changed in cups (Ubuntu Natty):
importance: High → Critical
Revision history for this message
Martin Pitt (pitti) wrote :

I really doubt it's a huge libpng problem, as these images work correctly everywhere else (eog, firefox, etc.). Thus I close the natty task and just keep the general task.

Changed in libpng (Ubuntu Natty):
milestone: ubuntu-11.04 → none
status: Confirmed → Won't Fix
Changed in cups (Ubuntu Natty):
importance: Critical → High
status: Confirmed → In Progress
Martin Pitt (pitti)
Changed in cups (Ubuntu Natty):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups - 1.4.6-5ubuntu1

---------------
cups (1.4.6-5ubuntu1) natty; urgency=low

  * Revert calling "convert" on the banner PNGs (r961); the file is already
    correct in the source. The format conversion happens in Ubuntu's
    pkgbinarymangler, so it does not affect Debian builds at all and also this
    cannot be circumvented that way. Instead, blacklist this package from
    pkgstripfiles. (LP: #710881)
 -- Martin Pitt <email address hidden> Tue, 19 Apr 2011 21:55:20 +0200

Changed in cups (Ubuntu Natty):
status: Fix Committed → Fix Released
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

pitti, thanks for the quick fix.

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

pitti, your fix works, buildds has kept the PNGs in the correct format now.

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

Other bug subscribers

Remote bug watches

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