Re: Menu construction problem

From: Jean Bréfort <jean.brefort_at_normalesup.org>
Date: Fri Jan 28 2005 - 21:09:29 CET

Le vendredi 28 janvier 2005 à 08:50 -0500, sum1_lists@yahoo.com a
écrit :
> Jean Bréfort wrote:
> > Le jeudi 27 janvier 2005 à 13:51 +0100, Jean Bréfort a écrit :
> >
> >>Hi,
> >>
> >>When I trty to execute Abiword-2.4 (CVS HEAD), I get several times the
> >>followingcouple of message:
> >>
> >>(AbiWord-2.4:27076): GLib-GObject-WARNING **: invalid unclassed pointer
> >>in cast to `GtkMenuShell'
> >>
> >>(AbiWord-2.4:27076): Gtk-CRITICAL **: gtk_menu_shell_insert: assertion
> >>`GTK_IS_MENU_SHELL (menu_shell)' failed
> >>
> >>I could track the problem to ev_UnixMenu.cpp, lines 681-685. wParent
> >>points in some cases to something which is not a GObject (unclassed
> >>pointer). szLabelName was "Abiword", "Abiword..." or "%s".
> >
> >
> > I could find what happens. I have installed the plugins and one of them
> > (or more) makes bad modifications in the menu tree. I'll try to figure
> > out which later.
>
> It may be the AbiMagick plugin (Bug 7211):
> http://www.abisource.com/mailinglists/abiword-user/2004/Nov/0087.html

Yes, the problem appears when this plugin is loaded. It tries to insert
new menus after "Format &Image" which does not exist.
The result is that XAP_Menu_Factory::addNewMenuAfter does not insert
anything and returns 0, but the plugin calls :
pFact->addNewLabel(NULL,newID,mfi[i].label, mfi[i].description);
and :
pActionSet->addAction(myAction);
Following these operations, when EV_UnixMenu::synthesizeMenu is called,
there is no problem for File and Edit menus, but for the View menu, the
menu has no label (the pointer has been changed when the AbiMagick
plugin was loaded) but a dynamic label and then no submenu is created.
Next, the menus which should go in the View menu go to the main menu bar
and at the end of the menu, the menu bar is poped out of the stack which
remains empty. The crash does not occur immediately but...

IMHO, addNewLabel and addAction should not allow the insertion of en
entry with ID==0.

Regards,
Jean
Received on Fri Jan 28 21:11:11 2005

This archive was generated by hypermail 2.1.8 : Fri Jan 28 2005 - 21:11:11 CET