print from web-based flash application fails

Bug #598940 reported by ethanay on 2010-06-27
50
This bug affects 7 people
Affects Status Importance Assigned to Milestone
flashplugin-nonfree (Ubuntu)
High
Unassigned

Bug Description

Binary package hint: cups

When I try to print from http://www.noteflight.com/ (or any other flash-based web app) the printing process fails. Example:
http://www.noteflight.com/scores/view/76215fcd1165b64dccdb5e27f58d6158e2ec7099

Instead, what happens:
the print job is "held," CPU usage jumps, the hard drive thrashes, and the web-app freezes for a time
the print job is listed as "0k"
/var/spool/cups/ fills up with VERY large spool files (~900mb) that fill up the root filesystem and cause secondary problems with "low disk space" errors; the large file size is *independent* of print detail (dpi) settings
print resources are unavailable to web browsers until system restart

the bug appeared sometime in the last couple of CUPS updates. seems like it is not properly generating a postscript file?

Ubuntu discussion about the bug:
http://ubuntuforums.org/showthread.php?t=1515270

ethanay (ethan-y-us) wrote :

showing the large "garbage files" from the failed print process, that fill up the hard drive. Together these files are worth 3.8Gb, leaving 0kb free in my root filesystem.

$ sudo du -ak --exclude=/home/* / 2> /dev/null | sort -n | tail -30
[...snip uninteresting results...]
516048 /usr/src
538812 /var/spool/cups/d00508-001
673688 /var/spool/cups/d00511-001
916244 /var/spool/cups/d00500-001
916248 /var/spool/cups/d00513-001
916272 /var/spool/cups/d00514-001
1363088 /usr/lib
1536560 /usr/share
3671836 /usr
3962352 /var/spool/cups
3962540 /var/spool
4380176 /var
8498640 /

ethanay (ethan-y-us) wrote :

Cups error log attached

Till Kamppeter (till-kamppeter) wrote :

To clean up your disk space, run

cancel -a

in a terminal window or remove all jobs in the job viewer. This way the stuck jobs get canceled and their spool files removed.

Your error_log shows that Ghostscript is failing to convert the Postscript coming from the Flash Player to PDF. This stops the print jobs leaving the spool file on the disk. They stay there until reprinting or canceling the jobs. Reprinting would only work after replacing Ghostscript with a version which is capable of converting the files (would perhaps work if you update to Lucid, but you tell in the forum that you want to finish your project first).

I have also tried on a Karmik machine (64-bit) which also runs Ghostscript 8.70. For me printing the document which is accessed by your link works. It takes some time longer than most other print jobs but it comes out. According to "lpstat -o" my spool files are not so big as yours, around 58 MB. Due to a bug in the Flash Player it is always printed by the default printer and always the whole document, print queue or page selection in the Flash Player's printing dialog is already ignored by Flash. CUPS receives always the full job without any argument about the selected pages and probably also not with information about the selected print queue, but this is a Flash bug.

The spool files are the files which the applications send to CUPS, this means that your Flash Player sends 900-MB PostScript files to CUPS and my Flash Player sends only 58 MB, which is still to much for 5 pages of musical notes. Can you tell me which package version of Flash, Ghostscript, and Firefox do you have installed? Which steps did you exactly do to print from Noteflight?

Changed in cups (Ubuntu):
status: New → Incomplete
ethanay (ethan-y-us) wrote :

Thank you for the comment and info! Here is my response:

1. "cancel -a" removed only one 900mb file. All jobs have been canceled in the jobs viewer, but the other spool files remain:
$ sudo du -ak /var/spool/cups/ | sort -n
8 /var/spool/cups/tmp
538812 /var/spool/cups/d00508-001
673688 /var/spool/cups/d00511-001
916248 /var/spool/cups/d00513-001
916272 /var/spool/cups/d00514-001
3045108 /var/spool/cups/

So I deleted the remaining large files manually.

2. The error occurs whether printing to PDF or to a physical printer (e.g., my laser printer).

3. Is the Flash player bug (only prints to default printer) reported? I've noticed it for a while and have just changed the default printer as a (partial) workaround so I can print to PDF. Then I change the default printer again when finished. Also the lack of print options is frustrating, so I hope these other bugs can be resolved soon.

4. Package versions:
Flash: 10.1.53.64-1karmic1
Ghostscript: 8.70.dfsg.1-0ubuntu3
Firefox [note: problem occurs in Google Chrome as well]: 3.5.9+nobinonly-0ubuntu0.9.10.1

5. Printing process:
a. Open Noteflight score
b. Change default printer accordingly (Flash bug)
c. Click on File > Print
d. Click Print again

Till Kamppeter (till-kamppeter) wrote :

I do not know whether the Flash bug of not forwarding any parameters (printer and page selection) to CUPS is reported. I discovered it only when I tried to reproduce your bug.

My Flash version is 10.0.22.87. I will update and see what happens then.

Till Kamppeter (till-kamppeter) wrote :

Now, after the upgrade I have also the 900 MB print job files. I have looked into the file and the pages are uncompressed, hex-encoded 3x8-bit color bitmaps, the least efficient way to store images in a file. For me the file prints, with updated version even on the selected printer, but page selection does not work and it takes around 15 minutes until the first sheet (double-sided => 2 pages) comes out.

The real bug here is the inefficient way of Flash creating print jobs, even straight sending of the job to a PostScript printer without filters and CUPS takes ages. I have tried it and it took at least five minutes for the first sheet (double-sided => 2 pages) to come out. Second sheet is another five minutes and third another two minutes.

My Ghostscript version is the same as yours, 8.70.dfsg.1-0ubuntu3.

My box has 4G RAM and 5G swap.

Your crashes of Ghostscript can be due to missing resources (RAM, disk space).

The bug is in the Flash Player upstream.

Till Kamppeter (till-kamppeter) wrote :

One could perhaps turn this into a feature request on Ghostscript and Poppler to turn inefficiently made input files into a more efficient form so that PostScript or PDF printers can print them in a reasonable time or that one can attach a PDF file with the notes for one song to an e-mail.

Till Kamppeter (till-kamppeter) wrote :

Converting the 900 MB PostScript file with "ps2pdf13" (conversion takes several minutes) gives a 2 MB PDF file with the first page printing after around 30 sec and the resr printing immediately afterwards (printing directly to CUPS via "lpr file.pdf").

From the creator of PostScript and PDF one can expect much better PostScript than this.

Till Kamppeter (till-kamppeter) wrote :

Upstream bug of the Flash Player, cannot be fixed in Ubuntu.

Changed in cups (Ubuntu):
status: Incomplete → Invalid

PS PDF files created from Noteflight used to be around 3-400kB

Thank you, Till, for helping resolve the cause of this bug! How can I
report it upstream to Flash?

Ethan

On Thu, Jul 1, 2010 at 3:29 AM, Till Kamppeter <email address hidden> wrote:
> Upstream bug of the Flash Player, cannot be fixed in Ubuntu.
>
> ** Changed in: cups (Ubuntu)
>       Status: Incomplete => Invalid
>
> --
> print from web-based flash application fails
> https://bugs.launchpad.net/bugs/598940
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “cups” package in Ubuntu: Invalid
>
> Bug description:
> Binary package hint: cups
>
> When I try to print from http://www.noteflight.com/ (or any other flash-based web app) the printing process fails.  Example:
> http://www.noteflight.com/scores/view/76215fcd1165b64dccdb5e27f58d6158e2ec7099
>
> Instead, what happens:
> the print job is "held," CPU usage jumps, the hard drive thrashes, and the web-app freezes for a time
> the print job is listed as "0k"
> /var/spool/cups/ fills up with VERY large spool files (~900mb) that fill up the root filesystem and cause secondary problems with "low disk space" errors; the large file size is *independent* of print detail (dpi) settings
> print resources are unavailable to web browsers until system restart
>
> the bug appeared sometime in the last couple of CUPS updates. seems like it is not properly generating a postscript file?
>
> Ubuntu discussion about the bug:
> http://ubuntuforums.org/showthread.php?t=1515270
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/ubuntu/+source/cups/+bug/598940/+subscribe
>

ethanay, perhaps you should look at Adobe's web site where one can download Flash, there is perhaps also a possibility to report bugs.

ethanay (ethan-y-us) wrote :

bug reported upstream:
https://bugs.adobe.com/jira/browse/FP-4959

it would be much more accessible if there were some sort of upstream forwarding or reporting system, but that would require some interoperability standards between different bug tracking systems, i suppose...

ethanay (ethan-y-us) wrote :

change to flash to reflect origin of bug

affects: cups (Ubuntu) → adobe-flashplugin (Ubuntu)
ethanay (ethan-y-us) wrote :

Adobe has closed the bug: they say they can't reproduce it. any suggestions?

See also bug 625916 for problems with the printing facility of the Flash Player.

affects: adobe-flashplugin (Ubuntu) → flashplugin-nonfree (Ubuntu)
Changed in flashplugin-nonfree (Ubuntu):
status: Invalid → Confirmed
Changed in flashplugin-nonfree (Ubuntu):
importance: Undecided → High

Ethanay, I think a step is skipped for reproducing the error... I get this problem with my fathers computer. I reproduced it at home by creating a new Ubuntu install first, then installing flash. I am not sure how to do this, but how can we try older versions of the flashplugin and CUPS?

Go to https://launchpad.net/ubuntu/+source/flashplugin-nonfree (the Launchpad page for the package), click on one of the version numbers in the table or on "View full publishing history" at the upper right to get more version numbers. Then you are on thjs page of the selected version. Then click on your system's architecture under "Builds" on the right. Then click the package names under "Built files" and install the packages. But note that you will probably not be able to go arbitrarily old, as the packages need to work with your up-to-date system. Please tell which is the newest version with acceptable print file sizes.

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

Other bug subscribers