After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 573287 - Warning on startup
Warning on startup
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2009-02-26 16:18 UTC by Bastien Nocera
Modified: 2009-02-28 06:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bastien Nocera 2009-02-26 16:18:18 UTC
Using this piece of code, which replicates what the bluetooth-applet does, I get warnings like:
(test:6558): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GObject'

(test:6558): GLib-GObject-CRITICAL **: g_object_notify: assertion `G_IS_OBJECT (object)' failed

---8<---
#include <gtk/gtk.h>

int main (int argc, char **argv)
{
        GtkStatusIcon *icon;

        gtk_init (&argc, &argv);
        icon = gtk_status_icon_new (); 
        g_object_unref (icon);
        icon = gtk_status_icon_new_from_icon_name ("bluetooth");
        gtk_status_icon_set_visible (icon, TRUE);

        gtk_main (); 

        return 0;
}
---8<---

This is the original commit:
http://git.kernel.org/?p=bluetooth/bluez-gnome.git;a=commitdiff;h=3ffd5b285ef8b07a7bfa653f6222031b064c61d7

Not sure which GtkStatusIcon bug Marcel was working around there...
Comment 1 Matthias Clasen 2009-02-28 06:33:20 UTC
2009-02-28  Matthias Clasen  <mclasen@redhat.com>

        Bug 573287 – Warning on startup

        * gtk/gtkstatusicon.c (gtk_status_icon_finalize): Disconnect
        all tray icon signals. Noticed by Bastien Nocera