testgtksheet bug



Hello,

Sorry about the repost but I have not received any response in 4 days and thought that the post might have gotten sucked up by the previous thread due to the misleading subject I gave it (gtk_marshal_BOOL__POINTER ()).


I have just reproduced the bug described below using testgtksheet.  The
output of the core dump is:

[root wolverine .libs]# gdb lt-testgtksheet ../core.13438
GNU gdb Red Hat Linux (6.1post-1.20040607.43rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host
libthread_db library "/lib/tls/libthread_db.so.1".

Core was generated by `lt-testgtksheet'.
Program terminated with signal 6, Aborted.
Reading symbols from
/usr/src/redhat/BUILD/gtk+extra-0.99.17/gtkextra/.libs/libgtkextra-0.99.so.17...done.
Loaded symbols for
/usr/src/redhat/BUILD/gtk+extra-0.99.17/gtkextra/.libs/libgtkextra-0.99.so.17
Reading symbols from /usr/lib/libgtk-1.2.so.0...done.
Loaded symbols for /usr/lib/libgtk-1.2.so.0
Reading symbols from /usr/lib/libgdk-1.2.so.0...done.
Loaded symbols for /usr/lib/libgdk-1.2.so.0
Reading symbols from /usr/lib/libgmodule-1.2.so.0...done.
Loaded symbols for /usr/lib/libgmodule-1.2.so.0
Reading symbols from /usr/lib/libglib-1.2.so.0...done.
Loaded symbols for /usr/lib/libglib-1.2.so.0
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /usr/X11R6/lib/libXi.so.6...done.
Loaded symbols for /usr/X11R6/lib/libXi.so.6
Reading symbols from /usr/X11R6/lib/libXext.so.6...done.
Loaded symbols for /usr/X11R6/lib/libXext.so.6
Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
Loaded symbols for /usr/X11R6/lib/libX11.so.6
Reading symbols from /lib/tls/libm.so.6...done.
Loaded symbols for /lib/tls/libm.so.6
Reading symbols from /lib/tls/libc.so.6...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from
/usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2...done.
Loaded symbols for /usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2
Reading symbols from /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2...done.
Loaded symbols for /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /usr/lib/gtk/themes/engines/libbluecurve.so...done.
Loaded symbols for /usr/lib/gtk/themes/engines/libbluecurve.so
Reading symbols from /usr/lib/libgdk_pixbuf.so.2...done.
Loaded symbols for /usr/lib/libgdk_pixbuf.so.2
Reading symbols from /usr/X11R6/lib/libXcursor.so.1...done.
Loaded symbols for /usr/X11R6/lib/libXcursor.so.1
Reading symbols from /usr/X11R6/lib/libXrender.so.1...done.
Loaded symbols for /usr/X11R6/lib/libXrender.so.1
#0  0x00a1dbc8 in gdk_draw_rectangle () from /usr/lib/libgdk-1.2.so.0
(gdb) bt
#0  0x00a1dbc8 in gdk_draw_rectangle () from /usr/lib/libgdk-1.2.so.0
#1  0x002b6abf in draw_xor_rectangle (sheet=0x872ef10, range=
      {row0 = 12, col0 = 3, rowi = 12, coli = 3}) at gtksheet.c:6822
#2  0x002c8e24 in gtk_sheet_button_press (widget=0x872ef10, event=0x879cbb8)
    at gtksheet.c:4708
#3  0x00be0e79 in gtk_marshal_BOOL__POINTER () from /usr/lib/libgtk-1.2.so.0
#4  0x00baf333 in gtk_signal_emit_stop_by_name () from
/usr/lib/libgtk-1.2.so.0
#5  0x00bafee7 in gtk_signal_emit () from /usr/lib/libgtk-1.2.so.0
#6  0x00b751b9 in gtk_widget_event () from /usr/lib/libgtk-1.2.so.0
#7  0x00be2c0c in gtk_propagate_event () from /usr/lib/libgtk-1.2.so.0
#8  0x00be2fa7 in gtk_main_do_event () from /usr/lib/libgtk-1.2.so.0
#9  0x00a1d620 in gdk_event_get () from /usr/lib/libgdk-1.2.so.0
#10 0x009e7287 in g_get_current_time () from /usr/lib/libglib-1.2.so.0
#11 0x009e7f13 in g_main_add_poll () from /usr/lib/libglib-1.2.so.0
#12 0x009e80e5 in g_main_run () from /usr/lib/libglib-1.2.so.0
#13 0x00be2232 in gtk_main () from /usr/lib/libgtk-1.2.so.0
#14 0x0804ede2 in main (argc=1, argv=0xbfe73214) at testgtksheet.c:1394
(gdb)

Any help you can give us to solve this problem would be greatly appreciated.

Thanks,

Patrick McEvoy

On Wed, Sep 14, 2005 at 05:22:08PM -0500, John Gotts wrote:
Hi, I'm working on solving an intermittent bug with our gtk+ 1.x/Glade 1.x
application, although my problem should be general enough that people more
accustomed to 2.x should be able to help.

We're embedding the GtkSheet widget as a custom widget.  Occasionally, for no
rhyme or reason, Gtk+ gets into a CPU-consuming loop where the user is locked
out of X.  Only changing to a virtual terminal and delivering a signal to the
running process will allow the user to interact with X again.  This bug has
occurred using various versions of the X server, Fedora Core 2 and 3, RHL 9,
and on desktops and laptops.  When I deliver a signal to the running process I
get something like this:

#0  0x008bc380 in XDrawRectangle () from /usr/X11R6/lib/libX11.so.6
(gdb) bt
#0  0x008bc380 in XDrawRectangle () from /usr/X11R6/lib/libX11.so.6
#1  0x00a1dc68 in gdk_draw_rectangle () from /usr/lib/libgdk-1.2.so.0
#2  0x00214abf in gtk_sheet_get_active_cell ()
   from /usr/lib/libgtkextra-0.99.so.17
#3  0x00226e24 in gtk_sheet_delete_rows () from /usr/lib/libgtkextra-0.99.so.17
#4  0x00be0e79 in gtk_marshal_BOOL__POINTER () from /usr/lib/libgtk-1.2.so.0
#5  0x00baf333 in gtk_signal_emit_stop_by_name () from /usr/lib/libgtk-1.2.so.0
#6  0x00bafee7 in gtk_signal_emit () from /usr/lib/libgtk-1.2.so.0
#7  0x00b751b9 in gtk_widget_event () from /usr/lib/libgtk-1.2.so.0
#8  0x00be2c0c in gtk_propagate_event () from /usr/lib/libgtk-1.2.so.0
#9  0x00be2fa7 in gtk_main_do_event () from /usr/lib/libgtk-1.2.so.0
#10 0x00a1d620 in gdk_event_get () from /usr/lib/libgdk-1.2.so.0
#11 0x009e7287 in g_get_current_time () from /usr/lib/libglib-1.2.so.0
#12 0x009e7f13 in g_main_add_poll () from /usr/lib/libglib-1.2.so.0
#13 0x009e80e5 in g_main_run () from /usr/lib/libglib-1.2.so.0
#14 0x00be2232 in gtk_main () from /usr/lib/libgtk-1.2.so.0
#15 0x080d3357 in main (argc=1, argv=0xbfe33584) at main.c:113

gtk_sheet_delete_rows() is never called by my program.  gtk_sheet_get_active_
cell() is never called by gtk_sheet_delete_rows().  gdk_draw_rectangle() is
never called by gtk_sheet_get_active_cell().  Every backtrace of the running
process is identical up to #2, although there are some variations above it.
When I put a debugging printf() in gtk_sheet_delete_rows() nothing is printed,
which tells me that the stack got corrupted somehow.  Admittedly, I'm no
debugger expert.  Perhaps someone could fill me in on how obviously not
called functions can appear in a backtrace?

Any clues on how to diagnose this problem?  Is it just a random double free()
somewhere in my application which happens to stomp all over memory or could it
be a Gtk+ bug of some kind?

ah, don't you love problems like that?  I love them.  ;)

first re-compile with optimizations turned off.  still have a problem?
still get a weird stack?  compiler optimazations can make instructions
seem to run out of order.  I don't recall this ever affecting the stack
like this though.

second.  are you using any sort of non-linear processing like threads or
posix signals?  or... long-jump stuff?  (other?)  Don't mess with any
gtk widgets during a posix signal handler.  it will screw things up.

also, when I'm looking at wonky stacks I look for pointers that point
into the stack, and double check how they're being used.

good luck.

- - Ben
_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list





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