Re: [gtk-list] help with colors & randomness
- From: Havoc Pennington <rhp zirx pair com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] help with colors & randomness
- Date: Sat, 19 Jun 1999 03:42:19 -0400 (EDT)
On Fri, 18 Jun 1999, Travis Loyd wrote:
> I keep getting this error:
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x4015bed5 in gdk_pixmap_create_from_data () from /usr/lib/libgdk-1.2.so.0
>
> It happends at different times on different machines. I don't know why. I
> can run many copies of this program on my machine it would seem like there
> should be plenty of colors for everything.
>
SEGV is a segmentation violation, nothing to do with number of colors. It
means there was a bad memory access.
> I use these 3 lines concerning colormaps at different points thoughout
> the game:
>
> colormap = gtk_widget_get_colormap (mother->main_window);
> player_xpm[ctr] = gdk_pixmap_colormap_create_from_xpm_d(
> NULL, colormap, &player_mask[ctr], NULL,
> player_data[ctr]);
> gdk_colormap_unref(colormap);
>
I don't think you are supposed to unref this colormap, so it gets
destroyed prematurely, then someone tries to access it and boom, it's a
bad memory access -> SEGV.
HTH,
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]