Closed
Bug 337419
Opened 19 years ago
Closed 19 years ago
[FIX] Crash with float, columns, and a feed [@ nsFontMetricsMac::Init] [@ nsUnicodeFontMappingMac::GetFontID] [@ nsIFrame::AddStateBits] [@ nsTextStyle::nsTextStyle]
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
People
(Reporter: jruderman, Assigned: MatsPalmgren_bugz)
References
Details
(4 keywords, Whiteboard: [sg:critical])
Crash Data
Attachments
(5 files)
321 bytes,
text/html
|
Details | |
4.17 KB,
text/plain
|
Details | |
7.50 KB,
text/plain
|
Details | |
21.10 KB,
patch
|
roc
:
review+
roc
:
superreview+
dveditz
:
approval1.8.0.7+
mtschrep
:
approval1.8.1+
|
Details | Diff | Splinter Review |
9.97 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
This testcase causes a crash with a varying signature and sometimes with a random address on top.
Reporter | ||
Comment 1•19 years ago
|
||
Reporter | ||
Updated•19 years ago
|
Flags: blocking1.9a2?
Whiteboard: [sg:critical]
Reporter | ||
Comment 2•19 years ago
|
||
I'm curious why it matters that the page has a feed.
Reporter | ||
Comment 3•19 years ago
|
||
Still crashes a trunk nightly on Mac, Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20060602 Minefield/3.0a1.
Does not crash on Windows.
Summary: Crash with float, columns, and a feed [@ nsFontMetricsMac::Init] [@ nsUnicodeFontMappingMac::GetFontID] [@ nsIFrame::AddStateBits] → Crash with float, columns, and a feed [@ nsFontMetricsMac::Init] [@ nsUnicodeFontMappingMac::GetFontID] [@ nsIFrame::AddStateBits] [@ nsTextStyle::nsTextStyle]
Reporter | ||
Comment 4•19 years ago
|
||
Reporter | ||
Comment 5•19 years ago
|
||
Also crashes on Linux, at least using a build modified for use with Valgrind. I'll attach a Valgrind log shortly.
Reporter | ||
Comment 6•19 years ago
|
||
This looks like a bit of a mess -- CreateContinuingFrame often doesn't set its out parameter when it returns failure, but callers check the otherwise uninitialized out parameter rather than the nsresult.
It's also worth figuring out why it's failing, though.
Reporter | ||
Comment 8•19 years ago
|
||
Still crashes on trunk, despite recent fixes for column-related crashes.
OS: Mac OS X 10.4 → All
Hardware: Macintosh → All
Reporter | ||
Comment 9•19 years ago
|
||
Now it crashes even without the feed, and fires this assertion shortly before crashing:
###!!! ASSERTION: unexpected frame type: 'PR_FALSE', file /Users/admin/trunk/mozilla/layout/base/nsCSSFrameConstructor.cpp, line 11152
Reporter | ||
Comment 10•19 years ago
|
||
CCing Mats, who fixed bug 348688, in the hope that he'll be interested in fixing this float-related crash as well.
Assignee | ||
Updated•19 years ago
|
Assignee: nobody → mats.palmgren
Assignee | ||
Updated•19 years ago
|
Flags: blocking1.8.1?
Flags: blocking1.8.0.7?
Summary: Crash with float, columns, and a feed [@ nsFontMetricsMac::Init] [@ nsUnicodeFontMappingMac::GetFontID] [@ nsIFrame::AddStateBits] [@ nsTextStyle::nsTextStyle] → [FIX] Crash with float, columns, and a feed [@ nsFontMetricsMac::Init] [@ nsUnicodeFontMappingMac::GetFontID] [@ nsIFrame::AddStateBits] [@ nsTextStyle::nsTextStyle]
Assignee | ||
Comment 11•19 years ago
|
||
1. Make all CreateContinuingFrame() callers check the returned error code.
This patch fixes the crash but the float is not rendered.
I think it's a safe fix for branches.
The reason we fail to render the float is that the out-fo-flow is a
nsHTMLScrollFrame which we can't create a continuation for.
So with this patch we still get these two assertions:
###!!! ASSERTION: unexpected frame type: 'Not Reached', file nsCSSFrameConstructor.cpp, line 11185
###!!! ASSERTION: reflow dirty lines failed: 'NS_SUCCEEDED(rv)', file nsBlockFrame.cpp, line 916
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/layout/generic/nsBlockReflowState.cpp&rev=3.514&root=/cvsroot&mark=654-661#623
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/layout/generic/nsBlockFrame.cpp&rev=3.787&root=/cvsroot&mark=4231,4240,4242-4243#4230
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/layout/generic/nsBlockFrame.cpp&rev=3.787&root=/cvsroot&mark=4318,4322#4317
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/layout/generic/nsHTMLContainerFrame.cpp&rev=3.217&root=/cvsroot&mark=338,351-352#337
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/layout/base/nsCSSFrameConstructor.cpp&rev=1.1251&root=/cvsroot&mark=11119-11132,11152-11153#11118
Attachment #234872 -
Flags: superreview?(bzbarsky)
Attachment #234872 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 12•19 years ago
|
||
1. Make scroll frames non-splittable.
2. Make a placeholder splittable only if the out-of-flow is.
3. If a float placeholder is not splittable then place it immediately
instead of failing to reflow it because it can't be split.
This patch makes us render the testcase without any assertions
(together with Patch A), but is probably more risky.
BTW, maybe we should change:
NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const;
to
nsSplittableType GetSplittableType() const;
It's only used within layout/ and always return NS_OK as far as I can see.
Attachment #234873 -
Flags: superreview?(roc)
Attachment #234873 -
Flags: review?(bzbarsky)
![]() |
||
Comment 13•19 years ago
|
||
roc should probably just review all of these...
Comment on attachment 234872 [details] [diff] [review]
Patch A, rev. 1
+ nsresult rv = aPresContext.PresShell()->FrameConstructor()->
CreateContinuingFrame(&aPresContext, &aRowFrame, this, aContRowFrame);
- if (!*aContRowFrame) return;
+ if (NS_FAILED(rv)) {
+ return;
+ }
Set *aContRowFrame to nsnull before this return, and check callers to make sure they check that.
Attachment #234872 -
Flags: superreview?(bzbarsky)
Attachment #234872 -
Flags: superreview+
Attachment #234872 -
Flags: review?(bzbarsky)
Attachment #234872 -
Flags: review+
Comment on attachment 234873 [details] [diff] [review]
Patch B, rev. 1
looks good
Attachment #234873 -
Flags: superreview?(roc)
Attachment #234873 -
Flags: superreview+
Attachment #234873 -
Flags: review?(bzbarsky)
Attachment #234873 -
Flags: review+
Assignee | ||
Comment 16•19 years ago
|
||
(In reply to comment #14)
> Set *aContRowFrame to nsnull before this return, and check callers
> to make sure they check that.
Good point. Patch A with the additional null assignment checked in
to trunk at 2006-08-21 18:33 PDT. (I'll hold Patch B for 24h to get nightlies)
Updated•19 years ago
|
Flags: blocking1.8.1? → blocking1.8.1+
Updated•19 years ago
|
Flags: blocking1.8.0.7? → blocking1.8.0.7+
Assignee | ||
Updated•19 years ago
|
Attachment #234872 -
Flags: approval1.8.1?
Attachment #234872 -
Flags: approval1.8.0.7?
Assignee | ||
Comment 17•19 years ago
|
||
"Patch B" checked in to trunk at 2006-08-23 22:22 PDT.
Filed bug 349973 on changing IsSplittable() signature.
-> FIXED
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Whiteboard: [sg:critical] → [sg:critical] [baking until 8/25]
Comment 18•19 years ago
|
||
Comment on attachment 234872 [details] [diff] [review]
Patch A, rev. 1
a=schrep for drivers
Attachment #234872 -
Flags: approval1.8.1? → approval1.8.1+
Comment 19•19 years ago
|
||
Comment on attachment 234872 [details] [diff] [review]
Patch A, rev. 1
approved for 1.8.0 branch, a=dveditz for drivers
Attachment #234872 -
Flags: approval1.8.0.7? → approval1.8.0.7+
Assignee | ||
Comment 20•19 years ago
|
||
Patch A: checked into to MOZILLA_1_8_BRANCH at 2006-08-25 13:21 PDT.
Keywords: fixed1.8.1
Assignee | ||
Comment 21•19 years ago
|
||
Patch A: checked in to MOZILLA_1_8_0_BRANCH at 2006-08-25 15:36 PDT.
Keywords: fixed1.8.0.7
Comment 22•18 years ago
|
||
v.fixed on both 1.8.0 and 1.8.1 branches with:
Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.7) Gecko/20060906 Firefox/1.5.0.7
Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1b2) Gecko/20060907 BonEcho/2.0b2
Updated•18 years ago
|
Group: security
Flags: in-testsuite?
Reporter | ||
Comment 23•17 years ago
|
||
Crashtest checked in.
Flags: in-testsuite?
Flags: in-testsuite+
Flags: blocking1.9a2?
Whiteboard: [sg:critical] [baking until 8/25] → [sg:critical]
Updated•14 years ago
|
Crash Signature: [@ nsFontMetricsMac::Init]
[@ nsUnicodeFontMappingMac::GetFontID]
[@ nsIFrame::AddStateBits]
[@ nsTextStyle::nsTextStyle]
You need to log in
before you can comment on or make changes to this bug.
Description
•