Last Comment Bug 657041 - "ASSERTION: invalid call to GetPreferredStretchSize"
: "ASSERTION: invalid call to GetPreferredStretchSize"
Status: RESOLVED FIXED
: assertion, testcase
Product: Core
Classification: Components
Component: MathML (show other bugs)
: Trunk
: x86 All
: -- normal (vote)
: mozilla6
Assigned To: Karl Tomlinson (:karlt)
:
: Anthony Jones (:kentuckyfriedtakahe, :k17e)
Mentors:
Depends on:
Blocks: 347580 541620
  Show dependency treegraph
 
Reported: 2011-05-13 15:41 PDT by Jesse Ruderman
Modified: 2011-05-22 16:20 PDT (History)
2 users (show)
karlt: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (124 bytes, application/xhtml+xml)
2011-05-13 15:41 PDT, Jesse Ruderman
no flags Details
initialize with NS_MATHML_STRETCH_ALL_CHILDREN_VERTICALLY for when InheritAutomaticData does not get called (1.98 KB, patch)
2011-05-15 20:41 PDT, Karl Tomlinson (:karlt)
fred.wang: review+
Details | Diff | Splinter Review

Description Jesse Ruderman 2011-05-13 15:41:52 PDT
Created attachment 532368 [details]
testcase

###!!! ASSERTION: invalid call to GetPreferredStretchSize: 'NS_MATHML_IS_EMBELLISH_OPERATOR(mEmbellishData.flags) || stretchAll', file /builds/slave/cen-osx64-dbg/build/layout/mathml/nsMathMLContainerFrame.cpp, line 251

A recent patch changed the assertion:

changeset:   http://hg.mozilla.org/mozilla-central/rev/7835a2b7db2d
user:        Karl Tomlinson
date:        Fri May 13 12:01:08 2011 +1200
summary:     bug 654928: don't assume that the embellished operator is the first child r=fred

Stack:

