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 618557 - Polygon regresion in 0.4.5, causing segfaults
Polygon regresion in 0.4.5, causing segfaults
Status: RESOLVED FIXED
Product: libchamplain
Classification: Core
Component: polygons
0.4.x
Other Linux
: Normal normal
: ---
Assigned To: libchamplain-maint
libchamplain-maint
Depends on:
Blocks:
 
 
Reported: 2010-05-13 17:31 UTC by Andrew Clayton
Modified: 2010-05-23 17:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andrew Clayton 2010-05-13 17:31:03 UTC
I have the following function

static void add_a_polygon(ChamplainView *view)
{
        ChamplainPolygon *polygon;

        polygon = champlain_polygon_new();
        champlain_polygon_append_point(polygon, 56.2250, -3.4229);
        champlain_polygon_append_point(polygon, 56.2250, -3.3282);
        champlain_polygon_append_point(polygon, 56.1769, -3.3282);
        champlain_polygon_append_point(polygon, 56.1769, -3.4229);
        champlain_polygon_append_point(polygon, 56.2250, -3.4229);
        g_object_set(polygon, "closed-path", TRUE, NULL);
        g_object_set(polygon, "fill", TRUE, NULL);
        champlain_view_add_polygon(CHAMPLAIN_VIEW(view), polygon);
        g_object_unref(G_OBJECT(polygon));
 }

This was working a few days ago (with libchamplain 0.4.3 also works in 0.4.4), however it seems an update to 0.4.5 has broken this.

Now when I launch the application I get a segfault

(./map:11880): Clutter-CRITICAL **: clutter_cairo_texture_create: assertion `CLUTTER_IS_CAIRO_TEXTURE (self)' failed
 Segmentation fault

Same problem hits the polygons.c demo program from the libchamplain-devel package.

It seems to be the

        champlain_view_add_polygon(CHAMPLAIN_VIEW(view), polygon);

line that triggers it. If I comment that line out, the program runs.

Environment is Fedora 12, x86_64 64bit
Comment 1 Jiri Techet 2010-05-23 17:34:06 UTC
I made a quick and dirty patch that fixes it for 0.4. There is a better solution for 0.6.