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 610168 - demos/polygon: segfault at start-up
demos/polygon: segfault at start-up
Status: RESOLVED FIXED
Product: libchamplain
Classification: Core
Component: General
0.5.x
Other Linux
: Normal normal
: ---
Assigned To: libchamplain-maint
libchamplain-maint
Depends on:
Blocks:
 
 
Reported: 2010-02-16 16:24 UTC by Simon Wenner
Modified: 2010-05-10 23:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed fix (787 bytes, patch)
2010-02-16 16:24 UTC, Simon Wenner
none Details | Review

Description Simon Wenner 2010-02-16 16:24:18 UTC
Created attachment 153937 [details] [review]
proposed fix

The polygon demo segfauls at start-up. All other demos work fine.

Removing g_object_unref (G_OBJECT (polygon)); for each polygon fixes the segfault, but that's probably not the right fix.

  • #0 cairo_set_operator
    from /usr/lib/libcairo.so.2
  • #1 draw_polygon
    at champlain-view.c line 396
  • #2 view_update_polygons
    at champlain-view.c line 2666
  • #3 viewport_pos_changed_cb
    at champlain-view.c line 1112
  • #4 IA__g_closure_invoke
    at /tmp/buildd/glib2.0-2.22.4/gobject/gclosure.c line 767
  • #5 signal_emit_unlocked_R
    at /tmp/buildd/glib2.0-2.22.4/gobject/gsignal.c line 3247
  • #6 IA__g_signal_emit_valist
    at /tmp/buildd/glib2.0-2.22.4/gobject/gsignal.c line 2980
  • #7 IA__g_signal_emit
    at /tmp/buildd/glib2.0-2.22.4/gobject/gsignal.c line 3037
  • #8 g_object_dispatch_properties_changed
    at /tmp/buildd/glib2.0-2.22.4/gobject/gobject.c line 796
  • #9 g_object_notify_queue_thaw
    at /tmp/buildd/glib2.0-2.22.4/gobject/gobjectnotifyqueue.c line 120
  • #10 IA__g_object_thaw_notify
    at /tmp/buildd/glib2.0-2.22.4/gobject/gobject.c line 913
  • #11 tidy_viewport_set_origin
    at tidy-viewport.c line 571
  • #12 champlain_view_center_on
    at champlain-view.c line 1427
  • #13 champlain_view_set_zoom_level
    at champlain-view.c line 1649
  • #14 object_set_property
    at /tmp/buildd/glib2.0-2.22.4/gobject/gobject.c line 968
  • #15 IA__g_object_set_valist
    at /tmp/buildd/glib2.0-2.22.4/gobject/gobject.c line 1476
  • #16 IA__g_object_set
    at /tmp/buildd/glib2.0-2.22.4/gobject/gobject.c line 1582
  • #17 main
    at polygons.c line 137

Comment 1 Jiri Techet 2010-02-23 23:44:54 UTC
Actually I think this _is_ the correct solution. From what I have seen, champlain_view_add_polygon() was changed to call _ref_sink() so it takes ownership of the polygon:

  view->priv->polygons = g_list_append (view->priv->polygons, g_object_ref_sink (polygon));