Re: [gtk-list] warning/crash removing widgets from box
- From: Havoc Pennington <rhpennin midway uchicago edu>
- To: GTK Mailing List <gtk-list redhat com>
- Subject: Re: [gtk-list] warning/crash removing widgets from box
- Date: Tue, 1 Sep 1998 09:48:26 -0500 (CDT)
On Mon, 31 Aug 1998, Stephen Tell wrote:
> Whatever I try, when running on HP-UX, I get a lot of runtime warnings
> messages of this form but the button does disappear:
> ** WARNING **: invalid cast from `GtkButton' to `GtkToggleButton'
> ** WARNING **: invalid cast from `(unknown)' to `GtkToggleButton'
> ** WARNING **: invalid cast from `(unknown)' to `GtkToggleButton'
> ** WARNING **: invalid cast from `(unknown)' to `GtkToggleButton'
> ** WARNING **: invalid cast from `(unknown)' to `GtkToggleButton'
> ** WARNING **: invalid cast from `(unknown)' to `GtkToggleButton'
>
>
> On Linux I usually get a SIGSEGV, after one or two runtime warnings:
> ** WARNING **: invalid cast from `GtkButton' to `GtkToggleButton'
> ** WARNING **: file gtkcontainer.c: line 359 (gtk_container_remove):
> "widget->parent == GTK_WIDGET (container)"
> ** ERROR **: sigsegv caught
>
These warnings could be a Gtk bug, but more likely it's a bug in your
program. The invalid cast warnings are usually memory corruption (there's
garbage in the GtkObject type field).
Keep in mind that removing from a container will decrement the reference
count and automatically destroy the widget unless you _ref it before you
remove.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]