GNOME Bugzilla – Bug 704700
Gtk.IconView.get_cursor segfault
Last modified: 2013-07-29 07:45:57 UTC
Attached program causes a segfault.
Created attachment 249831 [details] Test case
Confirmed. This seems to be caused by bug #698711. A workaround is to use: Gtk.TreePath.new()
Created attachment 249838 [details] Test case without set_cursor I'm not sure it's related to the TreePath. This test case doesn't call set_cursor and segfaults when you click the item in the IconView.
Created attachment 250327 [details] [review] Add explicit transfer annotations to gtk_icon_view_get_cursor The cell out argument to gtk_icon_view_get_cursor is a pass-through for gtk_cell_area_get_focus_cell which is transfer none. Without this explicit annotation, transfer full is defaulted and introspection bindings will assume ownership of the GtkIconViews reference to the cell, causing crashes. Additionally add explicit transfer full to the path parameter because it is expected the caller will free the returned memory.
Comment on attachment 250327 [details] [review] Add explicit transfer annotations to gtk_icon_view_get_cursor Thanks Simon! LGTM, please push.
Attachment 250327 [details] pushed as b1a0773 - Add explicit transfer annotations to gtk_icon_view_get_cursor