After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 87440 - Cant generate c code for a textbox with a predefined text placed in a dialog
Cant generate c code for a textbox with a predefined text placed in a dialog
Status: RESOLVED OBSOLETE
Product: glade-legacy
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Damon Chaplin
Damon Chaplin
: 77778 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-07-05 15:57 UTC by alberto
Modified: 2003-04-01 14:23 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description alberto 2002-07-05 15:57:40 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
Comment 1 Damon Chaplin 2002-07-05 18:48:46 UTC
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.
Comment 2 alberto 2002-07-05 23:40:22 UTC
Here comes the backtrace:

-----
  • #0 free
    from /lib/libc.so.6
  • #1 free
    from /lib/libc.so.6
  • #2 fclose
    from /lib/libc.so.6
  • #3 source_write_interface_and_callbacks
    at source.c line 332
  • #4 source_write_internal
    at source.c line 265
  • #5 source_write
    at source.c line 156
  • #6 glade_project_write_c_source
    at glade_project.c line 414
  • #7 glade_project_write_source
    at glade_project.c line 389
  • #8 glade_project_window_real_write_source
    at glade_project_window.c line 1298
  • #9 glade_project_window_write_source
    at glade_project_window.c line 1285
  • #10 gtk_marshal_NONE__NONE
    from /usr/lib/libgtk-1.2.so.0
  • #11 gtk_signal_remove_emission_hook
    from /usr/lib/libgtk-1.2.so.0
  • #12 gtk_signal_set_funcs
    from /usr/lib/libgtk-1.2.so.0
  • #13 gtk_signal_emit
    from /usr/lib/libgtk-1.2.so.0
  • #14 gtk_button_clicked
    from /usr/lib/libgtk-1.2.so.0
  • #15 gtk_button_get_relief
    from /usr/lib/libgtk-1.2.so.0
  • #16 gtk_marshal_NONE__NONE
    from /usr/lib/libgtk-1.2.so.0
  • #17 gtk_signal_set_funcs
    from /usr/lib/libgtk-1.2.so.0
  • #18 gtk_signal_emit
    from /usr/lib/libgtk-1.2.so.0
  • #19 gtk_button_released
    from /usr/lib/libgtk-1.2.so.0
  • #20 gtk_button_get_relief
    from /usr/lib/libgtk-1.2.so.0
  • #21 gtk_marshal_BOOL__POINTER
    from /usr/lib/libgtk-1.2.so.0
  • #22 gtk_signal_set_funcs
    from /usr/lib/libgtk-1.2.so.0
  • #23 gtk_signal_emit
    from /usr/lib/libgtk-1.2.so.0
  • #24 gtk_widget_event
    from /usr/lib/libgtk-1.2.so.0
  • #25 gtk_propagate_event
    from /usr/lib/libgtk-1.2.so.0
  • #26 gtk_main_do_event
    from /usr/lib/libgtk-1.2.so.0
  • #27 gdk_wm_protocols_filter
    from /usr/lib/libgdk-1.2.so.0
  • #28 g_get_current_time
    from /usr/lib/libglib-1.2.so.0
  • #29 g_get_current_time
    from /usr/lib/libglib-1.2.so.0
  • #30 g_main_run
    from /usr/lib/libglib-1.2.so.0
  • #31 gtk_main
    from /usr/lib/libgtk-1.2.so.0
  • #32 main
    at main.c line 152

#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"));
Comment 3 Damon Chaplin 2002-07-08 17:52:45 UTC
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.
Comment 4 alberto 2002-07-10 17:45:48 UTC
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.
Comment 5 Ben FrantzDale 2002-10-24 22:46:36 UTC
*** Bug 77778 has been marked as a duplicate of this bug. ***
Comment 6 Ben FrantzDale 2002-10-24 22:49:15 UTC
*** Bug 77778 has been marked as a duplicate of this bug. ***