<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - blueman and xfce4-power-manager crash when opening right-click menu while terminus is set as system font"
href="https://bugs.freedesktop.org/show_bug.cgi?id=78787#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - blueman and xfce4-power-manager crash when opening right-click menu while terminus is set as system font"
href="https://bugs.freedesktop.org/show_bug.cgi?id=78787">bug 78787</a>
from <span class="vcard"><a class="email" href="mailto:sixtysix@inwind.it" title="Massimo <sixtysix@inwind.it>"> <span class="fn">Massimo</span></a>
</span></b>
<pre>I was able to reproduce this crash with gimp and cairo from git master.
On fedora 22, I have installed 'gnome-themes', 'gnome-themes-legacy' and
'gtk-murrine-engine'. I have put in ~/.gtkrc-2.0 these three lines:
include "/usr/share/themes/MurrinaEalm/gtk-2.0/gtkrc"
style "myfont" { font_name = "Terminus 11" } widget_class "*" style "myfont"
gtk-font-name = "Terminus 11"
and use the this command line to start gimp-2.9 installed in $HOME/prefix
GTK_PATH=$HOME/prefix/lib64/gtk-2.0:/usr/lib64/gtk-2.0 gimp-2.9
The problem is that in src/cairo-scaled-font.c _cairo_scaled_glyph_lookup is
called with the 'scaled_font->cache_frozen' TRUE:
<a href="http://cgit.freedesktop.org/cairo/tree/src/cairo-scaled-font.c#n2961">http://cgit.freedesktop.org/cairo/tree/src/cairo-scaled-font.c#n2961</a>
but when scaled_font_backend->scaled_glyph_init returns for example
CAIRO_INT_STATUS_UNSUPPORTED
<a href="http://cgit.freedesktop.org/cairo/tree/src/cairo-scaled-font.c#n2982">http://cgit.freedesktop.org/cairo/tree/src/cairo-scaled-font.c#n2982</a>
(which comments suggest being not an error)
<a href="http://cgit.freedesktop.org/cairo/tree/src/cairo-scaled-font.c#n3022">http://cgit.freedesktop.org/cairo/tree/src/cairo-scaled-font.c#n3022</a>
_cairo_scaled_glyph_page_destroy is called (via
_cairo_scaled_font_free_last_glyph)
which expects scaled_font->cache_frozen being FALSE.
thawing the cache before calling _cache_scaled_font_free_last_glyph and
freezing it after fixes the crash, perhaps introducing races in
multi threaded programs.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>