Closed Bug 323652 Opened 19 years ago Closed 17 years ago

Print Preview or Print hangs with 100% CPU load

Categories

(Core :: Printing: Output, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: sbkwi, Assigned: sharparrow1)

References

()

Details

(Keywords: hang, testcase, Whiteboard: [fixed by the patch in bug 285608])

Attachments

(5 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; de; rv:1.8) Gecko/20051111 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; de; rv:1.8) Gecko/20051111 Firefox/1.5

Print Preview or Print hangs with 100% CPU load. Printer is Canon i560. The same is on another computer with the Mozilla Suite 1.7.12.

Reproducible: Always

Steps to Reproduce:
1. Go to http://http://de.wikipedia.org/wiki/Bruttoinlandsprodukt
2. Select "Print Preview" or "Print"


Actual Results:  
Firefox/Mozilla hangs with 100% CPU load

Expected Results:  
Firefox/Mozilla prints the selected pages
I can confirm this Bug on WinXP SP2 with
Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8) Gecko/20051111 Firefox/1.5
and
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060116 Firefox/1.5.0.1
using a new and an old profile

Can someone confirm it with non Windows Versions?

I am currently working on an easy testcase.
I can also confirm for:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060110 Firefox/1.6a1
Hard and long work, to get this minimum testcase for this Bug dependig on the html and css from the wiki article ;-)
You also need the testimage.
Attached image Image for the Testcase
You need this Image to get the testcase working.
Attached file test case
This is a (sanitized) test case edited from a real page in our intranet. It looks ugly because all the css is missing, but it hangs nevertheless.
I also checked under Linux and it hangs there too.
Both windows and linux started with -safe-mode, ca (catalan) locale.
I never print but there are people here that like to :-( so this is holding back a complete upgrade to 1.5.
(In reply to comment #5)

> This is a (sanitized) test case edited from a real page in our intranet. It
> looks ugly because all the css is missing, but it hangs nevertheless.

Could you please minimize your testcase.
I am not sure if this is the same Bug because my testcase isn't working without css.

> I also checked under Linux and it hangs there too.
Checked with your tescase? Or the http:///de.wikipedia.org/wiki/Bruttoinlandsprodukt article? Or both?
Attached file Test case reduced
I now reduced the test case to a single table. One interesting thing to note is that it depends on the size of the page, i.e: I've been adding lines to the table to see when it stopped printing. When everything fit in a single page, it previews ok, then, with some more lines, the first page is blank (minus the title) and the table is completely on the second page, then, with even more lines, it doesn't work (it stays forever in the "preparing page" state).
I first tested it under windows, then I had to add more lines to make it crash under Linux.
(In reply to comment #6)

> I am not sure if this is the same Bug because my testcase isn't working without
> css.

maybe it depends on the layout of the page, and a table is enough to trigger it even without css (especially since I'm using rowspan and colspan). If read my comment #7 it seems it depends on the size of the table (if it fits one page or not). It could well depend on the size of the div.
 
> > I also checked under Linux and it hangs there too.
> Checked with your tescase? Or the
> http:///de.wikipedia.org/wiki/Bruttoinlandsprodukt article? Or both?

I first checked with my testcase, but now I can confirm that it happens also on the wikipedia page.

(In reply to comment #8)

> I first checked with my testcase, but now I can confirm that it happens also on
> the wikipedia page.

Can someone please change:

- OS to ALL
- Product to Core ?
- Component: Print Preview ?
Component: General → Print Preview
OS: Windows 2000 → All
Product: Firefox → Core
Version: unspecified → 1.0 Branch
(In reply to comment #9)
> (In reply to comment #8)
> 
> > I first checked with my testcase, but now I can confirm that it happens also on
> > the wikipedia page.
> 
> Can someone please change:
> 
> - OS to ALL
> - Product to Core ?
> - Component: Print Preview ?
> 
Which branch is it? Probably not 1.0?
(In reply to comment #10)

> Which branch is it? Probably not 1.0?

This Bug occurs on 1.8 Branch(Firefox 1.5) and also on the Trunk.

Version: 1.0 Branch → 1.8 Branch
I suppose that "Core" already means that, but I just try to print a message with the test case from thunderbird 1.5 and it hangs there too (both windows and linux).
I'd say the severity is major or critical.
Oh, and it doesn't happen only for print preview, also for print.
Severity: normal → critical
Nice bug-finding.  Those testcases are for different bugs, though.  I'm going to file separate bugs for them and mark them as blocking this bug.
Component: Print Preview → Layout: Tables
Assignee: nobody → printing
Component: Layout: Tables → Printing
QA Contact: general
Hardware: PC → All
Version: 1.8 Branch → Trunk
Depends on: 331039
Depends on: 331041
In beta 2 my test case doesn't hang anymore, unfortunately both the real page in my intranet and the wikipedia page still hang.
Is anybody working on this? (I still have to deploy firefox 1.0.7: if I upgrade I'll have to tell my users to use internet explorer to print and I'd like to avoid that).
Firefox 2.0b2 on Linux hangs on all three testcases.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: hang, testcase
Blocks: 350684
I can confirm the same result as in comment 14 with the trunk build
As I fopund out in bug 350684 hanging depends on scale factor, and is different between Firefox and Seamonkey. I used some scale faktors from the menu, to find the range, then after killing the browser I restarted and used Custom Scale Factor to narrow the range.

tested on Attachment 208737 [details] Reduced Testcase, screen resolution 800x600, Printer Canon BJ 330:

up to 60% working, from 80% hanging
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1b2) Gecko/20060901 BonEcho/2.0b2

up to 55% working, from 58% hanging
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1b2) Gecko/20060901 SeaMonkey/1.1b
(In reply to comment #14)
> In beta 2 my test case doesn't hang anymore, unfortunately both the real page
> in my intranet and the wikipedia page still hang.

https://bugzilla.mozilla.org/attachment.cgi?id=208730&action=view doesn't hang, but your intranet page still does?  On which version?  If I'm understanding correctly, a new testcase is needed for your intranet page.  (If you don't have the time to reduce it, feel free to attach a zip of a saved version or something like that.)
Sorry I wasn't clear enough, I was referring to the reduced test case https://bugzilla.mozilla.org/attachment.cgi?id=208737, but that was with beta 2 under windows.
Now I'm at home and don't have windows available, and both test cases hang under linux with beta2, they do not with the trunk.
However the wikipedia page still hangs either with beta 2 or the trunk.
Can you get a reduced testcase that hangs on trunk?
(In reply to comment #19)
> Sorry I wasn't clear enough, I was referring to the reduced test case
> https://bugzilla.mozilla.org/attachment.cgi?id=208737, but that was with beta 2
> under windows.
> Now I'm at home and don't have windows available, and both test cases hang
> under linux with beta2, they do not with the trunk.
> However the wikipedia page still hangs either with beta 2 or the trunk.

Okay, I think I understand.  Then, I guess there's nothing more to be done about that testcase (except possibly figuring out what patch fixed it and trying to get it on the branch).  It would be nice if your could check your intranet page with the trunk, though.

(In reply to comment #20)
> Can you get a reduced testcase that hangs on trunk?
> 

Sorry, this bug is kind of a mess.  See bug 331039 for a testcase based on the Wikipedia page.

What happened in this bug was that two different print preview hang bugs ended up in the same bug report, so I split it by filing two new bugs and making them block this one.  One of the bugs in here seems to be fixed now, but the other isn't fixed.
> Okay, I think I understand.  Then, I guess there's nothing more to be done
> about that testcase (except possibly figuring out what patch fixed it and
> trying to get it on the branch).  It would be nice if your could check your
> intranet page with the trunk, though.

The intranet page doesn't hang anymore. The only oddity (that doesn't bother me very much) is that on the first page there's only the theader, the data starts on the second page. I think that's because of a div with style "display:none" that's taken into account in the page layout (I have a test case for that)
(In reply to comment #22)
> The intranet page doesn't hang anymore. The only oddity (that doesn't bother me
> very much) is that on the first page there's only the theader, the data starts
> on the second page. I think that's because of a div with style "display:none"
> that's taken into account in the page layout (I have a test case for that)
> 

Go ahead and file a bug; even if it isn't important, it's still incorrect.
FYI, both with firefox 2 rc1 and the latest nightly, under windows:

- the original wikipedia page hangs 
- the "minimum test case for this bug" doesn't hang at less than 100% (portrait) but it does at 100% and with the "shrink to fit" option
- my test case (test case reduced) doesn't hang at any scale I tried

Following tests done only with the trunk:
- the testcase in bug 331039 doesn't hang at less than 70% (portrait) but it does at 70% and shrink to fit
- the testcase in bug 331041 doesn't hang
FWIW, I removed all the "rowspan"s from the tables in my intranet (from which I derived the "Test case reduced") and firefox 2 no longer hangs.
The bug is still there but at least now I can get rid of firefox 1.0.7.
The bug appears when the td element has a padding value in em
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1

Firefox hangs with high CPU usage trying to prepare the page for printing (see attachment id=250606).
From my quick tests I've seen it happens when the td element has a padding value expressed in em units. It dosn't happen if you change the em to px
sorry, it also presents the same behaviour with the padding value set to 10px
Blocks: 367508
Blocks: 368515
There are older bugs like bug 255982 and its dependencies, which still apply too. :(
I don't have a printer installed, but I experience a hang when trying to print preview http://www.polisource.com/consumer-protection.shtml with Firefox 2.0.0.2. I don't use em.
Same behaviour here with WinXP FF 2.0.0.3 at <http://en.wikipedia.org/w/index.php?title=Cambridge&printable=yes>:

Hang with 100% CPU load when printing or print previewing.
Flags: blocking1.9?
Flags: blocking1.9? → blocking1.9+
Repro'd this 100% CPU pegging on print preview on the trunk.  Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a6pre) Gecko/20070613 Minefield/3.0a6pre.    
dbaron says that this seems like it's very specific to the default font size; I can't reproduce this on win32 (either print preview or print).
Assignee: printing → sharparrow1
(In reply to comment #35)
> dbaron says that this seems like it's very specific to the default font size; I
> can't reproduce this on win32 (either print preview or print).

What exactly are you trying? Easy to reproduce here on Win32 with either the URL (http://de.wikipedia.org/wiki/Bruttoinlandsprodukt) or attachment 215587 [details] (off the dependency bug 331039).  The table testcases don't hang anymore because of the fix to bug 331041.

Note that this is actually a float pagination issue, not a printing issue, so I'm not really an expert here.  I'll take a shot at it, though.  (I recall I tried to figure it out once before, but got very confused by the interaction between the float code and line layout.)
Note that this will get "fixed" by the patch in bug 285608.
Depends on: 285608
No longer depends on: 331039
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a7pre) Gecko/2007071105 Minefield/3.0a7pre

I get no hangs with any of the attached testcases. Taking Eli's word in comment 37 that bug 285608 fixed this and marking as FIXED.

->FIXED
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: [fixed by the patch in bug 285608]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: