If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

BofA crashes in pango following pango shape engine failure

RESOLVED DUPLICATE of bug 404112

Status

()

Core
Graphics
RESOLVED DUPLICATE of bug 404112
10 years ago
10 years ago

People

(Reporter: dbaron, Unassigned)

Tracking

({crash, regression})

Trunk
x86
Linux
crash, regression
Points:
---
Bug Flags:
blocking1.9 ?

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

10 years ago
https://www.bankofamerica.com/ crashes in pango following a bunch of Pango-WARNINGs about shape engine failure.

This broke between Linux nightlies 2007-10-11-04-trunk and 2007-10-12-04-trunk.

I see the following output:
(gecko:5263): Pango-WARNING **: shape engine failure, expect ugly output. the offending font is 'KacstQura Not-Rotated 0'

(gecko:5263): Pango-WARNING **: shape engine failure, expect ugly output. the offending font is 'Bitstream Vera Sans Not-Rotated 0'

(gecko:5263): Pango-WARNING **: shape engine failure, expect ugly output. the offending font is 'DejaVu LGC Sans Not-Rotated 0'

(gecko:5263): Pango-WARNING **: shape engine failure, expect ugly output. the offending font is 'WenQuanYi Zen Hei Not-Rotated 0'

and then a crash at the stack:
#5  <signal handler called>
#6  pango_fc_font_real_get_glyph (font=0xa97d8e8, wc=54620)
    at pangofc-font.c:564
#7  0x00badc24 in pango_fc_font_get_glyph (font=0x0, wc=54620)
    at pangofc-font.c:671
#8  0x0216b1cf in render_basic (font=0xa97d8e8, wc=54620, glyphs=0xa43f8c0, 
    n_glyphs=0xbf91a1fc, cluster_offset=0) at hangul-fc.c:389
#9  0x0216b57a in hangul_engine_shape (engine=0xa4313c0, font=0xa97d8e8, 
    text=0xabed944 "�\225\234��\200 Р�\203�\201�\201кий 中�\226\207,�\231��\200\232��\235,��\211语 Türkçe", length=7, analysis=0xa69fd24, 
    glyphs=0xa43f8c0) at hangul-fc.c:429
#10 0x00c3da6a in _pango_engine_shape_shape (engine=0xa4313c0, font=0xa97d8e8, 
    text=0xabed944 "�\225\234��\200 Р�\203�\201�\201кий 中�\226\207,�\231��\200\232��\235,��\211语 Türkçe", length=7, analysis=0xa69fd24, 
    glyphs=0xa43f8c0) at pango-engine.c:71
#11 0x00c4eb59 in pango_shape (
    text=0xabed944 "�\225\234��\200 Р�\203�\201�\201кий 中�\226\207,�\231��\200\232��\235,��\211语 Türkçe", length=7, analysis=0xa69fd24, 
    glyphs=0xa43f8c0) at shape.c:51
#12 0x00c418aa in shape_run (line=0xa983ad0, state=0xbf91a424, item=0xa69fd18)
    at pango-layout.c:3020
#13 0x00c44505 in process_item (layout=0xa151ef8, line=0xa983ad0, 
    state=0xbf91a424, force_fit=0, no_break_at_end=0) at pango-layout.c:3112
#14 0x00c44a6d in pango_layout_check_lines (layout=0xa151ef8)
    at pango-layout.c:3349
#15 0x00c453f7 in pango_layout_get_extents_internal (layout=0xa151ef8, 
    ink_rect=0x0, logical_rect=0xbf91a594, line_extents=0x0)
    at pango-layout.c:2318
#16 0x00baded7 in pango_fc_font_create_metrics_for_context (fcfont=0xa97e8f8, 
    context=0xa735d80) at pangofc-font.c:455
#17 0x00ba3b40 in pango_cairo_fc_font_get_metrics (font=0xa97e8f8, 
    language=0x0) at pangocairo-fcfont.c:232
#18 0x00c35bf8 in pango_font_get_metrics (font=0x0, language=0x0)
    at fonts.c:1362
#19 0x063229d0 in gfxPangoFont::GetMetrics (this=0xabe8030)
    at /builds/trunk/mozilla/gfx/thebes/src/gfxPangoFonts.cpp:415
#20 0x01a1623c in nsThebesFontMetrics::GetMetrics (this=0xa95a1b0)
    at /builds/trunk/mozilla/gfx/src/thebes/nsThebesFontMetrics.cpp:106
Flags: blocking1.9?
(Reporter)

Comment 1

10 years ago
Nothing in the checkin window really jumps out, but a few things seem related:

http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=PhoenixTinderbox&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2007-10-11+02%3A00&maxdate=2007-10-12+05%3A00&cvsroot=%2Fcvsroot

Comment 2

10 years ago
David, I can't reproduce this crash but I think it's the same as
bug 404112 and bug 403550 etc.  I suspect that some versions of
libpango crashes when querying stuff about fonts with zero size.
I've put up a patch in bug 404112 if you want to try it.

In the regression range I would suspect that bug 386065 made this
more likely to occur, this bit to be specific:
     gfxFloat size = gfxFloat(aFont.size) / mP2A;
