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 536006 - Don't use cairo_show_text()
Don't use cairo_show_text()
Status: RESOLVED FIXED
Product: system-monitor
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Robert Roth
System-monitor maintainers
: 521930 574527 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-06-01 02:29 UTC by Behdad Esfahbod
Modified: 2011-11-11 10:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Just take a look at the units in the graph (51.34 KB, image/png)
2010-12-26 14:52 UTC, Yaron Shahrabani
  Details
Use pango instead of cairo_show_text in load-graph. (3.82 KB, patch)
2011-08-21 05:47 UTC, Haggai Eran
needs-work Details | Review
Updated patch with free and unref (3.99 KB, patch)
2011-11-09 09:54 UTC, Robert Roth
none Details | Review

Description Behdad Esfahbod 2008-06-01 02:29:56 UTC
Reading this:

http://sankarshan.randomink.org/blog/2008/05/30/oh-no-system-monitor-seems-to-be-acting-up/

I suspect it's using cairo_show_text to render some of the labels.  Should use pango_cairo_show_layout insted.
Comment 1 Benoît Dejean 2008-06-02 09:07:33 UTC
*** Bug 521930 has been marked as a duplicate of this bug. ***
Comment 2 A S Alam 2009-06-11 09:39:41 UTC
Bug still exist with Fedora package:

gnome-system-monitor-2.26.1-2.fc11.x86_64
Comment 3 Gabor Kelemen 2009-07-16 23:30:51 UTC
*** Bug 574527 has been marked as a duplicate of this bug. ***
Comment 4 A S Alam 2009-10-29 11:08:49 UTC
Currently out of 3 column, 2 are Fixed with following version.
gnome-system-monitor-2.28.0-2.fc12.x86_64
Comment 5 Yaron Shahrabani 2010-12-26 14:52:07 UTC
Created attachment 177070 [details]
Just take a look at the units in the graph
Comment 6 Haggai Eran 2011-08-21 05:47:39 UTC
Created attachment 194321 [details] [review]
Use pango instead of cairo_show_text in load-graph.

Hi,

Here's a patch that uses Pango instead. I tried it for Hebrew and English, and it seemed to work fine.
Comment 7 Robert Roth 2011-11-09 09:49:13 UTC
Review of attachment 194321 [details] [review]:

The patch looks generally ok, and fixes the issue reported, but there are two possible problems with it: I think that the Pango layout should be unreffed (g_object_unref at the end of the method before the last cairo_stroke) and the Pango font_description should be freed after it has been set to the layout (pango_font_description_free(font_desc) after pango_layout_set_font_description call). These two changes do not affect the behavior of the patch, the app is still compilable and runnable.
Comment 8 Robert Roth 2011-11-09 09:54:52 UTC
Created attachment 201050 [details] [review]
Updated patch with free and unref

Confirmed the bug and attached a patch superseding the previous one with the original commit author set and cleaning up the objects from memory when they are not needed anymore.
Comment 9 Chris Kühl 2011-11-09 23:11:17 UTC
Thanks. This has been applied to master in commit 62c46d71e8c4ab5a2e68f7b1ad9d780c1728b6e2.