GNOME Bugzilla – Bug 172892
Gtk::Action::get_proxies should not free items.
Last modified: 2005-04-28 17:10:31 UTC
Version details: cvs Distribution/Version: slackware + gsb Gtk documents the semantics of gtk_action_get_proxies to be that a pointer to the action's internal proxy list is returned. However, Gtk::Action::get_proxies wraps this method with Glib::OWNERSHIP_SHALLOW meaning that the list is incorrectly freed, so any attempt to call this method after the first time will probably explode in a shower of sparks and flames. The wrap call (if I'm reading my m4 right), should pass Glib::OWNERSHIP_NONE as a third parameter. I have also been told that there are other places where incorrect wrappings of this type are taking place. This doesn't surprise me as the default ownership is SHALLOW.
Thanks. Could you try a patch for this, please? You are the best person to test such a patch. > I have also been told that there are other places where incorrect wrappings of > this type are taking place. Could you please tell them that they should also submit bugs?
I've manually inspected the other uses of GSListHandle in gtkmm (not gdk/pango/atk/glib) and the rest are correct. The reason why this happened is because the signature for a list of widgets is assumed to be SHALLOW but actions break this pattern. I've confirmed that setting OWNERSHIP_NONE fixes the problem, but I can't comment on the best way to fix the m4. Currently the SHALLOW assumption is made in the master m4 script that ships with glibmm. I don't know if that can be overridden locally or not.
It can be overriden locally. Search for #m4 in the .hg files to find examples.
How's this going? Do you need help?
Well, I think I have a modification to action.hg to add the right m4 directives, but how do I regenerate the files?
If you are building from cvs then it should rebuild automatically when you run make at the top level. Here is some help on making patches, in case you need it: http://www.gtkmm.org/bugs.shtml#CreatingPatches
Created attachment 45746 [details] [review] Patch to fix the problem Ok, I was the code to regenerate and I was able to confirm that this change causes the right ownership mode to be used. I can commit it if you're happy with the change.
Excellent. Please apply to both the HEAD and gtkmm-2-6 branches.
Checked in on HEAD and gtkmm-2-6.