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 364947 - Depth related assertion while using gdk_pixmap_new() and gdk_drawable_set_colormap() together
Depth related assertion while using gdk_pixmap_new() and gdk_drawable_set_col...
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: [obsolete] Backend: directfb
2.10.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
Michael Emmel
Depends on:
Blocks:
 
 
Reported: 2006-10-25 10:22 UTC by Siddharth
Modified: 2010-08-25 02:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Scribble example for setting drwable of a pixmap (5.37 KB, text/plain)
2006-10-26 17:04 UTC, Siddharth
Details

Description Siddharth 2006-10-25 10:22:19 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
Comment 1 Michael Emmel 2006-10-25 15:11:49 UTC
I believe this was fixed in CVS.

Have you done a checkout of the latest code ?

If so send me a test program.
Comment 2 Siddharth 2006-10-26 17:03:03 UTC
(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
Comment 3 Siddharth 2006-10-26 17:04:26 UTC
Created attachment 75459 [details]
Scribble example for setting drwable of a pixmap

//TEL indicates that we added those lines.
Comment 4 Michael Emmel 2006-10-28 19:54:15 UTC
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());






Comment 5 Siddharth 2006-11-09 13:34:40 UTC
(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
Comment 6 Matthias Clasen 2010-08-25 02:35:55 UTC
The directfb backend has been removed form GTK 3