GNOME Bugzilla – Bug 618557
Polygon regresion in 0.4.5, causing segfaults
Last modified: 2010-05-23 17:34:06 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
I made a quick and dirty patch that fixes it for 0.4. There is a better solution for 0.6.