Bug 63078 - REGRESSION (r88260): Assertion failure in FontCache::getCachedFontData when typing in Safari's address field
Summary: REGRESSION (r88260): Assertion failure in FontCache::getCachedFontData when t...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords: InRadar, PlatformOnly, Regression
Depends on:
Blocks:
 
Reported: 2011-06-21 11:02 PDT by Adam Roben (:aroben)
Modified: 2011-06-22 06:36 PDT (History)
2 users (show)

See Also:


Attachments
Patch with additional FontCachePurgePreventer for ASSERT failure (3.02 KB, patch)
2011-06-21 22:39 PDT, Michael Saboff
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2011-06-21 11:02:07 PDT
To reproduce:

1. Type in Safari's address field while using a Debug build of WebKit

You'll hit an assertion in FontCache::getCachedFontData:

        ASSERT(m_purgePreventCount);

I don't know what the Release symptom is. Michael Saboff probably does.

Here's the backtrace:

>	WebKit.dll!WebCore::FontCache::getCachedFontData(const WebCore::FontPlatformData * platformData=0x0b050218, WebCore::FontCache::ShouldRetain shouldRetain=DoNotRetain)  Line 279 + 0x29 bytes	C++
 	WebKit.dll!WebCore::FontCache::getFontDataForCharacters(const WebCore::Font & font={...}, const wchar_t * characters=0x0012f3f0, int length=1)  Line 288 + 0x11 bytes	C++
 	WebKit.dll!WebCore::Font::glyphDataForCharacter(int c=8206, bool mirror=false, WebCore::FontDataVariant variant=NormalVariant)  Line 195 + 0x1e bytes	C++
 	WebKit.dll!WebCore::WidthIterator::advance(int offset=41, WebCore::GlyphBuffer * glyphBuffer=0x00000000)  Line 126 + 0x18 bytes	C++
 	WebKit.dll!WebCore::Font::floatWidthForSimpleText(const WebCore::TextRun & run={...}, WebCore::GlyphBuffer * glyphBuffer=0x00000000, WTF::HashSet<WebCore::SimpleFontData const *,WTF::PtrHash<WebCore::SimpleFontData const *>,WTF::HashTraits<WebCore::SimpleFontData const *> > * fallbackFonts=0x00000000, WebCore::GlyphOverflow * glyphOverflow=0x00000000)  Line 455	C++
 	WebKit.dll!WebCore::Font::width(const WebCore::TextRun & run={...}, WTF::HashSet<WebCore::SimpleFontData const *,WTF::PtrHash<WebCore::SimpleFontData const *>,WTF::HashTraits<WebCore::SimpleFontData const *> > * fallbackFonts=0x00000000, WebCore::GlyphOverflow * glyphOverflow=0x00000000)  Line 190 + 0x47 bytes	C++
 	WebKit.dll!WebCore::stringWidth(const WebCore::Font & renderer={...}, const wchar_t * characters=0x0a361484, unsigned int length=41)  Line 98 + 0x10 bytes	C++
 	WebKit.dll!WebCore::StringTruncator::width(const WTF::String & string={? Overview  Python v2.7.2 documentation}, const WebCore::Font & font={...})  Line 194 + 0x1b bytes	C++
 	WebKit.dll!WebCore::WebCoreTextFloatWidth(const WTF::String & text={? Overview  Python v2.7.2 documentation}, const WebCore::Font & font={...})  Line 104 + 0xd bytes	C++
 	WebKit.dll!TextFloatWidth(const wchar_t * text=0x0afccf54, int length=41, const WebFontDescription & description={...})  Line 126 + 0x27 bytes	C++
Comment 1 Adam Roben (:aroben) 2011-06-21 11:02:47 PDT
Presumably the WebKitGraphics.cpp APIs need some FontCachePurgePreventer love.
Comment 2 Adam Roben (:aroben) 2011-06-21 11:03:15 PDT
<rdar://problem/9648668>
Comment 3 Geoffrey Garen 2011-06-21 11:51:59 PDT
The release build symptom is extra memory use, with a small risk of crash sprinkled in.
Comment 4 Michael Saboff 2011-06-21 22:39:44 PDT
Created attachment 98120 [details]
Patch with additional FontCachePurgePreventer for ASSERT failure

Patch includes two other additional instances of purge prevention based on code inspection.
These changes are speculative.
Comment 5 Adam Roben (:aroben) 2011-06-22 06:00:49 PDT
Comment on attachment 98120 [details]
Patch with additional FontCachePurgePreventer for ASSERT failure

I haven't been able to cause an assertion failure involving createDragImageForLink, but this seems fine to me.
Comment 6 Adam Roben (:aroben) 2011-06-22 06:09:42 PDT
Comment on attachment 98120 [details]
Patch with additional FontCachePurgePreventer for ASSERT failure

I can confirm that this patch fixes the assertion I was seeing. Thanks!
Comment 7 Michael Saboff 2011-06-22 06:36:43 PDT
Committed r89425: <http://trac.webkit.org/changeset/89425>