segfault problem.



Hello...

I have a gtk_wndow with two "forms" on it, with each form being made up of several entry widgets, and a couple of combo boxes.

The two forms are identical, and I have a button between the two that transfers the information in form1 over to the corresponding boxes in form2.

At least, that's what it's supposed to do. The forms are built from the same code, with pointers to the entry wdgets being stored in structs for later use. The code is identical with the exception of the struct name. The first 5 fields (all entry widgets) transfer just fine. The last 3 segfault. That is to say...if I comment out #s 7 & 8, number 6 segfaults. If I comment out 6 & 8, the 7 segfaults. I am dong a simple gtk_editable_get_chars to grab the info, and
gtk_entry_set_text to place it in the corresponding box in form2.

I have checked and double checked all my declarations. I finally ran it through gdb, which reported the following error:

Program received signal SIGSEGV, Segmentation fault.
0x4015d8a8 in gtk_type_check_object_cast () at eval.c:41
41      eval.c: No such file or directory.
       in eval.c


eval.c is NOT one of my files. Here is the line that causes that error to appear from my code, along wth the var declaration:

gchar *tmp6;

tmp6 = gtk_editable_get_chars(GTK_EDITABLE(billto->address1), 0, -1);
 gtk_entry_set_text(GTK_ENTRY(shipto->address1), tmp6);
 g_free(tmp6);

there are 5 identical lines above that which work fine. The entry widget in question is set to a max size of 64 chars, but so is the target widget, and the data isn't anywhere near that long in the first place.

the billto and shipto structs are the same, and consisit entirely of GtkWidget *.

Any ideas?  I'm all out.

Thanks in advamce...

-HaB


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp




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