Bug 77044 - [Mac] Assertion failure in collectComplexTextRunsForCharactersCoreText
Summary: [Mac] Assertion failure in collectComplexTextRunsForCharactersCoreText
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.6
: P2 Normal
Assignee: mitz
URL:
Keywords: InRadar
Depends on:
Blocks: 77025
  Show dependency treegraph
 
Reported: 2012-01-25 13:22 PST by Ryosuke Niwa
Modified: 2012-03-13 16:58 PDT (History)
3 users (show)

See Also:


Attachments
Handle the case of Core Text returning a fallback font that NSFontManager cannot find by name (4.70 KB, patch)
2012-03-12 21:56 PDT, mitz
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2012-01-25 13:22:55 PST
$ Tools/Scripts/run-perf-tests --debug Parser/html5-full-render.html
Running Parser/html5-full-render.html (1 of 1)
crash: PerformanceTests/Parser/html5-full-render.html
error:
ASSERTION FAILED: runFontData
/Volumes/Data/webkit3/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm(275) : void WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText(const UChar*, unsigned int, unsigned int, const WebCore::SimpleFontData*)
1   0x101513046 WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText(unsigned short const*, unsigned int, unsigned int, WebCore::SimpleFontData const*)
2   0x101508804 WebCore::ComplexTextController::collectComplexTextRunsForCharacters(unsigned short const*, unsigned int, unsigned int, WebCore::SimpleFontData const*)
3   0x101508cf2 WebCore::ComplexTextController::collectComplexTextRuns()
4   0x10150a5e0 WebCore::ComplexTextController::ComplexTextController(WebCore::Font const*, WebCore::TextRun const&, bool, WTF::HashSet<WebCore::SimpleFontData const*, WTF::PtrHash<WebCore::SimpleFontData const*>, WTF::HashTraits<WebCore::SimpleFontData const*> >*, bool)
5   0x101a576b5 WebCore::Font::floatWidthForComplexText(WebCore::TextRun const&, WTF::HashSet<WebCore::SimpleFontData const*, WTF::PtrHash<WebCore::SimpleFontData const*>, WTF::HashTraits<WebCore::SimpleFontData const*> >*, WebCore::GlyphOverflow*) const
6   0x101a498fb WebCore::Font::width(WebCore::TextRun const&, WTF::HashSet<WebCore::SimpleFontData const*, WTF::PtrHash<WebCore::SimpleFontData const*>, WTF::HashTraits<WebCore::SimpleFontData const*> >*, WebCore::GlyphOverflow*) const
7   0x1023d4fa8 WebCore::RenderText::widthFromCache(WebCore::Font const&, int, int, float, WTF::HashSet<WebCore::SimpleFontData const*, WTF::PtrHash<WebCore::SimpleFontData const*>, WTF::HashTraits<WebCore::SimpleFontData const*> >*, WebCore::GlyphOverflow*) const
8   0x1023ce75b WebCore::RenderText::computePreferredLogicalWidths(float, WTF::HashSet<WebCore::SimpleFontData const*, WTF::PtrHash<WebCore::SimpleFontData const*>, WTF::HashTraits<WebCore::SimpleFontData const*> >&, WebCore::GlyphOverflow&)
9   0x1023cf136 WebCore::RenderText::computePreferredLogicalWidths(float)
10  0x1023cf26c WebCore::RenderText::trimmedPrefWidths(float, float&, bool&, float&, bool&, bool&, bool&, float&, float&, float&, float&, bool&)
11  0x1022311eb WebCore::RenderBlock::computeInlinePreferredLogicalWidths()
12  0x10223166a WebCore::RenderBlock::computePreferredLogicalWidths()
13  0x1023bafa1 WebCore::RenderTableCell::computePreferredLogicalWidths()
14  0x101443897 WebCore::AutoTableLayout::recalcColumn(unsigned int)
15  0x1014440bc WebCore::AutoTableLayout::fullRecalc()
16  0x10144537d WebCore::AutoTableLayout::computePreferredLogicalWidths(int&, int&)
17  0x1023b0593 WebCore::RenderTable::computePreferredLogicalWidths()
18  0x10227db0d WebCore::RenderBox::maxPreferredLogicalWidth() const
19  0x1023b26cf WebCore::RenderTable::computeLogicalWidth()
20  0x1023b16fd WebCore::RenderTable::layout()
21  0x10224269f WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox*, WebCore::RenderBlock::MarginInfo&, int&, int&)
22  0x1022440c8 WebCore::RenderBlock::layoutBlockChildren(bool, int&)
23  0x102244841 WebCore::RenderBlock::layoutBlock(bool, int, WebCore::RenderBlock::BlockLayoutPass)
24  0x10223ca95 WebCore::RenderBlock::layout()
25  0x10224269f WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox*, WebCore::RenderBlock::MarginInfo&, int&, int&)
26  0x1022440c8 WebCore::RenderBlock::layoutBlockChildren(bool, int&)
27  0x102244841 WebCore::RenderBlock::layoutBlock(bool, int, WebCore::RenderBlock::BlockLayoutPass)
28  0x10223ca95 WebCore::RenderBlock::layout()
29  0x10224269f WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox*, WebCore::RenderBlock::MarginInfo&, int&, int&)
30  0x1022440c8 WebCore::RenderBlock::layoutBlockChildren(bool, int&)
31  0x102244841 WebCore::RenderBlock::layoutBlock(bool, int, WebCore::RenderBlock::BlockLayoutPass)
Comment 1 mitz 2012-01-25 13:54:41 PST
Can you specify the platform and the OS version?
Comment 2 Ryosuke Niwa 2012-01-25 13:58:41 PST
(In reply to comment #1)
> Can you specify the platform and the OS version?

Snow Leopard.
Comment 3 mitz 2012-03-12 20:01:22 PDT
<rdar://problem/11025217>
Comment 4 mitz 2012-03-12 20:17:38 PDT
Looks like Core Text is acting up. We should not make this assertion, and if runFontData turns out to be 0, we should use the CTFont as returned (rather than doing the name lookup).
Comment 5 mitz 2012-03-12 21:56:43 PDT
Created attachment 131542 [details]
Handle the case of Core Text returning a fallback font that NSFontManager cannot find by name
Comment 6 mitz 2012-03-12 21:57:37 PDT
Note that the test doesn’t trigger the assertion in all configurations, but that’s the closest I’ve been able to get.
Comment 7 Eric Carlson 2012-03-13 07:48:53 PDT
Comment on attachment 131542 [details]
Handle the case of Core Text returning a fallback font that NSFontManager cannot find by name

View in context: https://bugs.webkit.org/attachment.cgi?id=131542&action=review

> Source/WebCore/ChangeLog:17
> +        (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText): Removed the
> +        failing assertion, which was not true, and added code to handle the case where a font
> +        cannot be found by name by using the font as returned from Core Text.

The assertion is still there, did you mean to remove it?
Comment 8 mitz 2012-03-13 08:17:02 PDT
(In reply to comment #7)
> (From update of attachment 131542 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=131542&action=review
> 
> > Source/WebCore/ChangeLog:17
> > +        (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText): Removed the
> > +        failing assertion, which was not true, and added code to handle the case where a font
> > +        cannot be found by name by using the font as returned from Core Text.
> 
> The assertion is still there, did you mean to remove it?

I did, thanks! I’m going to do it before committing.
Comment 9 mitz 2012-03-13 16:58:19 PDT
Fixed in <http://trac.webkit.org/r110642>.