[FIX]CSS2 fixed div, multiple physical pages, Print Preview crashes Moz

VERIFIED FIXED in mozilla1.4beta

Status

()

Core
Layout: R & A Pos
P1
critical
VERIFIED FIXED
15 years ago
10 years ago

People

(Reporter: Chris Applegate, Assigned: bz)

Tracking

({crash, regression, testcase})

Trunk
mozilla1.4beta
x86
All
crash, regression, testcase
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030404
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030404

I have observed this with 1.3 and the 4 April 2003 nightly. It occurs with a
page with a fixed DIV at the top, and lots of text beneath, enough that a
printout would be 2 pages long (checked in IE). Doing a Print Preview crashes
the browser. If the text below the fixed DIV is trimmed down to one page, the
Print Preview works.

Reproducible: Always

Steps to Reproduce:
1. Load testcase.html.
2. Select File->Print Preview.
3.

Actual Results:  
The "Preparing Print Preview" alert appears, and after several seconds, Mozilla
crashes.

Expected Results:  
Mozilla should show the print preview. Hopefully it will be rendered correctly,
but the crash is the immediate concern.

OS is Windows XP SP1.

Talkback ID TB18827459G
(Reporter)

Comment 1

15 years ago
Created attachment 119548 [details]
Test Case

Comment 2

15 years ago
Confirming in 2003040105 PC/WinXP
TB18828083Y
added kw crash
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: crash

Comment 3

15 years ago
Created attachment 119558 [details]
stacktrace

(gdb) p mStyleContext
Cannot access memory at address 0x0

Comment 4

15 years ago
printing also crashes, crash on linux (20030404)

==> printing
Component: Print Preview → Printing
Keywords: regression
OS: Windows XP → All
This is a layout bug...

The problem is that fixed-pos printing creates placeholder frames which are not
inside a blockframe -- they are the kids of a pageContentFrame....
Assignee: printing → position
Component: Printing → Layout: R & A Pos
QA Contact: sujay → ian
taking...
Assignee: position → bzbarsky
Priority: -- → P1
Summary: CSS2 fixed div, multiple physical pages, Print Preview crashes Moz → [FIX]CSS2 fixed div, multiple physical pages, Print Preview crashes Moz
Target Milestone: --- → mozilla1.4beta
Attachment #119570 - Flags: superreview?(roc+moz)
Attachment #119570 - Flags: review?(roc+moz)
Comment on attachment 119570 [details] [diff] [review]
Proposed fix

+  if (firstFixed) {

Why not just move this up and make it into an early exit before you construct
the state? You could move the frame list construction down below the early
exit, too.

What will it take to fix the placeholder positioning? It seems like we'd need
to have all the fixed-position frames share the same placeholder at its
original location.

Hmm, what happens if we have a document with a fixed-position element whose
placeholder is not on the first page?
Attachment #119570 - Flags: superreview?(roc+moz)
Attachment #119570 - Flags: superreview+
Attachment #119570 - Flags: review?(roc+moz)
Attachment #119570 - Flags: review+
> What will it take to fix the placeholder positioning?

Well... The spec is so totally ambiguous on what should happen there, that it's
not worth worrying about, imo.  I've spent some time trying to think of
reasonable behaviors in print mode, and I have yet to think of one.

> Hmm, what happens if we have a document with a fixed-position element whose
> placeholder is not on the first page?

Chances are, it starts showing up only on the page where its placeholder is or
after....

Moved the check into an early return, and checked in.
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED

Comment 10

15 years ago
No crash on winXP with 2003-06-09-04trunk build.
Verifying.
Status: RESOLVED → VERIFIED
Keywords: testcase

Updated

10 years ago
Flags: in-testsuite?

Comment 11

10 years ago
There's a crashtest for this bug (layout/reftests/bugs/200774-1.html).
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.