nsMathMLContainerFrame::GetPreferredStretchSize [layout/mathml/nsMathMLContainerFrame.cpp:252]
nsMathMLmfencedFrame::Reflow [layout/mathml/nsMathMLmfencedFrame.cpp:318]
nsLineLayout::ReflowFrame [layout/generic/nsLineLayout.cpp:852]
nsBlockFrame::ReflowInlineFrame [layout/generic/nsBlockFrame.cpp:3821]
nsBlockFrame::DoReflowInlineFrames [layout/generic/nsBlockFrame.cpp:3617]
nsBlockFrame::ReflowInlineFrames [layout/generic/nsBlockFrame.cpp:3485]
nsBlockFrame::ReflowLine [layout/generic/nsBlockFrame.cpp:2569]
nsBlockFrame::ReflowDirtyLines [layout/generic/nsBlockFrame.cpp:1995]
nsBlockFrame::Reflow [layout/generic/nsBlockFrame.cpp:1075]
nsBlockReflowContext::ReflowBlock [layout/generic/nsBlockReflowContext.cpp:296]
nsBlockFrame::ReflowBlockFrame [layout/generic/nsBlockFrame.cpp:3206]
nsBlockFrame::ReflowLine [layout/generic/nsBlockFrame.cpp:2513]
nsBlockFrame::ReflowDirtyLines [layout/generic/nsBlockFrame.cpp:1995]
nsBlockFrame::Reflow [layout/generic/nsBlockFrame.cpp:1075]
nsContainerFrame::ReflowChild [layout/generic/nsContainerFrame.cpp:959]
nsCanvasFrame::Reflow [layout/generic/nsCanvasFrame.cpp:458]
nsContainerFrame::ReflowChild [layout/generic/nsContainerFrame.cpp:959]
nsHTMLScrollFrame::ReflowScrolledFrame [layout/generic/nsGfxScrollFrame.cpp:546]
nsHTMLScrollFrame::ReflowContents [layout/generic/nsGfxScrollFrame.cpp:672]
nsHTMLScrollFrame::Reflow [layout/generic/nsGfxScrollFrame.cpp:879]
nsContainerFrame::ReflowChild [layout/generic/nsContainerFrame.cpp:959]
ViewportFrame::Reflow [layout/generic/nsViewportFrame.cpp:225]
PresShell::DoReflow [layout/base/nsPresShell.cpp:8005]
PresShell::ProcessReflowCommands [layout/base/nsPresShell.cpp:8137]
PresShell::FlushPendingNotifications [layout/base/nsPresShell.cpp:4869]
DocumentViewerImpl::LoadComplete [layout/base/nsDocumentViewer.cpp:993]
nsDocShell::EndPageLoad [docshell/base/nsDocShell.cpp:6058]
nsDocShell::OnStateChange [docshell/base/nsDocShell.cpp:5917]
nsDocLoader::FireOnStateChange [uriloader/base/nsDocLoader.cpp:1323]
nsDocLoader::doStopDocumentLoad [uriloader/base/nsDocLoader.cpp:958]
nsDocLoader::DocLoaderIsEmpty [uriloader/base/nsDocLoader.cpp:825]
nsDocLoader::OnStopRequest [uriloader/base/nsDocLoader.cpp:710]
nsLoadGroup::RemoveRequest [netwerk/base/src/nsLoadGroup.cpp:680]
nsDocument::DoUnblockOnload [content/base/src/nsDocument.cpp:7342]
nsDocument::UnblockOnload [content/base/src/nsDocument.cpp:7280]
nsDocument::DispatchContentLoadedEvents [content/base/src/nsDocument.cpp:4195]
nsRunnableMethodImpl<void (nsDocument::*)(),true>::Run [nsThreadUtils.h:346]
nsThread::ProcessNextEvent [xpcom/threads/nsThread.cpp:618]
NS_ProcessPendingEvents_P [obj-firefox/xpcom/build/nsThreadUtils.cpp:200]
nsBaseAppShell::NativeEventCallback [widget/src/xpwidgets/nsBaseAppShell.cpp:131]
nsAppShell::ProcessGeckoEvents [widget/src/cocoa/nsAppShell.mm:423]
CoreFoundation + 0x4e401
CoreFoundation + 0x4c5f9
CoreFoundation + 0x4bdbf
HIToolbox + 0x2e7ee
HIToolbox + 0x2e5f3
HIToolbox + 0x2e4ac
AppKit + 0x43e64
-AppKit + 0x437a9
-AppKit + 0x948b
nsAppShell::Run [widget/src/cocoa/nsAppShell.mm:769]
nsAppStartup::Run [toolkit/components/startup/nsAppStartup.cpp:224]
XRE_main [toolkit/xre/nsAppRunner.cpp:3698]
main [browser/app/nsBrowserApp.cpp:159]
Comment 1 Frédéric Wang (:fredw) 2011-05-13 23:33:13 PDT
It seems that 

mPresentationData.flags |= NS_MATHML_STRETCH_ALL_CHILDREN_VERTICALLY

is done in nsMathMLmfencedFrame::InheritAutomaticData and this should prevent this assertion.

Maybe the function is not called in that testcase.
Comment 2 Karl Tomlinson (:karlt) 2011-05-15 20:33:48 PDT
Yes, it won't get called when the parent is not a mathml frame to call RebuildAutomaticDataForChildren.
Comment 3 Karl Tomlinson (:karlt) 2011-05-15 20:41:26 PDT
Created attachment 532556 [details] [diff] [review]
initialize with NS_MATHML_STRETCH_ALL_CHILDREN_VERTICALLY for when InheritAutomaticData does not get called
Comment 4 Frédéric Wang (:fredw) 2011-05-15 23:19:56 PDT
Comment on attachment 532556 [details] [diff] [review]
initialize with NS_MATHML_STRETCH_ALL_CHILDREN_VERTICALLY for when InheritAutomaticData does not get called

Review of attachment 532556 [details] [diff] [review]:
-----------------------------------------------------------------
Comment 5 Karl Tomlinson (:karlt) 2011-05-22 16:20:21 PDT
http://hg.mozilla.org/mozilla-central/rev/7ca8b0d24bd9

Note You need to log in before you can comment on or make changes to this bug.