Re: how have I managed to break gtk_button_new_with_lable?!
- From: Havoc Pennington <hp redhat com>
- To: mailingLists pangolin org uk
- Cc: gtk list <gtk-app-devel-list gnome org>
- Subject: Re: how have I managed to break gtk_button_new_with_lable?!
- Date: 17 Jun 2001 23:52:13 -0400
rob <mailingLists pangolin org uk> writes:
Here's my bit of code
static void
AttrEditingFrame_init (AttrEditingFrame *self)
{
GtkWidget *vbox;
GtkWidget *newAttrButton;
self->attrEntries = g_ptr_array_new();
vbox = gtk_vbox_new(FALSE, 5);
newAttrButton = gtk_button_new_with_label ("New Attribute");
gtk_signal_connect (GTK_OBJECT (newAttrButton),
"clicked",
create_attr_cb,
self);
gtk_box_pack_start (GTK_BOX (vbox),
newAttrButton,
TRUE, TRUE, 5);
gtk_container_add (GTK_CONTAINER (self), vbox);
}
It segfaults every time when it gets to gtk_button_new_with_label
Under the terminal it says:
Gtk-CRITICAL **: file gtkstyle.c: line 611 (gtk_style_ref): assertion
`style->ref_count > 0' failed.
Under gdb it says:
Program received signal SIGSEGV, Segmentation fault.
0x4059934d in free () from /lib/libc.so.6
any one have any idea I'm completly stumped
Probably the style is getting munged earlier in your program, and the
gtk_button_new_with_label() is the first time you try to use it
post-munge. Styles for widgets are recycled.
Maybe you have one too many gtk_style_unref() someplace, or something
along those lines.
MALLOC_CHECK_=2 can be a useful tool on Linux, see malloc() man page.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]