printing some PDFs from evince is crashing our Xerox printer

Bug #207776 reported by Chris Jones
8
Affects Status Importance Assigned to Milestone
libcairo
Fix Released
Medium
cairo (Ubuntu)
Fix Released
High
Unassigned

Bug Description

We have a Xerox Workcentre 7228 which has been in regular, daily use for the last year.
As people in the office are upgrading to Hardy, the printer is starting to crash quite a lot.

I will shortly be attaching a PDF and the Postscript output from gutsy and hardy to this bug.
Printing this PDF from Gutsy produces a printer error, but the printer continues to function. From Hardy it causes the printer to completely crash (which is clearly a printer bug, but may indicate that poppler is doing something wrong too).

Revision history for this message
Chris Jones (cmsj) wrote :
Revision history for this message
Chris Jones (cmsj) wrote :
Revision history for this message
Chris Jones (cmsj) wrote :
Chris Jones (cmsj)
description: updated
Revision history for this message
Chris Jones (cmsj) wrote : Re: [hardy] printing some PDFs from evince is crashing our Xerox printer

[17:52] < seb128> Ng: does gs opens the ps correctly?

yes. I didn't see any errors, but I am not hugely familiar with gs - can I ask it to validate the document for me?

Revision history for this message
Chris Jones (cmsj) wrote :

the visual quality gs produces isn't great though. Again, I am not sure if this is gs failing to scale properly for my screen or not.

Changed in poppler:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
In , Sebastien Bacher (seb128) wrote :

The bug has been opened on https://bugs.launchpad.net/ubuntu/+source/poppler/+bug/207776

"We have a Xerox Workcentre 7228 which has been in regular, daily use for the last year.
As people in the office are upgrading to Hardy, the printer is starting to crash quite a lot.

I will shortly be attaching a PDF and the Postscript output from gutsy and hardy to this bug.
Printing this PDF from Gutsy produces a printer error, but the printer continues to function. From Hardy it causes the printer to completely crash (which is clearly a printer bug, but may indicate that poppler is doing something wrong too).

http://launchpadlibrarian.net/12921700/UbuntuDesktop.pdf
PDF that may kill Xerox Workcentre printers (124.4 KiB, application/pdf)"

The ps generated using evince has some font rendering issue, using the poppler pdftops on the pdf works correctly, that seems to be a cairo issue

Revision history for this message
In , Adrian Johnson (ajohnson-redneon) wrote :

The file xerox-killer-hardy.ps works for me. ie it displays in ghostscript without errors and prints on my LaserJet 4050.

I couldn't see anything obvious in the file like large fallback images that may be causing a problem.

There are a some things the bug reporter could try:

- Check the CUPS settings. There should be a way to get CUPS to filter the PostScript through ghostscript. This may help as ghostscript has more knowledge about printer limitations than cairo.

- Trim down the PS file to find the smallest set of PostScript commands that crash the printer.

- git bisect cairo to find the commit that started crashing the printer.

I can't see that there is anything I can do unless I can reproduce the problem myself.

The font rendering issues should be all fixed in git.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug report. This bug has been reported to the developers of the software. You can track it and make comments here: https://bugs.freedesktop.org/show_bug.cgi?id=15348

Changed in poppler:
status: Confirmed → Triaged
Revision history for this message
In , James H. Cloos Jr. (cloos-jhcloos) wrote :

You may want to CC the bug report to Xerox and Adobe.

