A couple more thoughts about the AppMenuItem. Regarding reference
counting:
AppMenuItem *
app_menu_item_new (IndicateListener * listener, IndicateListenerServer * server)
{
AppMenuItem * self = g_object_new(APP_MENU_ITEM_TYPE, NULL);
AppMenuItemPrivate * priv = APP_MENU_ITEM_GET_PRIVATE(self);
priv->listener = listener;
priv->server = server;
...
}
We're holding onto a pointer to listener, but we never actually
g_object_ref() it. If that Listener were to unref to 0 before this
AppMenuItem does, then once AppMenuItem hits 0 its finalize is going to
try to disconnect signal handlers using a probably invalid pointer. And
I'm also not sure if we're disconnecting signals in the correct place
either anyway..
static void
app_menu_item_dispose (GObject *object)
{
G_OBJECT_CLASS (app_menu_item_parent_class)->dispose (object);
}
static void
app_menu_item_finalize (GObject *object)
{
AppMenuItem * self = APP_MENU_ITEM(object);
AppMenuItemPrivate * priv = APP_MENU_ITEM_GET_PRIVATE(self);
g_signal_handlers_disconnect_by_func(G_OBJECT(priv->listener),
G_CALLBACK(indicator_added_cb), self);
g_signal_handlers_disconnect_by_func(G_OBJECT(priv->listener),
G_CALLBACK(indicator_removed_cb), self);
G_OBJECT_CLASS (app_menu_item_parent_class)->finalize (object);
return;
}
Right now we have a dispose method that's not doing anything. If we
were holding any references to other objects, that would be the right
place to unref them I think. And while we're unreffing them we would
also need to disconnect any signal handlers related to them.
--
indicator-applet crashed with SIGSEGV in strcmp()
https://bugs.launchpad.net/bugs/362124
You received this bug notification because you are a member of Indicator
Applet Developers, which is subscribed to indicator-applet in ubuntu.
Status in “indicator-applet” source package in Ubuntu: Confirmed
Bug description:
Binary package hint: indicator-applet
Jaunty-beta 64-bit
I'm adding new accounts in Pidgin when the crash occurred. It was after a few
notifications (*** is online) [2-4 I think] showed up, then the
indicator-applet crashed - twice in a row. Then Pidgin crashed next.
Two "reload" pop-up showed up for indicator-applet, when I clicked it both, two
indicator-applets showed up in my taskbar. I also reloaded Pidgin after.
ProblemType: Crash
Architecture: amd64
CrashCounter: 1
DistroRelease: Ubuntu 9.04
ExecutablePath: /usr/lib/indicator-applet/indicator-applet
NonfreeKernelModules: nvidia
Package: indicator-applet 0.1.6-0ubuntu1
ProcCmdline: /usr/lib/indicator-applet/indicator-applet
--oaf-activate-iid=OAFIID:GNOME_IndicatorApplet_Factory --oaf-ior-fd=19
ProcEnviron:
LANG=en_PH.UTF-8
SHELL=/bin/bash
Signal: 11
SourcePackage: indicator-applet
StacktraceTop:
strcmp () from /lib/libc.so.6
?? () from /usr/lib/indicators/1/libmessaging.so
g_closure_invoke ()
?? () from /usr/lib/libgobject-2.0.so.0
g_signal_emit_valist ()
Title: indicator-applet crashed with SIGSEGV in strcmp()
Uname: Linux 2.6.28-11-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
_______________________________________________
Mailing list: https://launchpad.net/~dx-team
Post to : [email protected]
Unsubscribe : https://launchpad.net/~dx-team
More help : https://help.launchpad.net/ListHelp