Hi,
i update some pixbuf images once a second, when the application runs for
more than 30minutes or so the
images disapear and i get a bunch of the following message:

cryptomaster:16742): GLib-GObject-CRITICAL **: g_object_unref: assertion
`G_IS_OBJECT (object)' failed

I assume its some unfread memory, but i havent really been able to track
this errors.
I tried valgrind, but im to much noob for this one. thx.

this is the function that updates the pixbuf

gboolean crypto_mapper_set_pixbuf(gpointer data)
{
    struct treedata *tree = data;
    gchar *mapper;
    GtkTreeIter iter;
    GdkPixbuf *pix_map;
    //g_print("callback\n");

    if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(tree->store), &iter))
{
        g_print("crypto_mapper_set_pixbuf says list is empty\n");
        return TRUE;
    }

    do {
        gtk_tree_model_get(GTK_TREE_MODEL(tree->store), &iter, NAME_COLUMN,
&mapper, -1);
        //g_print("MOUNTPOINT_COLUMN: %s\n", mountpoint);

        if (crypto_mapper_check(mapper)) {
            //g_print("%s FOUND\n", mountpoint);
            pix_map = gdk_pixbuf_new_from_file(INIT_YES, NULL);
            gtk_list_store_set(tree->store, &iter, INIT_COLUMN, pix_map,
-1);
            //g_object_unref(G_OBJECT(pix_map));
        } else {
            //g_print("%s NOT FOUND\n", mountpoint);
            pix_map = gdk_pixbuf_new_from_file(INIT_NO, NULL);
            gtk_list_store_set(tree->store, &iter, INIT_COLUMN, pix_map,
-1);
            //g_object_unref(G_OBJECT(pix_map));
        }

    } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(tree->store), &iter));

    g_object_unref(GDK_PIXBUF(pix_map));
    g_free(mapper);
    return TRUE;
}
I played a bit with the unref function, without luck.

the whole packed project can be downloaded here:

http://profile.az-lantech.de/projects/Project_Cryptomaster/files/cryptomaster.tar.gz

thx for your support, again ;)

rupert
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to