Bug 177904

Summary: Pango-ERROR **: file basic-fc.c: line 347 (basic_engine_shape)
Product: [Fedora] Fedora Reporter: Caolan McNamara <caolanm>
Component: fontconfigAssignee: Matthias Clasen <mclasen>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: drepper, sangu.fedora
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-01-25 13:16:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
testcase none

Description Caolan McNamara 2006-01-16 11:46:47 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051215 Fedora/1.7.12-3

Description of problem:
evolution crashes on some asian spam mails I seem to get a lot of, reproducable standalone pango test case attached

Version-Release number of selected component (if applicable):
pango-1.11.1-2

How reproducible:
Always

Steps to Reproduce:
1. gcc -g pango-test.c `pkg-config --cflags gtk+-2.0 --libs gtk+-2.0`
2. ./a.out
  

Actual Results:  valid is 1
pLayout is 92b4c78
text is &#20489;&#30000;&#20140;&#23376; <omx100518.jp>

Pango-ERROR **: file basic-fc.c: line 347 (basic_engine_shape): assertion failed: (face != NULL)
aborting...
Trace/breakpoint trap


Expected Results:  no assert/crash

Additional info:

affects evolution a lot for me

Comment 1 Caolan McNamara 2006-01-16 11:47:16 UTC
Created attachment 123232 [details]
testcase

Comment 2 Caolan McNamara 2006-01-18 13:13:58 UTC
fonts-japanese needs to be installed to see the crash

Comment 3 Matthias Clasen 2006-01-18 14:42:35 UTC
I have fonts-japanese installed, and still don't see the crash...

Comment 4 Ulrich Drepper 2006-01-20 16:31:19 UTC
I had similar although not quite the same issues.

The problem was the rename of the directory containing the files.  It used to be
ja, now it's japanese (and similar for korean and chinese).  rpm removed the
font files but the fc caches remained.  fontconfig is broken enough to find
those caches, tries to load the fonts, which fails, and then frees the fonts
anyway.  The freeing is what causes trouble for me.

In this case here it's likely just the loading part: font found in cache, the
load is expected to work but doesn't.

Comment 5 sangu 2006-01-25 13:14:58 UTC
$ rpm -q fontconfig
fontconfig-2.3.93.cvs20060124-1

$ gcc -g pango-test.c -o pango-test `pkg-config --cflags gtk+-2.0 --libs gtk+-2.0`
pango-test.c: In function âmainâ:
pango-test.c:36: warning: assignment makes pointer from integer without a cast
[sangu@sangu ~]$ ./pango-test
valid is 1
pLayout is 9e74458
text is åç°äº¬å­ <omx100518.jp>
line count is 1

Is this problem Fixed in fontconfig-2.3.93.cvs20060124-1?

Please see also bug 176409 .

Comment 6 Matthias Clasen 2006-01-25 13:16:53 UTC
Looks like it, doesn't it ?

Comment 7 Behdad Esfahbod 2006-01-26 07:38:46 UTC
Well, what Ulrich explains may be one case.  Now that you say fonts-japanese,
makes me believe it's the bug that I tracked down today.

The symptom was that a bunch of fonts shipped with Fedora, when chosen in the
font dialog in gedit for example, crash it.  They typically have three letter
lowercase names.  The one I test with is called "sys", and is actually this file:

  /usr/share/fonts/japanese/misc/mplus_s10-euro.pcf.gz

It's a completely another issue that why are we shipping bitmap fonts in
/usr/share/fonts, but anyway.  I debugged it a few hours ago and seems like the
pproblem is that the font contains 0x0 glyphs, and cairo has a bug with bitmap
0x0 glyphs, causing a crash.  I have reported the bug here:

  http://lists.freedesktop.org/archives/cairo/2006-January/006207.html

And the crash I was getting was indeed in the same place as reported in this
bug.  So I believe that's the cause.  This is going to be fixed soon and hit
cairo 1.2, and I'm planning to require cairo 1.2 for pango 1.12, so it should be
fixed in FC5...