(AIUI Xerox uses Adobe's RIP.)

Changed in libcairo:
status: Unknown → Confirmed
Revision history for this message
In , Carl Worth (cworth) wrote :

As Adrian mentioned above, there's not a lot we can do unless we can
replicate the bad behavior. But we're also quite happy to work with
anyone that can replicate the bad behavior to help us figure out
exactly what in cairo's PostScript output the printer doesn't like.

Sebastien, can you pass some of this information on to the original
reporter and invite them to join the conversation here, (or on the
cairo mailing list), if interested in helping us figure this out? I
couldn't seem to get launchpad to give me a contact address for the
reporter, (maybe I missed it).

Meanwhile, we have seen that there is a bug in the positioning of
glyphs when taking the original UbuntuDesktop.pdf file, and running it
through poppler and cairo to produce a PostScript file. Adrian will
debug that problem in the next day or two. And if we're lucky, a fix
for that might happen to address the problem with the printer.

-Carl

Revision history for this message
In , Carl Worth (cworth) wrote :

(In reply to comment #3)
> Meanwhile, we have seen that there is a bug in the positioning of
> glyphs when taking the original UbuntuDesktop.pdf file, and running it
> through poppler and cairo to produce a PostScript file. Adrian will
> debug that problem in the next day or two. And if we're lucky, a fix
> for that might happen to address the problem with the printer.

Adrian's fix for that bug has landed now. The underlying causes were
quite involved. See:

 http://gitweb.freedesktop.org/?p=cairo;a=commit;h=0d5902b7167f8cb4bfc96fd813003cd220441151

I don't know if Adrian has any guess as to whether this fix might have
reduced the likelihood of the PostScript file crashing a printer. But
it's definitely worth a shot if the original reporter could try to
replicate the problem with this fix in place. (We'll have a new cairo
snapshot with this fix in it momentarily.)

Thanks again,

-Carl

Revision history for this message
In , Sebastien Bacher (seb128) wrote :

Thank you for your work on the issue. I can confirm that the current git version fixes the glyph positioning bug, I'll try the people who have the printing issue at the office to try again tomorrow and update the bug

Revision history for this message
In , Sebastien Bacher (seb128) wrote :

ups typo in the previous comment ,I'll ask them to try them to try again rather ;-)

Revision history for this message
In , Carl Worth (cworth) wrote :

(In reply to comment #5)
> Thank you for your work on the issue. I can confirm that the current git
> version fixes the glyph positioning bug, I'll try the people who have the
> printing issue at the office to try again tomorrow and update the bug

And the fix is in the 1.5.18 snapshot now, so that might make it even easier for them to test the fix.

-Carl

Revision history for this message
In , Chris Jones (cmsj) wrote :

(I am the original reporter of the Launchpad bug)

Sebastian provided me with a PS produced by cairo git and unfortunately it still hard crashes the printer.

FWIW we have reported this to Xerox and sent them the PS file. They have confirmed it crashes their lab machines and will work on some kind of fix, but there is no ETA and no indication if the fix will be to reject whatever it is that is confusing the printer, or to actually print it.

Revision history for this message
In , Adrian Johnson (ajohnson-redneon) wrote :

(In reply to comment #8)
> FWIW we have reported this to Xerox and sent them the PS file. They have
> confirmed it crashes their lab machines and will work on some kind of fix, but
> there is no ETA and no indication if the fix will be to reject whatever it is
> that is confusing the printer, or to actually print it.

If they can tell us what it is in the PostScript file that is causing the crash we may be able to implement a workaround.

Revision history for this message
In , Chris Jones (cmsj) wrote :

I have asked the Xerox support engineer I am in contact with if he can get some information for me about what exactly is crashing the printer.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Updating the bug. I've tried to print the example to a ps on my hardy, the result is working correctly but has glyph positioning issues. I've raised the issue and fixed the bug, the fix is available in the new cairo version which will be uploaded to hardy soon. Now the ps is rendered correctly and upstream doesn't have issues when printing it (neither they did before fixing the glyph positioning), so it's possible that the bug is a printer one.
They are wanting to fix other cairo issues but they need somebody providing extra informations on how the ps is supposed to be broken since they don't have the issues.

Does anybody have an idea of what is incorrect in the ps sent to the printer exactly? Could you subscribe to the upstream bug and try to reply to their questions there if you can?

Revision history for this message
Chris Jones (cmsj) wrote :

testing a Postscript file generated with upstream cairo with the glyph positioning bug fixed, the printer is still crashing.
I have responded to the upstream developers on the freedesktop bug.

Revision history for this message
In , Carl Worth (cworth) wrote :

(In reply to comment #8)
> Sebastian provided me with a PS produced by cairo git and unfortunately it
> still hard crashes the printer.
>
> FWIW we have reported this to Xerox and sent them the PS file. They have
> confirmed it crashes their lab machines and will work on some kind of fix, but
> there is no ETA and no indication if the fix will be to reject whatever it is
> that is confusing the printer, or to actually print it.

Hi Chris,

While we're waiting to hear back from Xerox, there's some more
debugging we can do as well.

First, if you could post for me a cairo-produced PostScript file
(produced after the bugfix described above preferably), then I'll
start pasing that PostScript file around to see if I can find other
people with access to printers which crash with this file.

Also, then the next step, (for someone with access to a crashing
printer), would be to produce as minimal a file as possible that
preserves the crash. This can be done by removing as many elements as
possible within whatever application originally produced the file. And
after that, by manually trimming the PostScript file down. We can help
with the manual-trimming process, but this will go a lot faster if
someone can do that with direct access to a printer, (to verify that
the result after trimming still crashes).

If we can get a truly minimal PostScript file out of that process,
then hopefully we'll be able to find a tweak to it to avoid the crash,
and then put a workaround into cairo for that.

Thanks,

-Carl

Revision history for this message
Sean Sosik-Hamor (sciri) wrote :

Confirmed with xerox-killer-hardy.ps on our Xerox WorkCentre 7328 as well. Printing from evince on Hardy makes the printer seriously angry and hard crashes with error 116-357 requiring a cold reboot.

Revision history for this message
In , Chris Jones (cmsj) wrote :

Adrian sent a patched version of the postscript to the Launchpad bug which does not crash the printer and also prints properly:

--- xerox-killer-hardy.ps 2008-04-10 13:37:52.000000000 +0100
+++ xerox-killer-hardy-patched.ps 2008-04-11 11:40:50.000000000 +0100
@@ -44,7 +44,7 @@
   } forall
 } bind def
 /Td { moveto } bind def
-/Tm { 6 array astore cairo_font exch selectfont 0 0 moveto } bind def
+/Tm { 6 2 roll 0 0 6 array astore cairo_font exch selectfont moveto } bind def
 /g { setgray } bind def
 /rg { setrgbcolor } bind def
 %%EndProlog

Revision history for this message
In , Adrian Johnson (ajohnson-redneon) wrote :

Created an attachment (id=15833)
Fix printer crash

The attached patch is the proposed patch to fix the printer crash bug. Please test and confirm that it fixes the crash and PDFs print out correctly with all glyphs correctly positioned.

Revision history for this message
In , Chris Jones (cmsj) wrote :

my testcase no longer crashes the printer, so I believe this patch is good. Thanks very much Adrian!

Revision history for this message
In , Adrian Johnson (ajohnson-redneon) wrote :
Revision history for this message
Adrian Johnson (ajohnson-redneon) wrote :

I'm attaching a copy of the xerox-killer-hardy.ps file that has been modified to include a possible fix for the crash.

Please test.

Revision history for this message
Chris Jones (cmsj) wrote :

Adrian: Thanks very much, that appears to work! I can print the patched version without any flames erupting from the printer, and the document does actually print as expected.

Does this mean that a cairo fix can be produced?

Revision history for this message
Sebastien Bacher (seb128) wrote :

Could you explain what you changed and why?

Revision history for this message
Adrian Johnson (ajohnson-redneon) wrote :

See the patch in the cairo bugzilla for the what changed and why.

Revision history for this message
Sebastien Bacher (seb128) wrote :

thanks Adrian, I read about the ps diff and comment just before reading about the patch, that seems to work and is very appreciated, I'll include the patch to the 1.6.0 upload to hardy

Changed in libcairo:
status: Confirmed → Fix Released
Chris Jones (cmsj)
Changed in cairo:
status: Triaged → Fix Released
Changed in libcairo:
importance: Unknown → Medium
Changed in libcairo:
importance: Medium → Unknown
Changed in libcairo:
importance: Unknown → Medium
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.