GNOME Bugzilla – Bug 673497
corefont fallback not always working
Last modified: 2012-06-04 19:05:43 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.
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.