bug in testgtk/gtklayout



When I fire up testgtk, try the layout test and then close the window
using the window manager it will either hang or crash.  This seems to be
due to a bad pointer being passed into gdk_window_destroy which
eventually makes it down to a free().  This is easily to reproduce on my
system, it happens every time.  I haven't been able to track it down but
here's a stack trace and other related debugging information:

(gdb) print window
$35 = (GdkWindow *) 0x814d5b0
(gdb) down
#2  0x40204f3d in g_free (mem=0x814d5b0) at gmem.c:370
(gdb) up
#3  0x40140194 in gdk_window_unref (window=0x814d5b0) at gdkwindow.c:694
(gdb) print *((GdkWindowPrivate *)window)
$36 = (GdkWindowPrivate *) 0x814d5b0
(gdb) 
$37 = (GdkWindowPrivate *) 0x814d5b0
(gdb) print *((GdkWindowPrivate *)window)->xdisplay
$38 = {window = {user_data = 0x0}, parent = 0x8143c48, xwindow =
62916004, xdisplay = 0x806e238, x = 0, 
  y = 22100, width = 81, height = 22, resize_count = 0 '\000',
window_type = 2 '\002', ref_count = 0, 
  destroyed = 1, extension_events = 0, filters = 0x0, colormap =
0x80840c8, children = 0x0}
(gdb) print *((GdkWindowPrivate *)window)->xdisplay
$39 = {ext_data = 0x0, private1 = 0x806e778, fd = 4, private2 = 0,
proto_major_version = 11, 
  proto_minor_version = 0, vendor = 0x806e7a8 "The XFree86 Project,
Inc", private3 = 62914560, 
  private4 = 4194303, private5 = 2383, private6 = 0, resource_alloc =
0x4018cca4 <_XAllocID>, 
  byte_order = 0, bitmap_unit = 32, bitmap_pad = 32, bitmap_bit_order =
0, nformats = 2, 
  pixmap_format = 0x806f120, private8 = 11, release = 3320, private9 =
0x8170a98, 
  private10 = 0x8173d90, qlen = 18, last_request_read = 21028, request =
21669, 
  private11 = 0x401efcb0 "", private12 = 0x806e880 "\004", private13 =
0x806e880 "\004", 
  private14 = 0x806f080 "", max_request_size = 65535, db = 0x0,
private15 = 0, 
  display_name = 0x806e828 ":0.0", default_screen = 0, nscreens = 1,
screens = 0x806f148, 
  motion_buffer = 256, private16 = 0, min_keycode = 8, max_keycode =
134, private17 = 0x0, 
  private18 = 0x0, private19 = 0, xdefaults = 0x0}
(gdb) print *((GdkWindowPrivate *)window)
$40 = {window = {user_data = 0x0}, parent = 0x8143c48, xwindow =
62916004, xdisplay = 0x806e238, x = 0, 
  y = 22100, width = 81, height = 22, resize_count = 0 '\000',
window_type = 2 '\002', ref_count = 0, 
  destroyed = 1, extension_events = 0, filters = 0x0, colormap =
0x80840c8, children = 0x0}
(gdb) print window
$41 = (GdkWindow *) 0x814d5b0
(gdb) down
#2  0x40204f3d in g_free (mem=0x814d5b0) at gmem.c:370
(gdb) print mem
$42 = (void *) 0x3b8
(gdb) where
#0  0x4026daca in chunk_free (ar_ptr=0x402c2420, p=0x814d5a8) at
malloc.c:2969
#1  0x4026d7c1 in __libc_free (mem=0x814d5b0) at malloc.c:2872
#2  0x40204f3d in g_free (mem=0x814d5b0) at gmem.c:370
#3  0x40140194 in gdk_window_unref (window=0x814d5b0) at gdkwindow.c:694
#4  0x40129316 in gdk_event_translate (event=0x809cf98,
xevent=0xbffffb1c) at gdk.c:2929
#5  0x40127129 in gdk_event_get () at gdk.c:992
#6  0x40090c0f in gtk_main_iteration_do (blocking=1) at gtkmain.c:674
#7  0x40090b83 in gtk_main_iteration () at gtkmain.c:619
#8  0x400909e5 in gtk_main () at gtkmain.c:523
#9  0x8064266 in main (argc=1, argv=0xbffffbe4) at testgtk.c:8380
(gdb) 

--Chris

-- 

------------
Christopher Blizzard
http://odin.appliedtheory.com/
Stop terrorism. Use free software.
------------



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