-    if (size == 0.0)
-        size = 1.0;

This would lead to more such calls, yes?
I think you are right, Mats, but I get the warnings in bug 404112 comment 1 without the crash (pango 1.18.3), so I can't confirm the patch fixes the crash.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 404112

Comment 4

10 years ago
David, what version of libpango did you see this crash with?
(Reporter)

Comment 5

10 years ago
$ cat /etc/fedora-release ;rpm -q pango
Fedora release 7 (Moonshine)
pango-1.16.4-2.fc7

Comment 6

10 years ago
Ok, thanks. If you could also try the build at:
https://build.mozilla.org/tryserver-builds/2007-12-04_08:36-mpalmgren@mozilla.com-1196786133/
and see if that fixes it?
(Reporter)

Comment 7

10 years ago
I still see 1 of the 4 pango warnings, but it doesn't crash anymore.
The Pango warnings that I'm seeing (with the patch) come from gfxFontGroup::MakeSpaceTextRun which doesn't take the same shortcuts as gfxTextRunWordCache::MakeTextRun() for zero sizes.

#0  0x00002b232f06bd25 in g_log () from /usr/lib64/libglib-2.0.so.0
#1  0x00002b232e74fb61 in pango_shape () from /usr/lib64/libpango-1.0.so.0
#2  0x00002b233732f632 in gfxPangoFontGroup::CreateGlyphRunsItemizing (
    this=0x15edcf0, aTextRun=0x17c5760, aUTF8=0x2b23373be5ac "  ", 
    aUTF8Length=1, aUTF8HeaderLen=0)
    at /home/karl/moz/mozilla/gfx/thebes/src/gfxPangoFonts.cpp:1220
#3  0x00002b233732f914 in gfxPangoFontGroup::InitTextRun (this=0x15edcf0, 
    aTextRun=0x17c5760, aUTF8Text=0x2b23373be5ac "  ", aUTF8Length=1, 
    aUTF8HeaderLength=0, aTake8BitPath=1)
    at /home/karl/moz/mozilla/gfx/thebes/src/gfxPangoFonts.cpp:726
#4  0x00002b233732fbd6 in gfxPangoFontGroup::MakeTextRun (this=0x15edcf0, 
    aString=0x2b23373be5ac "  ", aLength=1, aParams=0x7fff7ee84020, 
    aFlags=131) at /home/karl/moz/mozilla/gfx/thebes/src/gfxPangoFonts.cpp:644
#5  0x00002b233731c9b2 in gfxTextRun::SetSpaceGlyph (this=0x19f7e40, 
    aFont=0x19ab870, aContext=0x1440b30, aCharIndex=0)
    at /home/karl/moz/mozilla/gfx/thebes/src/gfxFont.cpp:1891
#6  0x00002b233731cb25 in gfxFontGroup::MakeSpaceTextRun (this=0x15edcf0, 
    aParams=0x7fff7ee85460, aFlags=22284419)
    at /home/karl/moz/mozilla/gfx/thebes/src/gfxFont.cpp:851
#7  0x00002b233643ca21 in MakeTextRun (
    aText=0x7fff7ee856a0 " to Bank of America Servicesnks Accessible Banking Infor0\vD\001", aLength=1, aFontGroup=0x15edcf0, aParams=0x7fff7ee85460, 
    aFlags=22284416)
    at /home/karl/moz/mozilla/layout/generic/nsTextFrameThebes.cpp:408

I also get this in a similar context:

###!!! ASSERTION: Failed to create scaled font: 'cairo_scaled_font_status(scaledFont) == CAIRO_STATUS_SUCCESS', file /home/karl/moz/mozilla/gfx/thebes/src/gfxPangoFonts.cpp, line 764

#0  CreateScaledFont (aCR=0x1440b60, aCTM=0x7fff7ee83d90, 
    aPangoFont=0x1711690)
    at /home/karl/moz/mozilla/gfx/thebes/src/gfxPangoFonts.cpp:765
#1  0x00002b233732ddeb in gfxPangoFont::SetupCairoFont (this=0x19ab870, 
    aContext=0x1440b30)
    at /home/karl/moz/mozilla/gfx/thebes/src/gfxPangoFonts.cpp:788
#2  0x00002b233731b443 in gfxTextRun::FetchGlyphExtents (this=0x17c5760, 
    aRefContext=0x1440b30)
    at /home/karl/moz/mozilla/gfx/thebes/src/gfxFont.cpp:1947
#3  0x00002b233732fc94 in gfxPangoFontGroup::MakeTextRun (this=0x15edcf0, 
    aString=0x2b23373be5ac "  ", aLength=1, aParams=0x7fff7ee84020, 
    aFlags=131) at /home/karl/moz/mozilla/gfx/thebes/src/gfxPangoFonts.cpp:654
#4  0x00002b233731c9b2 in gfxTextRun::SetSpaceGlyph (this=0x19f7e40, 
    aFont=0x19ab870, aContext=0x1440b30, aCharIndex=0)
    at /home/karl/moz/mozilla/gfx/thebes/src/gfxFont.cpp:1891
