After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 673497 - corefont fallback not always working
corefont fallback not always working
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: coretext
1.30.x
Other Mac OS
: Normal major
: ---
Assigned To: gtk-quartz maintainers
pango-maint
Depends on:
Blocks:
 
 
Reported: 2012-04-04 11:42 UTC by Timo Dörr
Modified: 2012-06-04 19:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdb backtrace when hitting the bug (3.55 KB, text/plain)
2012-04-04 11:42 UTC, Timo Dörr
Details

Description Timo Dörr 2012-04-04 11:42:24 UTC
Created attachment 211278 [details]
gdb backtrace when hitting the bug

This bug is related to the closed bug https://bugzilla.gnome.org/show_bug.cgi?id=647969 which I've already added comments. But since the bug is marked as resolved fixed I thought I better open up a new one.

I basically can reproduce David Nielsens crash using the latest pango 1.30.0

The the newly fallback corefont to "Sans" font sometimes fails, which causes currently a crash upon latest banshee startup.

From my gdb analysis I found that the problem lies in pangocoretext-fontmap.c in line 1265:

fontset = pango_core_text_fontset_new (&key, tmp_desc);

which returns NULL after evaluating "if (!find_best_match (font_family,
description, &best_description, &best_face)) " in pango_core_text_fontset_new

Since fontset is null, pango_core_text_fontset_get_key hits a nullpointer exception when accesing fontset->key.
Comment 1 Kristian Rietveld 2012-06-04 19:05:43 UTC
Thanks to your gdb session posted in bug 647969, I managed to find the hint I was missing in order to properly fix this bug.

master now contains the following commit:


commit f5135453d26e68f9f2fbe8f0ddb01e437df41384
Author: Kristian Rietveld <kris@loopnest.org>
Date:   Mon Jun 4 20:27:01 2012 +0200

    Bug 673497 - corefont fallback not always working
    
    The fallback failed when a "small caps" font was requested. This commit
    improves the fallback support. When the first fallback, trying Sans with
    the same style fails, we reset the variant, weight and stretch to
    default values and try again. With Sans we should always be able to
    adhere to the requested style.
    
    Last but not least, output a sensible error message if all fallbacks
    fail instead of simply crashing on a NULL pointer somewhere.