Adding a boolean breaks my code



Hi folks,

I don't know what is causing this problem, it might be gcc or it might be
gtk or it might be something else!

This happens under sparc solaris 2.6, gtk 1.2.8 with gcc 2.95.2. I compile
it thus:

gcc -Wall code-break.c `gtk-config --cflags --libs gthread`

It compiles, then run it. Use the "a" keys to add a panel (thats all it does
currently). The first panel adds OK, and so does the second but when I add
the third this happens:

Gtk-CRITICAL **: file gtkbox.c: line 332 (gtk_box_pack_start): assertion
`child->parent == NULL' failed.

Gtk-CRITICAL **: file gtkbox.c: line 332 (gtk_box_pack_start): assertion
`child->parent == NULL' failed.

Gtk-CRITICAL **: file gtkcontainer.c: line 715 (gtk_container_add):
assertion `widget->parent == NULL' failed.

Gtk-CRITICAL **: file gtkbox.c: line 332 (gtk_box_pack_start): assertion
`child->parent == NULL' failed.

It appears to be trying to add the first panel again, which it can't.
HOWEVER to fix this simply comment out line 17 which is a gboolean
(displayed) in a struct. When this is not here it runs fine even though this
gboolean is NOT used anywhere.

Its a follow-on from my last question where similar odd things were
happening. Can you folks check it for my under different OSes to see what is
going wrong?

Thanks!!

Rich

code-break.c



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