[Bug: 21.4.12] xemacs: X Error of failed request: BadWindow(invalid Window parameter)

tbennett at nvidia.com tbennett at nvidia.com
Wed Nov 17 22:35:24 EST 2004


Darryl Okahata <darrylo at soco.agilent.com> writes:

>      Well, I'm blind.  While "only -g" won't hurt, the problem might be
> something else (other than the given stack trace).  Assuming Tony's
> XEmacs is dying due to:
>
> -------------------------------------------------------------------------------
> X Error of failed request:  BadWindow (invalid Window parameter)
>   Major opcode of failed request:  18 (X_ChangeProperty)
>   Resource id in failed request:  0x2800120
>   Serial number of failed request:  9298127
>   Current serial number in output stream:  9298129
> -------------------------------------------------------------------------------
>
> Then we need to figure out which call to XChangeProperty() is failing
> (which may imply that the trigger to this is a cut or paste in XEmacs or
> some other X application).  Due to the asynchronous nature of X, the
> actual X call (assumed to be XChangeProperty()) that's causing this
> error is long gone.
>
> [ Hmmm.  If Motif is used, this could be a Motif bug.  I've seen lots of
>   cut-and-paste issues with Motif.  On the other hand, why is the XEmacs
>   X error handler getting reset???  ]

Yes, using motif:

    Window System:
      Compiling in support for the X window system:
        - X Windows headers location:                 /usr/X11R6/include
        - X Windows libraries location:               /usr/X11R6/lib
        - Handling WM_COMMAND properly.
      Using Lucid menubars.
      Using Lucid scrollbars.
      Using Motif dialog boxes.
      Using Motif native widgets.

>      If we're lucky, and an XEmacs call to XChangeProperty() is failing
> (as opposed to a Motif call to XChangeProperty()), we might be able to
> get more information by placing a call to "XSync(display, False);" at
> the bottom of x_reply_selection_request() and
> DEFUN("x-store-cutbuffer-internal", ...) (both in select-x.c).

I'll try this next.

> [ Hmmm.  Out of curiosity, is the "screen" portion of your $DISPLAY
>   non-zero (e.g., ":0.1" or "myhost:0.1")?  ]

no, its ":0.0".  I also have an active vnc server session running on this
machine as ":1.0", but I don't see how that could be involved....

I was able to easily repeat the problem on an unoptimized XEmacs
by doing the following:

    open a large text file (75,000 lines, 5+meg)
    C-x h M-=             -- mark entire buffer, then count lines.

    xemacs appears hung...
    move cursor around between frames, focus isn't working right
    C-g a few times.  BadWindow msg comes out and exit() is called....

lx-86-40-p201{~/src/xemacs-21.5.18}. gdb src/xemacs
GNU gdb 6.0
Copyright 2003 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 "i686-pc-linux-gnu"...

Default output radix for printing of values is 16.
Using host libthread_db library "/lib/libthread_db.so.1".

Breakpoint 1 at 0x80b885b: file emacs.c, line 2782.
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.

Breakpoint 1, main (argc=0x1, argv=0xbfffe494, envp=0xbfffe49c) at emacs.c:2782
2782      int     volatile vol_argc = argc;
Breakpoint 2 at 0x404f23b6
Breakpoint 3 at 0x4054cb8c
Breakpoint 4 at 0x81b8bd9: file device-x.c, line 1090.
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  25 (X_SendEvent)
  Resource id in failed request:  0x240958c
  Serial number of failed request:  1003378
  Current serial number in output stream:  1003389

Breakpoint 2, 0x404f23b6 in exit () from /lib/libc.so.6
(gdb) where
#0  0x404f23b6 in exit () from /lib/libc.so.6
#1  0x4038d77b in _XDefaultError () from /usr/X11R6/lib/libX11.so.6
#2  0x4038d874 in _XError () from /usr/X11R6/lib/libX11.so.6
#3  0x4038c5b3 in _XReply () from /usr/X11R6/lib/libX11.so.6
#4  0x40388054 in XSync () from /usr/X11R6/lib/libX11.so.6
#5  0x081d4ea5 in x_flash (d=0x867cb10) at redisplay-x.c:1891
#6  0x08196348 in Fding (no_terminate=0x826f320, sound=0x826b210, device=0x867cb10) at sound.c:483
#7  0x080c0712 in Ffuncall (nargs=0x3, args=0xbfffdec0) at eval.c:3841
#8  0x08093c04 in execute_optimized_program (
    program=0x8e56c18 "<<stuff that kills mailers>>", stack_depth=0x6, constants_data=0x82ded80) at bytecode.c:823
