Closed Bug 285066 Opened 20 years ago Closed 20 years ago

printing crashes if linked stylesheet media attribute not specified [@ nsBlockFrame::SplitPlaceholder ]

Categories

(Core :: Printing: Output, defect)

1.7 Branch
x86
Windows XP
defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: daniel.willis, Unassigned)

References

Details

(Keywords: crash, testcase)

Crash Data

Attachments

(4 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3

If a number of stylesheets are specified as linked files in the header of an
HTML file, and one does not have a 'media' attribute specified, then the browser
will crash when attempting to print the page.

eg:
<link href="./style_screen.css" rel="stylesheet" type="text/css" />
<link href="./style_print.css" rel="stylesheet" type="text/css" media="print" />

... will crash, but this:

<link href="./style_screen.css" rel="stylesheet" type="text/css" media="print" />
<link href="./style_print.css" rel="stylesheet" type="text/css" media="print" />

... will not crash.

I had a look through the HTML 4.01 spec and it does not seem that the 'media'
attribute is mandatory. Therefore the browser should be able to cope with this
situation.



Reproducible: Always

Steps to Reproduce:

(see details above)
Actual Results:  
Browser crashed with and Application Error

Expected Results:  
Printed the page with the 'print' stylesheet.
Sorry - I've made a typo - these lines:

 
><link href="./style_screen.css" rel="stylesheet" type="text/css" media="print" />
><link href="./style_print.css" rel="stylesheet" type="text/css" media="print" />

..should read

<link href="./style_screen.css" rel="stylesheet" type="text/css" media="screen" />
<link href="./style_print.css" rel="stylesheet" type="text/css" media="print" />
Could you attach a testcase and re-test with a newer build from
http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/
If you can reproduce it with a recent build, please provide a talkback incident ID.
Assignee: bugs → printing
Severity: normal → critical
Component: File Handling → Printing
Keywords: crash
Product: Firefox → Core
QA Contact: aebrahim-bmo
Summary: Browser crash if linked stylesheet media attribute not specified → printing crashes if linked stylesheet media attribute not specified
Version: unspecified → 1.7 Branch
The only difference between the two is that the no-media-specified sheet will be
applied for printing.  So the real issue is just that we crash with some set of
style rules when printing.

We're going to need an actual html+css testcase (or url to such) to do anything
here...
This HTML file does not have a media attribute specified for its screen
stylesheet link tag. 
Under Firefox 0.9.3 install, it crashes, but I have tried it in the latest
nightly build, and it hangs, rather than crashes
This HTML file does a media attribute of value "screen" specified for its
screen stylesheet link tag. 
This does not hang or crash either 0.9.3 or the latest nightly build.
Attachment #176612 - Attachment description: This si the same file but fixed to print ok. → This is the same file but fixed to print ok.
This is probably relevant:

###!!! ASSERTION: Out of flow frame doesn't have the expected parent:
'outOfFlowFrame->GetParent() == aBlockParent', file
/home/bzbarsky/mozilla/xlib/mozilla/layout/generic/nsBlockFrame.cpp, line 6990

A minimal testcase would be nice, as usual.  ;)
Keywords: testcase
Summary: printing crashes if linked stylesheet media attribute not specified → printing crashes if linked stylesheet media attribute not specified [@ nsBlockFrame::SplitPlaceholder ]
Probably not worth minimizing more till that's fixed (and then only if this is
not fixed by the same patch).
Depends on: 265867
I guess that dependency is bogus bug 265867 is a clear wfm, Boris I guess you
fixed that allready.
With this testcase, I don't crash directly on print preview. But I crash when I
scroll down to the bottom in print preview.
Talkback ID: TB4207280G
http://talkback-public.mozilla.org/talkback/fastfind.jsp?search=2&type=iid&id=TB4207280G

Backtrace: nsContainerFrame::PaintChild
This gives bug 275560, bug 265973 and bug 2775560 for examples (all with
testcases). So I guess these ones could also be related.

Bernd, the testcase in bug 265867 crashes for me.
My debug build with the patch from bug 263825 doesn't crash anymore with at
least two of the testcases I tried. (alhtough I get tons of assertions)
Depends on: 263825
Fixed by the fix for bug 263825.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Crash Signature: [@ nsBlockFrame::SplitPlaceholder ]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: