Re: [gtk-list] Re: Problem adding GdkRgb



On Mon, 10 May 1999, Havoc Pennington wrote:
> Have you tried using gdb to see which bad pointer is getting dereferenced?
> gdb can also tell you the arguments gdk_draw_rgb_image() receives, so you
> can see if they are sane.

All the arguments are sane, but the bad dereferenced pointer is really
strange. It gets the segfaults on this line in gdk_draw_rgb_image

  gdk_draw_rgb_image_core (drawable, gc, x, y, width, height,
			   rgb_buf, 3, rowstride, image_info->conv, NULL,
			   0, 0);

All the values it's trying to pass are sane except that image_info is
NULL, so it can't get to image_info->conv. image_info is a static variable
of type (GdkRgbInfo *) in gdkrgb.c and is not set anywhere in the
gdk_draw_rgb_image function. Do I need to make some kind of call to set up
the rgb buffer before I try to us it?
	thanks, jackson

Program received signal SIGSEGV, Segmentation fault.
0x4013a613 in gdk_draw_rgb_image (drawable=0x8074cb0, gc=0x8073be8, x=0,
y=0, width=30, height=10, dith=GDK_RGB_DITHER_NONE, rgb_buf=0x8074ce8 "", 
rowstride=90) at gdkrgb.c:3032



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]