GNOME Bugzilla – Bug 357686
pangocairo-font.c: illegal g_object_unref in pango_cairo_font_get_hex_box_info
Last modified: 2006-09-25 21:03:03 UTC
Steps to reproduce: It is difficult to show a clear example. Reproduction may depend on a version or an option of a compiler. I confirmed that my own program crashed on Visual C++ 6.0 + Windows 2000. If it compiled on Visual C++ 2005, it does not crash. Stack trace: Please see screen shot. Other information: pango_font_get_font_map returns PangoFontMap without incrementing ref_count. But PangoFontMap is released in pango_cairo_font_get_hex_box_info. So, when pango_cairo_font_get_hex_box_info is called, ref_count of PangoFontMap has illegal value. It will cause crash!!! 'g_object_unref (fontmap);' at line 230 is unnecessary. I found on Windows. But it will occur in all environment.
Created attachment 73395 [details] screen shot
Oops! 2006-09-25 Behdad Esfahbod <behdad@gnome.org> Bug 357686 – pangocairo-font.c: illegal g_object_unref in pango_cairo_font_get_hex_box_info * pango/pangocairo-font.c (_pango_cairo_font_get_hex_box_info): Remove wrong g_object_unref (fontmap).