STORAGE_ERROR on Add, Remove, Add : (was Re: [gtkada] Why do I get a contraint error on Get_Child)

Preben Randhol randhol at pvv.org
Tue May 8 22:22:16 CEST 2001


Preben Randhol <randhol at pvv.org> wrote on 07/05/2001 (14:14) :
> 
> So I tried this:
> 
>    Add (Container, Some_Widget);
>    Remove (Container, Some_Widget);
>    Add (Container, Some_Widget);
> 
> But then I get : Gtk-CRITICAL **: file gtkcontainer.c: line 715
> (gtk_container_add): assertion `widget->parent == NULL' failed.
> 
> I know the code above does not make sense, but I discovered this problem
> as I was switching back and forth between two widget.
> 
> The container is a Vbox and the Some_Widget is a Frame.
> 
> Thanks in advance.

Arg. I just noticed I cut'n'pasted the wrong error message. The error
message above was an old from a different error I made.

This is the error I get:

Gtk-CRITICAL **: file gtkcontainer.c: line 714 (gtk_container_add):
assertion `GTK_IS_WIDGET (widget)' failed.

raised STORAGE_ERROR : stack overflow (or erroneous memory access)

I'm running gvd on the program now and I see that the ptr that the
Some_Widget points to change after the Remove.

Thanks in advance

-- 
Preben Randhol ------------------- http://www.pvv.org/~randhol/ --
                 «For me, Ada95 puts back the joy in programming.»




More information about the gtkada mailing list