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 357686 - pangocairo-font.c: illegal g_object_unref in pango_cairo_font_get_hex_box_info
pangocairo-font.c: illegal g_object_unref in pango_cairo_font_get_hex_box_info
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.14.x
Other All
: Normal critical
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2006-09-25 20:53 UTC by Kazuki Iwamoto
Modified: 2006-09-25 21:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screen shot (18.87 KB, image/jpeg)
2006-09-25 20:54 UTC, Kazuki Iwamoto
Details

Description Kazuki Iwamoto 2006-09-25 20:53:21 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.
Comment 1 Kazuki Iwamoto 2006-09-25 20:54:23 UTC
Created attachment 73395 [details]
screen shot
Comment 2 Behdad Esfahbod 2006-09-25 21:03:03 UTC
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).