#9  0x080c5a92 in funcall_compiled_function (fun=0x835e754, nargs=0x1, args=0xbfffe0cc) at eval.c:3451
#10 0x080c09f4 in Ffuncall (nargs=0x2, args=0xbfffe0c8) at eval.c:3880
#11 0x080c19e8 in call1 (fn=0x823b390, arg0=0x8d88eb8) at eval.c:4491
#12 0x0809d66e in cmd_error (data=0x8d88eb8, unused_dummy=0x826f320) at cmdloop.c:212
#13 0x080bd206 in condition_case_1 (handlers=0x826eb28, bfun=0x809d9b7 <command_loop_1>, barg=0x826f320, 
    hfun=0x809d62b <cmd_error>, harg=0x826f320) at eval.c:1902
#14 0x0809d747 in command_loop_3 () at cmdloop.c:262
#15 0x0809d769 in command_loop_2 (unused_dummy=0x826f320) at cmdloop.c:275
#16 0x080bce1e in internal_catch (tag=0x823a430, func=0x809d75e <command_loop_2>, arg=0x826f320, threw=0x0, 
    thrown_tag=0x0) at eval.c:1527
#17 0x0809d858 in initial_command_loop (load_me=0x826f320) at cmdloop.c:313
#18 0x080b7caa in xemacs_21_5_b18_i686_pc_linux (argc=0x1, argv=0xbfffe494, unused_envp=0xbfffe49c, 
    restart=0x0) at emacs.c:2407