#5  0x00002b233731cb25 in gfxFontGroup::MakeSpaceTextRun (this=0x15edcf0, 
    aParams=0x7fff7ee85460, aFlags=22284419)
    at /home/karl/moz/mozilla/gfx/thebes/src/gfxFont.cpp:851
#6  0x00002b233643ca21 in MakeTextRun (
    aText=0x7fff7ee856a0 " to Bank of America Servicesnks Accessible Banking Infor0\vD\001", aLength=1, aFontGroup=0x15edcf0, aParams=0x7fff7ee85460, 
    aFlags=22284416)
    at /home/karl/moz/mozilla/layout/generic/nsTextFrameThebes.cpp:408

Comment 9

10 years ago
On Fedora.8 which has pango pango-1.18.3-1.fc8 I do not get the crash with my debug version of the latest Mozilla 3. I only get warnings listed at the end of this comment. I had the failure described in this bug with the earlier pango version pango-1.16.4-2 on F7 when running Mozilla 3. The patch attached to bug 404112 i tried successfully on my F7 build, thanks for that one! We will probably consider it for the OLPC browser since upgrading to the latest pango needs glib2 and that would get messy.

(gecko:31659): Pango-WARNING **: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu LGC Sans 0'

(gecko:31659): Pango-WARNING **: failed to create cairo scaled font, expect ugly output. the offending font is 'PakTypeNaqsh 0'

(gecko:31659): Pango-WARNING **: shaping failure, expect ugly output. shape-engine='ArabicEngineFc', font='PakTypeNaqsh 0', text='السلام عليكم '

(gecko:31659): Pango-WARNING **: pango_font_get_glyph_extents called with null font argument, expect ugly output

(gecko:31659): Pango-WARNING **: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu LGC Sans 0'

(gecko:31659): Pango-WARNING **: shaping failure, expect ugly output. shape-engine='BasicEngineFc', font='DejaVu LGC Sans 0', text='česky '

(gecko:31659): Pango-WARNING **: failed to create cairo scaled font, expect ugly output. the offending font is 'Sazanami Gothic 0'

(gecko:31659): Pango-WARNING **: shaping failure, expect ugly output. shape-engine='BasicEngineFc', font='Sazanami Gothic 0', text='日本語 '

(gecko:31659): Pango-WARNING **: failed to create cairo scaled font, expect ugly output. the offending font is 'Baekmuk Gulim 0'

(gecko:31659): Pango-WARNING **: failed to create cairo scaled font, expect ugly output. the offending font is 'AR PL ShanHeiSun Uni 0'

(gecko:31659): Pango-WARNING **: shaping failure, expect ugly output. shape-engine='BasicEngineFc', font='AR PL ShanHeiSun Uni 0', text='话'

(gecko:31659): Pango-WARNING **: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu LGC Sans Bold 0'

(gecko:31659): Pango-WARNING **: failed to create cairo scaled font, expect ugly output. the offending font is 'KacstArt Bold 0'

(gecko:31659): Pango-WARNING **: shaping failure, expect ugly output. shape-engine='ArabicEngineFc', font='KacstArt Bold 0', text='السلام عليكم '

(gecko:31659): Pango-WARNING **: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu LGC Sans Bold 0'

(gecko:31659): Pango-WARNING **: shaping failure, expect ugly output. shape-engine='BasicEngineFc', font='DejaVu LGC Sans Bold 0', text='česky '

(gecko:31659): Pango-WARNING **: failed to create cairo scaled font, expect ugly output. the offending font is 'Sazanami Gothic Bold 0'

(gecko:31659): Pango-WARNING **: shaping failure, expect ugly output. shape-engine='BasicEngineFc', font='Sazanami Gothic Bold 0', text='日本語 '

(gecko:31659): Pango-WARNING **: failed to create cairo scaled font, expect ugly output. the offending font is 'Baekmuk Gulim Bold 0'

(gecko:31659): Pango-WARNING **: failed to create cairo scaled font, expect ugly output. the offending font is 'AR PL ShanHeiSun Uni Bold 0'

(gecko:31659): Pango-WARNING **: shaping failure, expect ugly output. shape-engine='BasicEngineFc', font='AR PL ShanHeiSun Uni Bold 0', text='话'

(gecko:31659): Pango-WARNING **: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu LGC Serif 0'

(gecko:31659): Pango-WARNING **: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu LGC Serif 0'

(gecko:31659): Pango-WARNING **: shaping failure, expect ugly output. shape-engine='BasicEngineFc', font='DejaVu LGC Serif 0', text='česky '

(gecko:31659): Pango-WARNING **: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu LGC Serif Bold 0'

(gecko:31659): Pango-WARNING **: failed to create cairo scaled font, expect ugly output. the offending font is 'DejaVu LGC Serif Bold 0'

(gecko:31659): Pango-WARNING **: shaping failure, expect ugly output. shape-engine='BasicEngineFc', font='DejaVu LGC Serif Bold 0', text='česky '
You need to log in before you can comment on or make changes to this bug.