Open
Bug 589805
Opened 15 years ago
Updated 3 years ago
Frequent first-chance exceptions in dwrite code
Categories
(Core :: Graphics, defect)
Tracking
()
NEW
People
(Reporter: benjamin, Unassigned)
Details
Trying to debug bug 586909, I turned on all first-chance exceptions and I'm hitting one within the dwrite code:
KernelBase.dll!_RaiseException@16()
msvcrt.dll!__CxxThrowException@8()
DWrite.dll!FailAsExceptionPolicy<FileFormatException>::SafeIntOnOverflow()
DWrite.dll!CheckedPtr<unsigned char const ,FailAsExceptionPolicy<FileFormatException>,unsigned int>::ReadAt<LanguageFeatureList>()
DWrite.dll!DetermineSimpleGlyphsFromTable()
DWrite.dll!`anonymous namespace'::ReadGlyphCoverage()
DWrite.dll!FontFaceRegionBuilder::Impl::WriteRegionInternal()
DWrite.dll!FontFaceRegionBuilder::Impl::WriteRegion()
DWrite.dll!FontFaceElement::AddToCacheImpl()
DWrite.dll!CacheWriter::AddElement()
DWrite.dll!ClientSideCacheContext::ClientLookup()
DWrite.dll!ClientSideCacheContext::InitializeElementImpl()
DWrite.dll!DWriteFontFace::DWriteFontFace()
DWrite.dll!DWriteFontFace::CreateFromKey()
DWrite.dll!DWriteFont::CreateFontFace()
> xul.dll!gfxDWriteFontEntry::CreateFontFace(aFontFace=0x00468f18, aSimulations=DWRITE_FONT_SIMULATIONS_NONE) Line 317 C++
xul.dll!gfxDWriteFontEntry::ReadCMAP() Line 268 C++
xul.dll!gfxFontEntry::TestCharacterMap(aCh=0x00002011) Line 108 C++
xul.dll!gfxFontFamily::FindFontForChar(aMatchData=0x04468ff4) Line 586 C++
xul.dll!gfxPlatformFontList::FindFontForCharProc(aKey={...}, aFamilyEntry={...}, userArg=0x00468ff4) Line 400 C++
xul.dll!nsBaseHashtable<nsStringHashKey,nsFrameScriptExecutorJSObjectHolder *,nsFrameScriptExecutorJSObjectHolder *>::s_EnumStub(table=0x00860d30, hdr=0x051507bc, number=0x00000041, arg=0x00468fb0) Line 364 C++
xul.dll!PL_DHashTableEnumerate(table=0x00860d30, etor=0x716aa58a, arg=0x00468fb0) Line 754 C
xul.dll!nsBaseHashtable<nsStringHashKey,nsRefPtr<gfxFontFamily>,gfxFontFamily *>::Enumerate(enumFunc=0x00000000, userArg=0x00468ff4) Line 239 C++
xul.dll!gfxPlatformFontList::FindFontForChar(aCh=0x00002011, aPrevFont=0x14185100) Line 383 C++
xul.dll!gfxFontGroup::WhichSystemFontSupportsChar(aCh=0x00002011) Line 2555 C++
xul.dll!gfxFontGroup::FindFontForChar(aCh=0x00469088, aPrevCh=0x00000000, aNextCh=0x00000003, aPrevMatchedFont=0x00000074) C++
xul.dll!gfxFontGroup::ComputeRanges(aRanges={...}, aString=0x71639d3e, begin=0x004690d8, end=0x00469372) Line 2385 C++
xul.dll!gfxFont::InitTextRun(aContext=0x00000000, aTextRun=0x14185100, aString=0x004690e0, aRunStart=0x0000000c, aRunLength=0x00000001, aRunScript=0x80000003) Line 1349 C++
xul.dll!gfxFontGroup::InitTextRun(aContext=, aTextRun=, aString=, aTotalLength=, aScriptRunStart=, aScriptRunEnd=, aRunScript=) Line 2291 C++
xul.dll!gfxFontGroup::InitTextRun(aContext=0x13486ae0, aTextRun=0x13685100, aString=0x00469368, aLength=0x0000000d) Line 2214 C++
xul.dll!gfxFontGroup::MakeTextRun(aString=0x00469368, aLength=0x0000000d, aParams=0x00469308, aFlags=0x01100101) Line 2190 C++
xul.dll!TextRunWordCache::MakeTextRun(aText=0x0046ad08, aLength=0x0000000c, aFontGroup=0x141804a0, aParams=0x004699c4, aFlags=0x01100100) Line 693 C++
xul.dll!MakeTextRun(aText=0x0046ad08, aLength=0x0000000c, aFontGroup=0x00000000, aParams=0x004699c4, aFlags=0x01100100) Line 450 C++
xul.dll!BuildTextRunsScanner::BuildTextRunForFrames(aTextBuffer=0x0046ad20) Line 1812 C++
xul.dll!BuildTextRunsScanner::FlushFrames(aFlushLineBreaks=0x00000001, aSuppressTrailingBreak=0x00000000) Line 1243 C++
xul.dll!BuildTextRuns(aContext=, aForFrame=, aLineContainer=0x00000000, aForFrameLine=) Line 1177 C++
The exception gets caught in DwriteFont::CreateFontFace, which fails correctly, but it seems to me that if we've called it once, we should stop trying.
The font is:
+ nsAString_internal {mData=0x14248f48 "DejaVu Sans MonoBold" mLength=0x00000014 mFlags=0x00000005 } nsAString_internal
Comment 1•15 years ago
|
||
(Untested thoughts...)
It looks to me like gfxDWriteFontEntry::ReadCMAP() should be modified so that it always sets the mCmapInitialized flag to PR_TRUE, regardless of success; then gfxFontEntry::TestCharacterMap() won't keep trying to call it.
In this case, the character map will be left empty (and mHasCmapTable remains false), which should mean we won't actually end up using this font.
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•