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 336254 - GtkTreeItem broken
GtkTreeItem broken
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.8.x
Other Linux
: Normal normal
: ---
Assigned To: Sven Herzberg
gtk-bugs
: 335424 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-03-27 22:19 UTC by Sven Herzberg
Modified: 2006-05-13 22:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
c source file (235 bytes, text/x-csrc)
2006-03-27 22:21 UTC, Sven Herzberg
  Details
Patch (557 bytes, patch)
2006-03-27 22:43 UTC, Sven Herzberg
none Details | Review

Description Sven Herzberg 2006-03-27 22:19:39 UTC
Yes, I know it's deprecated, but I'm currently hacking on an old application which still uses the GtkTree classes (and which still needs the GtkTree code by GtkTreeView etc).

The attached demo application throws out a lot of warnings which should be fixed IMHO (having errors that always appear makes finding new ones very hard).
Comment 1 Sven Herzberg 2006-03-27 22:21:08 UTC
Created attachment 62161 [details]
c source file

This simple file throws out these warnings:
(demo:24665): Gdk-CRITICAL **: gdk_drawable_get_depth: assertion `GDK_IS_DRAWABLE (drawable)' failed

(demo:24665): 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

(demo:24665): Gdk-CRITICAL **: gdk_drawable_get_depth: assertion `GDK_IS_DRAWABLE (drawable)' failed

(demo:24665): 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
Comment 2 Sven Herzberg 2006-03-27 22:22:12 UTC
Here's a stack trace:

  • #0 __kernel_vsyscall
  • #1 raise
    from /lib/tls/i686/cmov/libc.so.6
  • #2 abort
    from /lib/tls/i686/cmov/libc.so.6
  • #3 g_logv
    from /usr/lib/libglib-2.0.so.0
  • #4 g_log
    from /usr/lib/libglib-2.0.so.0
  • #5 g_return_if_fail_warning
    from /usr/lib/libglib-2.0.so.0
  • #6 IA__gdk_drawable_get_depth
    at gdkdraw.c line 208
  • #7 IA__gtk_pixmap_set
    at gtkpixmap.c line 134
  • #8 gtk_pixmap_finalize
    at gtkpixmap.c line 118
  • #9 g_object_unref
    from /usr/lib/libgobject-2.0.so.0
  • #10 IA__gtk_widget_unref
    at gtkwidget.c line 7102
  • #11 gtk_tree_item_destroy
    at gtktreeitem.c line 905
  • #12 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #13 g_type_class_meta_marshal
    from /usr/lib/libgobject-2.0.so.0
  • #14 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #15 signal_emit_unlocked_R
    from /usr/lib/libgobject-2.0.so.0
  • #16 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #17 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #18 gtk_object_dispose
    at gtkobject.c line 419
  • #19 gtk_widget_dispose
    at gtkwidget.c line 6653
  • #20 g_object_unref
    from /usr/lib/libgobject-2.0.so.0
  • #21 main
    at main.c line 12

Comment 3 Sven Herzberg 2006-03-27 22:43:25 UTC
Created attachment 62162 [details] [review]
Patch

Proposed patch. gtk_pixmap_finalize() calls gtk_pixmap_set(pixmap, NULL, NULL), so val is not always a GDK_DRAWABLE()
Comment 4 Sven Herzberg 2006-03-27 23:02:00 UTC
2006-03-28  Sven Herzberg  <herzi@gnome-de.org>

        reviewed by: Tim Janik

        * gtk/gtkpixmap.c: (gtk_pixmap_set): only check for equal colormaps if
        the new pixmap is not NULL; fixes a warning when gtk_pixmap_set is
        called from gtk_pixmap_finalize (bug 336254)
Comment 5 Mart Raudsepp 2006-04-16 21:10:36 UTC
Was this a regression in just a certain GTK version(s)?
If that's the case, then what versions of GTK are affected?

I have reports of the same problems after some wxGTK changes, and I'm inclined to believe some GTK+ upgrades just happened at the same time, to temporarily introduce these warnings which will be fixed in a later GTK+-2.8.x version. Is this the case?
Comment 6 Matthias Clasen 2006-04-17 01:38:45 UTC
look for changes to gtk_pixmap_set in ChangeLog
Comment 7 Mart Raudsepp 2006-04-17 05:40:39 UTC
Thanks, I found that 2.8.14, 2.8.15 and 2.8.16 are affected with the warning, and 2.8.17 has it fixed from the patch from this bugzilla entry.
Comment 8 Hans Breuer 2006-05-13 22:04:35 UTC
*** Bug 335424 has been marked as a duplicate of this bug. ***