Gtk-CRITICAL: gtk_pixmap_set: assertion....
- From: Ang Bodhi <angbodhi pacific net sg>
- To: gtk-app-devel-list gnome org
- Subject: Gtk-CRITICAL: gtk_pixmap_set: assertion....
- Date: Sat, 25 Mar 2006 08:24:53 -0800 (PST)
Hi,
My application is getting the following error messages when it is closed by
clicking on its close window button:
(qmorf:27039): Gdk-CRITICAL **: gdk_drawable_get_depth: assertion
`GDK_IS_DRAWABLE (drawable)' failed
(qmorf:27039): Gtk-CRITICAL **: gtk_pixmap_set: assertion
`gdk_colormap_get_visual (gtk_widget_get_colormap (GTK_WIDGET
(pixmap)))->depth == gdk_drawable_get_depth (GDK_DRAWABLE (val))' failed
I try some debugging and find that on closing the application, the function
gtk_pixmap_finalize() was called:
static void
gtk_pixmap_finalize (GObject *object)
{
gtk_pixmap_set (GTK_PIXMAP (object), NULL, NULL);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
The gtk_pixmap_finalize() pass NULL as the val parameter on a call to
gtk_pixmap_set(), which has some parameter checking code:
void
gtk_pixmap_set (GtkPixmap *pixmap,
GdkPixmap *val,
GdkBitmap *mask)
{
gint width;
gint height;
gint oldwidth;
gint oldheight;
g_return_if_fail (GTK_IS_PIXMAP (pixmap));
g_return_if_fail (gdk_colormap_get_visual (gtk_widget_get_colormap
(GTK_WIDGET (pixmap)))->depth == gdk_drawable_get_depth (GDK_DRAWABLE
(val)));
........
}
It appear that both the error messages I get is due to the result of val
argument being NULL. Even if my application simply connect the delete_event
and destroy signal as follow, I still get the error messages:
g_signal_connect_swapped (mainWidget, "delete_event",
G_CALLBACK (gtk_widget_destroy),
mainWidget);
g_signal_connect (mainWidget, "destroy",
G_CALLBACK (gtk_main_quit), NULL);
I'm currently using Gtk+-2.8.14. Is the above problem a bug? If it is not a
bug, how can I avoid the messages?
Thanks,
Bodhi
--
View this message in context:
http://www.nabble.com/Gtk-CRITICAL%3A-gtk_pixmap_set%3A-assertion....-t1341792.html#a3588235
Sent from the Gtk+ - Apps Dev forum at Nabble.com.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]