Re: UIManager get_action_groups



On Wed, 2005-10-12 at 13:10 +0200, Murray Cumming wrote:
> > Hi,
> >
> > I'm trying to create dynamic menus using the UIManager, and am running
> > into a few problems, Gtkmm-2.6.4.
> >
> > I'm basically trying to add an option to an existing menu structure.
> > I've got a simple test app and a callback which attempts to add a new
> > Action to an ActionGroup, then update the UIManager with
> > add_ui_from_string.
> >
> > First of all, if I call
> >   uimanager->get_action_groups()
> > and do nothing more, when I exit a test case app, I get several lines
> > sush as;
> >
> > (a.out:17434): GLib-GObject-CRITICAL **: g_object_unref: assertion
> > `G_IS_OBJECT (object)' failed
> >
> > This also happens if I click the same menuitem to perform the callback
> > again, and sometimes I just get a Segmentation fault.
> >
> > is this somehow related to this post?
> > http://mail.gnome.org/archives/gtkmm-list/2004-March/msg00184.html
> 
> Yes, it is probably similar. In this case, the ListHandle probably needs
> to use a different ownership. Could you please add a bugzilla entry for
> it, so someone can fix it when they have a chance.

OK, bug 318675.

I manually replaced Glib::OWNERSHIP_SHALLOW with, Glib::OWNERSHIP_NONE
in uimanager.cc and rebuilt, which solved my immediate problem, not sure
if that was the correct thing to do though.

~Colin.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]