[gtkada] Stack Overflow with 2 Windows

Matthew Goodwin mgoodwin at redrocketconsortium.com
Tue May 8 18:57:21 CEST 2001


Greetings!

Using gate/glade generated forms, I get a "stack overflow
(or erroneous memory access)," error when I do the
following:

I have a control panel (like gimp) that launches a form:

procedure On_Btncontact_Clicked
     (Object : access Gtk_Button_Record'Class)
   is
   begin
        	Contacts_Pkg.Gtk_New (Contacts_Pkg.Contacts);
        	Contacts_Pkg.Show_All (Contacts_Pkg.Contacts);
   end On_Btncontact_Clicked;

I launch two of the same forms (call them A & B), and get
the following behaviour:
if I click the close button
procedure On_Btnclose_Clicked
     (Object : access Gtk_Button_Record'Class)
   is
   begin
      Destroy(Contacts);
   end On_Btnclose_Clicked;

on A, B closes. Then the close button again on A, and the stack overflow
(or erroneous memory access) error.

If I close B, then A - A's close button emits this:
Gtk-CRITICAL **: file gtkobject.c: line 1171
(gtk_object_unref): assertion `object != NULL' failed.

Now, I totally understand what the errors mean, but I am
confused about why:

1) A and B are not unique - I would think Gtk_New would take
care of that.

2) Also, what suggestions are there to make a handler that handles
A and B and C ad infinitum?

Using Gnat3.13p, Linux and Windows98, GtkAda 1.2.8

Thanks for your input,

M. R. Goodwin





More information about the gtkada mailing list