GNOME Bugzilla – Bug 87440
Cant generate c code for a textbox with a predefined text placed in a dialog
Last modified: 2003-04-01 14:23:19 UTC
If Here's the sequence to show the problem: -Open glade (mine is version 0.6.4, debian sid, libgtk1.2-dev) * With gtk+ basic: -Click on Dialog to make a new dialog1 appear -Click on TextBox and then click on the upper half to place the textbox there. -Save the project (accepting the defaults). -Build the source (works ok, no problem). * until here ok, now lets see the bug -Open property editor dialog, and click on text1 to change its properties. -Add a simple character to the "Text" item (widget tab). -Save the project (works ok) -Build the source (it segfaults or it locks). I've tested with two different debian machines (one locks and the other segfaults). Placing the textbox in a simple window doesn't show this problem. Yesterday, at home, i compiled it with debug support and i saw it segfaults while closing a file (i suppose the file was closed earlier by an error, i don't know). Later i, at home, i could send you the gdb backtrace if you wish. That's all, thanks for reading this. Alberto
Yes, a stack trace would be useful. I don't think I've seen this problem before which suggests it may be a problem with your setup.
Here comes the backtrace: -----
+ Trace 24738
#3 is the following code: /* Now close any files which were opened. */ if (interface_h_fp) fclose (interface_h_fp); // this segfaults if (interface_c_fp) fclose (interface_c_fp); if (callback_h_fp) fclose (callback_h_fp); if (callback_c_fp) fclose (callback_c_fp); interface.h and interface.c sometimes are created 0 bytes of size, sometimes are broken and sometimes are ok. I've enough space in disk. Sometimes i have to push build button twice to get it hang. If i type the "a" key inside the GtkText, when it works, <text>a</text> in glade only adds the following line in c (line not too complex... :-?): gtk_text_insert (GTK_TEXT (text1), NULL, NULL, NULL, "a", strlen("a"));
Thanks for the trace. It is crashing in free(), which suggests some memory corruption. We might be able to spot the problem with valgrind or purify.
I've tried the bug with glade 1.1.0 for gtk+2 and it doesn't exhibe this problem, only glade 0.6.4 for gtk+1.2. Surely 1.1.0 it's a mayor rewritten, and knowing where this bug is wouldn't help release 1.1.x. So, if you're actively developing 1.1, i think you can forget this minor bug and concentrate in the 1.1 release.
*** Bug 77778 has been marked as a duplicate of this bug. ***