Very odd segfault
- From: jay <mocat best com>
- To: gtk-list redhat com
- Subject: Very odd segfault
- Date: Wed, 22 Sep 1999 22:53:56 -0700 (PDT)
Never seen anything like this before... here are a few snips of code, and
the message I'm getting from gdb.
typedef struct {
GtkWidget *d_area; /* drawing area */
GtkWidget *ent;
} Darea;
struct {
GtkWidget *entry1;
2;
......etc
} mystruct;
calling_func(mystruct.entry1, &vbox);
void calling_func (GtkWidget *entry, GtkWidget **box)
{
GtkWidget *frame;
Darea *da_en;
frame = gtk_frame_new("framename");
entry = gtk_entry_new();
set_default_ent(entry); /* sets text in entry with
gtk_entry_set_text */
da_en->ent = (gpointer)entry;
gtk_container_add(GTK_CONTAINER(frame), da_en->ent);
gtk_box_pack_start(GTK_BOX(*box), frame, FALSE, FALSE, 0);/*dies
here*/
.....
....
...
..
.
}
here's the output i get from gdb...
(gdb) n
gtk_box_pack_start(GTK_BOX(*box), frame, FALSE, FALSE, 0);
(gdb) n
Program received signal SIGSEGV, Segmentation fault.
gtk_type_check_object_cast (type_object=0x8071a40, cast_type=40469)
at gtktypeutils.c:637
637 gtktypeutils.c: No such file or directory.
(gdb)
Never seen anything like that before...
Everything worked before I added the "da_en->ent = (gpointer)entry;" line,
but I have no idea how the function that segfaults relates to this line.
Thanks for any help...
j
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]