Bug 215217 - [GTK][WPE] Mathml asserts with invisible operators
Summary: [GTK][WPE] Mathml asserts with invisible operators
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: MathML (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Arcady Goldmints-Orlov
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-08-06 08:10 PDT by Lauro Moura
Modified: 2021-12-06 17:58 PST (History)
7 users (show)

See Also:


Attachments
[fast-cq] Patch (3.97 KB, patch)
2021-12-06 14:51 PST, Arcady Goldmints-Orlov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lauro Moura 2020-08-06 08:10:29 PDT
Tests:

mathml/presentation/mo-invisible.html
mathml/opentype/munderover-layout-resize.html

Both tests asserts in the same place (although from different bases), with m_maxPrefferedLogicalWidth==0 and glyphWidth > 0. Tests passing and rendering correctly in Release, though.

Unfortunately, wktesthunter shows it to start crashing somewhere in a big gab between r238072 and r257066.

Would it be the case of just removing the assert?

Common stack trace part:

Thread 1 (Thread 0x7feb401db2c0 (LWP 41135)):
#0  0x00007feb49057a2a in WTFCrash() () at ../../Source/WTF/wtf/Assertions.cpp:295
#1  0x00007feb574b0332 in CRASH_WITH_INFO(...) () at DerivedSources/ForwardingHeaders/wtf/Assertions.h:713
#2  0x00007feb5b77cfb1 in WebCore::RenderMathMLOperator::computePreferredLogicalWidths() (this=0x7feae7f30010) at ../../Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp:202
#3  0x00007feb5b4f1a04 in WebCore::RenderBox::maxPreferredLogicalWidth() const (this=0x7feae7f30010) at ../../Source/WebCore/rendering/RenderBox.cpp:1082
#4  0x00007feb5b7801a0 in WebCore::RenderMathMLRow::computePreferredLogicalWidths() (this=0x7feae7bca200) at ../../Source/WebCore/rendering/mathml/RenderMathMLRow.cpp:136
#5  0x00007feb5b4f1a04 in WebCore::RenderBox::maxPreferredLogicalWidth() const (this=0x7feae7bca200) at ../../Source/WebCore/rendering/RenderBox.cpp:1082
#6  0x00007feb5b7801a0 in WebCore::RenderMathMLRow::computePreferredLogicalWidths() (this=0x7feafd52cc80) at ../../Source/WebCore/rendering/mathml/RenderMathMLRow.cpp:136
#7  0x00007feb5b4f1a04 in WebCore::RenderBox::maxPreferredLogicalWidth() const (this=0x7feafd52cc80) at ../../Source/WebCore/rendering/RenderBox.cpp:1082
#8  0x00007feb5b4f9430 in WebCore::RenderBox::computeLogicalWidthInFragmentUsing(WebCore::SizeType, WebCore::Length, WebCore::LayoutUnit, WebCore::RenderBlock const&, WebCore::RenderFragmentContainer*) const (this=0x7feafd52cc80, widthType=WebCore::MainOrPreferredSize, logicalWidth=..., availableLogicalWidth=..., cb=..., fragment=0x0) at ../../Source/WebCore/rendering/RenderBox.cpp:2573
#9  0x00007feb5b4f8bbe in WebCore::RenderBox::computeLogicalWidthInFragment(WebCore::RenderBox::LogicalExtentComputedValues&, WebCore::RenderFragmentContainer*) const (this=0x7feafd52cc80, computedValues=..., fragment=0x0) at ../../Source/WebCore/rendering/RenderBox.cpp:2476
#10 0x00007feb5b4f860f in WebCore::RenderBox::updateLogicalWidth() (this=0x7feafd52cc80) at ../../Source/WebCore/rendering/RenderBox.cpp:2408
#11 0x00007feb5b4c9917 in WebCore::RenderBlock::recomputeLogicalWidth() (this=0x7feafd52cc80) at ../../Source/WebCore/rendering/RenderBlock.cpp:638
#12 0x00007feb5b780523 in WebCore::RenderMathMLRow::layoutBlock(bool, WebCore::LayoutUnit) (this=0x7feafd52cc80, relayoutChildren=false) at ../../Source/WebCore/rendering/mathml/RenderMathMLRow.cpp:167
#13 0x00007feb5b7755f0 in WebCore::RenderMathMLMath::layoutBlock(bool, WebCore::LayoutUnit) (this=0x7feafd52cc80, relayoutChildren=false, pageLogicalHeight=...) at ../../Source/WebCore/rendering/mathml/RenderMathMLMath.cpp:62
#14 0x00007feb5b4c9675 in WebCore::RenderBlock::layout() (this=0x7feafd52cc80) at ../../Source/WebCore/rendering/RenderBlock.cpp:598
#15 0x00007feb5b42ac81 in WebCore::RenderElement::layoutIfNeeded() (this=0x7feafd52cc80) at ../../Source/WebCore/rendering/RenderElement.h:123
#16 0x00007feb5b426ae2 in WebCore::ComplexLineLayout::layoutLineBoxes(bool, WebCore::LayoutUnit&, WebCore::LayoutUnit&) (this=0x7fead1632cf0, relayoutChildren=true, repaintLogicalTop=..., repaintLogicalBottom=...) at ../../Source/WebCore/rendering/ComplexLineLayout.cpp:1785
#17 0x00007feb5b4db9fb in WebCore::RenderBlockFlow::layoutInlineChildren(bool, WebCore::LayoutUnit&, WebCore::LayoutUnit&) (this=0x7feae7f096f8, relayoutChildren=true, repaintLogicalTop=..., repaintLogicalBottom=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:701
#18 0x00007feb5b4dac91 in WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit) (this=0x7feae7f096f8, relayoutChildren=true, pageLogicalHeight=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:511
#19 0x00007feb5b4c9675 in WebCore::RenderBlock::layout() (this=0x7feae7f096f8) at ../../Source/WebCore/rendering/RenderBlock.cpp:598
#20 0x00007feb5b4dbdb4 in WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox&, WebCore::RenderBlockFlow::MarginInfo&, WebCore::LayoutUnit&, WebCore::LayoutUnit&) (this=0x7feae7f095e0, child=..., marginInfo=..., previousFloatLogicalBottom=..., maxFloatLogicalBottom=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:759
#21 0x00007feb5b4db7fc in WebCore::RenderBlockFlow::layoutBlockChildren(bool, WebCore::LayoutUnit&) (this=0x7feae7f095e0, relayoutChildren=true, maxFloatLogicalBottom=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:661
#22 0x00007feb5b4dacb5 in WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit) (this=0x7feae7f095e0, relayoutChildren=true, pageLogicalHeight=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:513
#23 0x00007feb5b4c9675 in WebCore::RenderBlock::layout() (this=0x7feae7f095e0) at ../../Source/WebCore/rendering/RenderBlock.cpp:598
#24 0x00007feb5b4dbdb4 in WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox&, WebCore::RenderBlockFlow::MarginInfo&, WebCore::LayoutUnit&, WebCore::LayoutUnit&) (this=0x7feafd541200, child=..., marginInfo=..., previousFloatLogicalBottom=..., maxFloatLogicalBottom=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:759
#25 0x00007feb5b4db7fc in WebCore::RenderBlockFlow::layoutBlockChildren(bool, WebCore::LayoutUnit&) (this=0x7feafd541200, relayoutChildren=true, maxFloatLogicalBottom=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:661
#26 0x00007feb5b4dacb5 in WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit) (this=0x7feafd541200, relayoutChildren=true, pageLogicalHeight=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:513
#27 0x00007feb5b4c9675 in WebCore::RenderBlock::layout() (this=0x7feafd541200) at ../../Source/WebCore/rendering/RenderBlock.cpp:598
#28 0x00007feb5b71503b in WebCore::RenderView::layout() (this=0x7feafd541200) at ../../Source/WebCore/rendering/RenderView.cpp:186
#29 0x00007feb5aef77eb in WebCore::FrameViewLayoutContext::layout() (this=0x7feafd540148) at ../../Source/WebCore/page/FrameViewLayoutContext.cpp:252
Comment 1 Diego Pino 2020-09-24 21:54:02 PDT
There other tests were also crashing in GTK Tests Debug:

imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-largeop-003.html
imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-largeop-004.html
imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-largeop-005.html
imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-largeop-006.html
imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-movablelimits-003.html
imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-movablelimits-004.html
imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-movablelimits-005.html
imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-movablelimits-006.html
imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-spacing-003.html
imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-spacing-004.html
imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-spacing-005.html
imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-spacing-006.html
imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-stretchy-003.html
imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-stretchy-004.html
imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-stretchy-005.html
imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-stretchy-006.html

See: https://build.webkit.org/results/GTK%20Linux%2064-bit%20Debug%20(Tests)/r267553%20(7313)/results.html
Comment 2 Diego Pino 2020-09-24 21:57:17 PDT
Stderr from Debug:

STDERR: ASSERTION FAILED: glyphWidth <= preferredWidth
STDERR: ../../Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp(202) : virtual void WebCore::RenderMathMLOperator::computePreferredLogicalWidths()
STDERR: 1   0x7ff1139461a9 WTFCrash
STDERR: 2   0x7ff11fdfb10b /app/webkit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(+0xae4510b) [0x7ff11fdfb10b]
STDERR: 3   0x7ff12482ac0d WebCore::RenderMathMLOperator::computePreferredLogicalWidths()
STDERR: 4   0x7ff124563791 WebCore::RenderBox::maxPreferredLogicalWidth() const
STDERR: 5   0x7ff1248284ff WebCore::RenderMathMLRow::computePreferredLogicalWidths()
STDERR: 6   0x7ff124563711 WebCore::RenderBox::minPreferredLogicalWidth() const
STDERR: 7   0x7ff1245617b3 WebCore::RenderBox::computeLogicalWidthInFragmentUsing(WebCore::SizeType, WebCore::Length, WebCore::LayoutUnit, WebCore::RenderBlock const&, WebCore::RenderFragmentContainer*) const
STDERR: 8   0x7ff124537888 WebCore::RenderBox::computeLogicalWidthInFragment(WebCore::RenderBox::LogicalExtentComputedValues&, WebCore::RenderFragmentContainer*) const
STDERR: 9   0x7ff12457094e WebCore::RenderBox::updateLogicalWidth()
STDERR: 10  0x7ff1245350e6 WebCore::RenderBlock::recomputeLogicalWidth()
STDERR: 11  0x7ff1248271e1 WebCore::RenderMathMLRow::layoutBlock(bool, WebCore::LayoutUnit)
STDERR: 12  0x7ff124826e57 WebCore::RenderMathMLMath::layoutBlock(bool, WebCore::LayoutUnit)
STDERR: 13  0x7ff124534fa9 WebCore::RenderBlock::layout()
STDERR: 14  0x7ff124484f2c WebCore::RenderElement::layoutIfNeeded()
STDERR: 15  0x7ff12447baa2 WebCore::ComplexLineLayout::layoutLineBoxes(bool, WebCore::LayoutUnit&, WebCore::LayoutUnit&)
STDERR: 16  0x7ff12454edfe WebCore::RenderBlockFlow::layoutInlineChildren(bool, WebCore::LayoutUnit&, WebCore::LayoutUnit&)
STDERR: 17  0x7ff12454df39 WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit)
STDERR: 18  0x7ff124534fa9 WebCore::RenderBlock::layout()
STDERR: 19  0x7ff1245506f2 WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox&, WebCore::RenderBlockFlow::MarginInfo&, WebCore::LayoutUnit&, WebCore::LayoutUnit&)
STDERR: 20  0x7ff12454f074 WebCore::RenderBlockFlow::layoutBlockChildren(bool, WebCore::LayoutUnit&)
STDERR: 21  0x7ff12454df56 WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit)
STDERR: 22  0x7ff124534fa9 WebCore::RenderBlock::layout()
STDERR: 23  0x7ff1245506f2 WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox&, WebCore::RenderBlockFlow::MarginInfo&, WebCore::LayoutUnit&, WebCore::LayoutUnit&)
STDERR: 24  0x7ff12454f074 WebCore::RenderBlockFlow::layoutBlockChildren(bool, WebCore::LayoutUnit&)
STDERR: 25  0x7ff12454df56 WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit)
STDERR: 26  0x7ff124534fa9 WebCore::RenderBlock::layout()
STDERR: 27  0x7ff1245506f2 WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox&, WebCore::RenderBlockFlow::MarginInfo&, WebCore::LayoutUnit&, WebCore::LayoutUnit&)
STDERR: 28  0x7ff12454f074 WebCore::RenderBlockFlow::layoutBlockChildren(bool, WebCore::LayoutUnit&)
STDERR: 29  0x7ff12454df56 WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit)
STDERR: 30  0x7ff124534fa9 WebCore::RenderBlock::layout()
STDERR: 31  0x7ff1247b9013 WebCore::RenderView::layout()
STDERR: LEAK: 1 WebPageProxy
Comment 3 Rob Buis 2020-10-11 03:24:35 PDT
I can't repro this locally. Is this happening locally for others or only on the bot?
Comment 4 Frédéric Wang (:fredw) 2020-10-11 05:33:56 PDT
(In reply to Rob Buis from comment #3)
> I can't repro this locally. Is this happening locally for others or only on
> the bot?

I guess this depends on installed/used fonts.
Comment 5 Arcady Goldmints-Orlov 2021-12-06 14:47:50 PST
In the end, the assert in question got removed, so the tests now pass.
Comment 6 Arcady Goldmints-Orlov 2021-12-06 14:51:00 PST
Created attachment 446087 [details]
[fast-cq] Patch
Comment 7 EWS 2021-12-06 17:57:52 PST
Committed r286584 (?): <https://commits.webkit.org/r286584>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 446087 [details].
Comment 8 Radar WebKit Bug Importer 2021-12-06 17:58:20 PST
<rdar://problem/86133399>