GNOME Bugzilla – Bug 364947
Depth related assertion while using gdk_pixmap_new() and gdk_drawable_set_colormap() together
Last modified: 2010-08-25 02:35:55 UTC
Please describe the problem: Hi, We are working for Mozilla over DFB. We are using GTKDFB port. We are getting some assertions related to depth while setting the colormap for a drawable. The problem occurs when we create a pixmap and then set a colormap for it. It says that the depth of drawable is not equal to the depth of colormap. Typical steps are: 1. pixmap = gdk_pixmap_new(NULL,x,y, gdk_rgb_get_visual()); 2. gdk_drawable_set_colormap(pixmap, gdk_rgb_get_colormap()); If we execute the same thing on X, it doesn't give assertion. Regards, Siddharth Steps to reproduce: 1. pixmap = gdk_pixmap_new(NULL,x,y, gdk_rgb_get_visual()); 2. gdk_drawable_set_colormap(pixmap, gdk_rgb_get_colormap()); 3. Actual results: Depth related assertion Expected results: Does this happen every time? Yes Other information: Versions: DirectFB 1.0, GTK 2.10.1, glib-2.12.0 atk-1.10.1 cairo-1.2.4 pango-1.14.0
I believe this was fixed in CVS. Have you done a checkout of the latest code ? If so send me a test program.
(In reply to comment #1) > I believe this was fixed in CVS. > Have you done a checkout of the latest code ? > If so send me a test program. Hi, We tried today with CVS version but still the problem exists. Attached here is the scribble prog from GTK examples. We hav added two lines to set colormap which throws assertions related to depth. It will be better if you can verify this. Regards, Siddharth
Created attachment 75459 [details] Scribble example for setting drwable of a pixmap //TEL indicates that we added those lines.
I assert under X11 with those two lines of code. (a.out:4742): Gdk-CRITICAL **: gdk_drawable_set_colormap: assertion `GDK_IS_DRAWABLE (drawable)' failed And I get a compile warningfoo.c: In function 'main': foo.c:102: warning: passing argument 4 of 'gdk_pixmap_new' makes integer from pointer without a cast GdkPixmap* pixmap = gdk_pixmap_new(NULL,0,0, gdk_rgb_get_visual()); gdk_drawable_set_colormap(pixmap, gdk_rgb_get_colormap());
(In reply to comment #4) > I assert under X11 with those two lines of code. > (a.out:4742): Gdk-CRITICAL **: gdk_drawable_set_colormap: assertion > `GDK_IS_DRAWABLE (drawable)' failed > And I get a compile warningfoo.c: In function 'main': > foo.c:102: warning: passing argument 4 of 'gdk_pixmap_new' makes integer from > pointer without a cast > GdkPixmap* pixmap = gdk_pixmap_new(NULL,0,0, gdk_rgb_get_visual()); > gdk_drawable_set_colormap(pixmap, gdk_rgb_get_colormap()); Sorry for the late reply. The fourth arg in gdk_pixmap_new was written incorrectly in the bug report. Actually it should be: 1. pixmap = gdk_pixmap_new(NULL,x,y, gdk_rgb_get_visual()->depth); 2. gdk_drawable_set_colormap(pixmap, gdk_rgb_get_colormap()); I hope this input may be helpful. Regards, Siddharth
The directfb backend has been removed form GTK 3