Re: colormap assertion errors

B.Hakvoort wrote:
On Mon, 2004-11-29 at 09:51 -0600, Rob Benton wrote:

Hey I've been working with the drawarea widgets lately and I've run into a strange problem. I don't know if I've found a bug or if something is missing from my code.

Basically what I have is a window with an eventbox which holds a drawarea widget. When clicked it pops up a dialog with another drawarea widget. If I open this dialog 10 times or more, when I close the main window I get lots of GDK_IS_COLORMAP assertion errors.

Hi Rob,

A while ago i experienced something similar.. It turned out i didn't
free colors i had allocated before with alloc_color() .

To free them i use free_colors()

I'm not sure if this will help you, but's it's worth the try ;)


I've narrowed down the error to one variable, the Gdk::Colormap. That's what's failing the assertion with:

(chip:3201): GLib-GObject-CRITICAL **: file gobject.c: line 1579 (g_object_unref): assertion `G_IS_OBJECT (object)' failed (chip:3201): Gdk-CRITICAL **: file gdkcolor-x11.c: line 690 (gdk_colormap_free_colors): assertion `GDK_IS_COLORMAP (colormap)' failed

I'm declaring a Gtk::DrawingArea member variable on the stack and a Glib::RefPtr<Gdk::Colormap> member variable. Then I'm using this line inside the class' constructor:

_colormap = _drawarea.get_default_colormap();

Is there a step I'm missing?

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