#19 0x080b88f2 in main (argc=0x1, argv=0xbfffe494, envp=0xbfffe49c) at emacs.c:2837
(gdb) frame 6
#6  0x08196348 in Fding (no_terminate=0x826f320, sound=0x826b210, device=0x867cb10) at sound.c:483
483       else if (!NILP (Vvisible_bell) && DEVMETH (d, flash, (d)))
(gdb) list
478         /* Stop executing a keyboard macro. */
479         invalid_operation ("Keyboard macro terminated by a command ringing the bell", Qunbound);
480       
481       if (d == last_bell_device && now-last_bell_time < bell_inhibit_time)
482         return Qnil;
483       else if (!NILP (Vvisible_bell) && DEVMETH (d, flash, (d)))
484         ;
485       else
486         Fplay_sound (sound, Qnil, device);
487       
(gdb) print d
$1 = (struct device *) 0x867cb10
(gdb) print *d
$2 = {
  header = {
    lheader = {
      type = 0x23, 
      mark = 0x0, 
      c_readonly = 0x0, 
      lisp_readonly = 0x0, 
      unused = 0x0
    }, 
    next = 0x867c9d0, 
    uid = 0x976, 
    free = 0x0
  }, 
  devmeths = 0x83af6e4, 
  devtype = x_console, 
  device_data = 0x867d040, 
  buffers_changed = 0x1, 
  clip_changed = 0x0, 
  extents_changed = 0x1, 
  faces_changed = 0x0, 
  frame_changed = 0x0, 
  frame_layout_changed = 0x0, 
  glyphs_changed = 0x0, 
  subwindows_changed = 0x0, 
  subwindows_state_changed = 0x0, 
  icon_changed = 0x0, 
  menubar_changed = 0x0, 
  modeline_changed = 0x1, 
  point_changed = 0x1, 
  size_changed = 0x0, 
  gutter_changed = 0x0, 
  toolbar_changed = 0x0, 
  windows_changed = 0x1, 
  windows_structure_changed = 0x1, 
  locked = 0x0, 
  pixel_to_glyph_cache = {
    valid = 0x0, 
    frame = 0x87fad48, 
    low_x_coord = 0x203, 
    high_x_coord = 0x208, 
    col = 0x39, 
    obj_x = 0x0, 
    low_y_coord = 0x197, 
    high_y_coord = 0x1a7, 
    row = 0x1b, 
    obj_y = 0x0, 
    w = 0xa1db018, 
    charpos = 0x312e, 
    closest = 0x312e, 
    modeline_closest = 0xffffffff, 
    obj1 = 0x826f320, 
    obj2 = 0x826f320, 
    retval = 0x3
  }, 
  baud_rate = 0x9600, 
  on_console_p = 0x1, 
  connected_to_nas_p = 0x0, 
  name = 0x864665c, 
  connection = 0x864691c, 
  canon_connection = 0x864668c, 
  frame_list = 0x89e7c28, 
  console = 0x8718db0, 
  selected_frame = 0x87fad48, 
  frame_with_focus_real = 0x87fad48, 
  frame_with_focus_for_hooks = 0x87fad48, 
  frame_that_ought_to_have_focus = 0x826f320, 
  device_class = 0x8269b90, 
  user_defined_tags = 0x86e795c, 
  color_instance_cache = 0x867cbc0, 
  font_instance_cache = 0x867cd60, 
  image_instance_cache = 0x867cf00, 
  infd = 0x8, 
  outfd = 0x8, 
  old_fcntl_owner = 0x0
}
(gdb) frame 5
#5  0x081d4ea5 in x_flash (d=0x867cb10) at redisplay-x.c:1891
1891      XSync (dpy, False);
(gdb) print dpy
$3 = (Display *) 0x8719c48
(gdb) print *dpy
$4 = <incomplete type>
(gdb) show opaque-type-resolution
Resolution of opaque struct/class/union types (if set before loading symbols) is on.
(gdb) symbol-file src/xemacs -readnow
Load new symbol table from "src/xemacs"? (y or n) y
Reading symbols from src/xemacs...done.
(gdb) frame 5
#5  0x081d4ea5 in x_flash (d=0x867cb10) at redisplay-x.c:1891
1891      XSync (dpy, False);
(gdb) print *dpy
$1 = <incomplete type>
(gdb) whatis dpy
type = Display *
(gdb) x/100xw dpy
0x8719c48:      0x08733ce0      0x08718d70      0x00000008      0x00000002
0x8719c58:      0x0000000b      0x00000000      0x0871a2a0      0x03800000
0x8719c68:      0x001fffff      0x0000085f      0x00000000      0x4038bf50
0x8719c78:      0x00000000      0x00000020      0x00000020      0x00000000
0x8719c88:      0x00000007      0x0871a2d0      0x0000000b      0x0266ede1
0x8719c98:      0x00000000      0x00000000      0x00000000      0x000f4f72
0x8719ca8:      0x000f4f7d      0x4043660c      0x086bd678      0x086bd678
0x8719cb8:      0x086bde78      0x0000ffff      0x0869e910      0x00000000
0x8719cc8:      0x086bbcc0      0x00000000      0x00000001      0x0871a348
0x8719cd8:      0x00000100      0x00000000      0x00000008      0x000000ff
0x8719ce8:      0x00000000      0x00000000      0x00000000      0x08720170
0x8719cf8:      0x00000000      0x00000000      0x00000006      0x0873eb38
0x8719d08:      0x4038d080      0x4038d080      0x4038d0a0      0x4038d0a0
0x8719d18:      0x4038d0a0      0x4038d0a0      0x4038d0a0      0x4038d0a0
0x8719d28:      0x4038d0a0      0x4038d0a0      0x4038d0a0      0x4038d0a0
0x8719d38:      0x4038d0a0      0x4038d0a0      0x4038d0a0      0x4038d0a0
0x8719d48:      0x4038d0a0      0x4038d0a0      0x4038d0a0      0x4038d0a0
0x8719d58:      0x4038d0a0      0x4038d0a0      0x4038d0a0      0x4038d0a0
0x8719d68:      0x4038d0a0      0x4038d0a0      0x4038d0a0      0x4038d0a0
0x8719d78:      0x4038d0a0      0x4038d0a0      0x4038d0a0      0x4038d0a0
0x8719d88:      0x4038d0a0      0x4038d0a0      0x4038d0a0      0x4038d080
0x8719d98:      0x4038d080      0x4038d080      0x4038d080      0x4038d080
0x8719da8:      0x4038d080      0x4038d080      0x4038d080      0x4038d080
0x8719db8:      0x4038d080      0x4038d080      0x4038d080      0x4038d080
0x8719dc8:      0x4038d080      0x4038d080      0x4038d080      0x4038d080
(gdb) x/20xw 0x08733ce0
0x8733ce0:      0x3e07c725      0x00000000      0x403727a0      0x08733cf0
0x8733cf0:      0x0873eb3c      0xa6dee37c      0x00000101      0x00000021
0x8733d00:      0x00000003      0x401a2b40      0x00000000      0x40310dc0
0x8733d10:      0x08731b38      0x4017e190      0x00000000      0x00000029
0x8733d20:      0x7273752f      0x3131582f      0x6c2f3652      0x6c006269
(gdb) x/20xw 0x08718d70
0x8718d70:      0x40379430      0x00000000      0x00000000      0x403699e0
0x8718d80:      0x403a2a00      0x403a0090      0x00000000      0x00000000
0x8718d90:      0x403b9c70      0x00000019      0x087262c8      0x086a6bf8
0x8718da0:      0x61636f6c      0x736f686c      0x00000018      0x00000079
0x8718db0:      0x00000022      0x08718d50      0x00000971      0x083af6e4
(gdb) x/20xw 0x0871a2a0
0x871a2a0:      0x746e6547      0x4c206f6f      0x78756e69      0x46582820
0x871a2b0:      0x38656572      0x2e342036      0x2c302e33      0x76657220
0x871a2c0:      0x6f697369      0x3672206e      0x00000029      0x00000079
0x871a2d0:     




More information about the XEmacs-Beta mailing list