Ben Wing <ben(a)666.com> writes:
i still don't see why this would happen. can you put some calls
in
to see what the actual hierarchy is? maybe the shell widget is
inserting something behind the scenes.
This is a gdb session. gcc seem to've optimized away the "widget"
variable, hence (*kids[0]). I don't really grok this stuff, so please
let me know what I can do. This is xemacs 21.1.10 with mule this
time.
Looks like `kids[0]' already have been free()d too me. (Look at the
`name' field, a garbled string.)
(gdb) b wm_delete_window
Breakpoint 1 at 0x818302f: file /home/jas/src/xemacs-21.1/lwlib/lwlib-Xaw.c, lin
e 492.
(gdb) r -vanilla
Starting program: /home/jas/src/xemacs-21.1/o/src/xemacs -vanilla
Breakpoint 1, wm_delete_window (shell=0x8524050, closure=0xbfffe9b0,
call_data=0x0) at /home/jas/src/xemacs-21.1/lwlib/lwlib-Xaw.c:492
492 Widget *kids = 0;
(gdb) n
495 if (! XtIsSubclass (shell, shellWidgetClass))
(gdb)
497 XtSetArg (al [0], XtNchildren, &kids);
(gdb)
498 XtGetValues (shell, al, 1);
(gdb)
499 if (!kids || !*kids)
(gdb)
502 if (! XtIsSubclass (widget, dialogWidgetClass))
(gdb) p *kids[0]
$1 = {core = {self = 0x8510060, widget_class = 0x40054e00, parent = 0x8524050,
xrm_name = 525, being_destroyed = 0 '\000', destroy_callbacks = 0x0,
constraints = 0x0, x = 16464, y = 2130, width = 0, height = 0,
border_width = 6648, managed = 74 'J', sensitive = 8 '\b',
ancestor_sensitive = 5 '\005', event_table = 0x2001, tm = {
translations = 0x0, proc_table = 0x4004f6ec, current_state = 0x20782d43,
lastEventTime = 1077739520}, accelerators = 0x8522608, border_pixel = 0,
border_pixmap = 0, popup_list = 0x19, num_popups = 0,
name = 0x4 <Address 0x4 out of bounds>, screen = 0x9,
colormap = 139511120, window = 24, depth = 2601, background_pixel = 0,
background_pixmap = 458756, visible = 1 '\001',
mapped_when_managed = 2 '\002'}}
(gdb) p (*kids[0])->core->parent
$2 = 0x8524050
(gdb) p *(*kids[0])->core->parent
$3 = {core = {self = 0x8524050, widget_class = 0x829d1c8, parent = 0x8478d80,
xrm_name = 363, being_destroyed = 0 '\000', destroy_callbacks = 0x85244e0,
constraints = 0x0, x = 207, y = 298, width = 243, height = 56,
border_width = 0, managed = 0 '\000', sensitive = 1 '\001',
ancestor_sensitive = 1 '\001', event_table = 0x8524188, tm = {
translations = 0x8523ff0, proc_table = 0x8524238, current_state = 0x0,
lastEventTime = 0}, accelerators = 0x0, border_pixel = 0,
border_pixmap = 2, popup_list = 0x0, num_popups = 0,
name = 0x83d226f "dialog", screen = 0x845e628, colormap = 35,
window = 41943132, depth = 16, background_pixel = 42520,
background_pixmap = 2, visible = 1 '\001', mapped_when_managed = 1
'\001'}}
(gdb) p *(*kids[0])->core->parent->core->parent
$4 = {core = {self = 0x8478d80, widget_class = 0x829b580, parent = 0x845faf0,
xrm_name = 685, being_destroyed = 0 '\000', destroy_callbacks = 0x84d8d60,
constraints = 0x0, x = 33, y = 24, width = 584, height = 556,
border_width = 0, managed = 0 '\000', sensitive = 1 '\001',
ancestor_sensitive = 1 '\001', event_table = 0x84d9048, tm = {
translations = 0x0, proc_table = 0x0, current_state = 0x0,
lastEventTime = 0}, accelerators = 0x0, border_pixel = 0,
border_pixmap = 2, popup_list = 0x8524228, num_popups = 1,
name = 0x83d2f84 "shell", screen = 0x845e628, colormap = 35,
window = 41943083, depth = 16, background_pixel = 65535,
background_pixmap = 2, visible = 1 '\001', mapped_when_managed = 1
'\001'}}
(gdb) p *(*kids[0])->core->parent->core->parent->core->parent
$5 = {core = {self = 0x845faf0, widget_class = 0x4015a800, parent = 0x0,
xrm_name = 257, being_destroyed = 0 '\000', destroy_callbacks = 0x83c6078,
constraints = 0x0, x = 0, y = 0, width = 80, height = 50,
border_width = 1, managed = 0 '\000', sensitive = 1 '\001',
ancestor_sensitive = 1 '\001', event_table = 0x845fd68, tm = {
translations = 0x0, proc_table = 0x0, current_state = 0x0,
lastEventTime = 0}, accelerators = 0x0, border_pixel = 0,
border_pixmap = 2, popup_list = 0x8478fe0, num_popups = 1,
name = 0x83d1e06 "xemacs", screen = 0x845e628, colormap = 35,
window = 41943041, depth = 16, background_pixel = 52857,
background_pixmap = 2, visible = 1 '\001', mapped_when_managed = 0
'\000'}}
(gdb)
(gdb) n
503 abort ();
(gdb)
Program received signal SIGABRT, Aborted.
0x4030ad41 in __kill () from /lib/libc.so.6
(gdb) bt
#0 0x4030ad41 in __kill () from /lib/libc.so.6
#1 0x4030a9b6 in raise (sig=6) at ../sysdeps/posix/raise.c:27
#2 0x4030c0d8 in abort () at ../sysdeps/generic/abort.c:88
#3 0x8183098 in wm_delete_window (shell=0x8524050, closure=0xbfffe9b0,
call_data=0x0) at /home/jas/src/xemacs-21.1/lwlib/lwlib-Xaw.c:503
#4 0x4014ddd4 in HandleActions () from /usr/X11R6/lib/libXt.so.6
#5 0x4014e2b6 in HandleSimpleState () from /usr/X11R6/lib/libXt.so.6
#6 0x4014e7f1 in _XtTranslateEvent () from /usr/X11R6/lib/libXt.so.6
#7 0x4012b1ac in XtDispatchEventToWidget () from /usr/X11R6/lib/libXt.so.6
#8 0x4012b9d5 in _XtDefaultDispatcher () from /usr/X11R6/lib/libXt.so.6
#9 0x4012bd2d in XtDispatchEvent () from /usr/X11R6/lib/libXt.so.6
#10 0x40136517 in XtAppProcessEvent () from /usr/X11R6/lib/libXt.so.6
#11 0x81648b9 in emacs_Xt_next_event (emacs_event=0x8523630)
at /home/jas/src/xemacs-21.1/src/event-Xt.c:2381
#12 0x80d6f15 in event_stream_next_event (event=0x8523630)
at /home/jas/src/xemacs-21.1/src/event-stream.c:568
#13 0x80d7fdc in next_event_internal (target_event=139605552, allow_queued=1)
at /home/jas/src/xemacs-21.1/src/event-stream.c:2022
#14 0x80d84d6 in Fnext_event (event=139605552, prompt=137156004)
at /home/jas/src/xemacs-21.1/src/event-stream.c:2239
#15 0x80d89bb in Fnext_command_event (event=139605552, prompt=137156004)
at /home/jas/src/xemacs-21.1/src/event-stream.c:2395
#16 0x80a96f8 in funcall_recording_as (recorded_as=137241132, nargs=1,
args=0xbfffedc0) at /home/jas/src/xemacs-21.1/src/eval.c:3193
...
Simon Josefsson wrote:
> It's the last call to abort() below.
>
> static XtActionProc
> wm_delete_window (Widget shell, XtPointer closure, XtPointer call_data)
> {
> ...
> if (!kids || !*kids)
> abort ();
> widget = kids [0];
> if (! XtIsSubclass (widget, dialogWidgetClass))
> abort ();
>
> Ben Wing <ben(a)666.com> writes:
>
> > i meant in lwlib-Xaw.c, line 503
> >
> > Ben Wing wrote:
> >
> > > what's the code at this line?
> > >
> > > Simon Josefsson wrote:
> > >
> > > > start xemacs -no-init-file
> > > > C-x C-f /etc/resolv.conf (or just some existing file)
> > > > type "ioasdoiasdiojasd" in the buffer
> > > > select "delete buffer" from the menu
> > > > close the popup window using your window manager (I'm using
twm).
> > > >
> > > > uname -a: Linux localhost.localdomain 2.2.16-3 #1 Mon Jun 19 18:10:14
EDT 2000 i686 unknown
> > > >
> > > > ../configure
> > > >
> > > > XEmacs 21.1.10 "Capitol Reef" configured for
`i686-pc-linux'.
> > > >
> > > > Where should the build process find the source code?
/home/jas/src/xemacs-21.1
> > > > What installation prefix should install use? /usr/local
> > > > What operating system and machine description files should XEmacs
use?
> > > > `s/linux.h' and `m/intel386.h'
> > > > What compiler should XEmacs be built with? gcc -g -O3
-Wall -Wno-switch
> > > > Should XEmacs use the GNU version of malloc? yes
> > > > (Using Doug Lea's new malloc from the GNU C Library.)
> > > > Should XEmacs use the relocating allocator for buffers? yes
> > > > What window system should XEmacs use? x11
> > > > Where do we find X Windows header files?
/usr/X11R6/include
> > > > Where do we find X Windows libraries?
/usr/X11R6/lib
> > > > Compiling in support for XAUTH.
> > > > Compiling in support for XPM images.
> > > > Compiling in support for PNG image handling.
> > > > Compiling in support for (builtin) GIF image handling.
> > > > Compiling in support for JPEG image handling.
> > > > Compiling in support for TIFF image handling.
> > > > Compiling in native sound support.
> > > > Compiling in support for Berkeley DB.
> > > > Compiling in support for LDAP.
> > > > Compiling in support for ncurses.
> > > > Compiling in support for GPM (General Purpose Mouse).
> > > > Compiling in support for proper session-management.
> > > > Using Lucid menubars.
> > > > Using Lucid scrollbars.
> > > > Using Athena dialog boxes.
> > > > Compiling in DLL support.
> > > > movemail will use "dot-locking" for locking mail spool
files.
> > > > Using Lisp_Objects with minimal tagbits.
> > > >
> > > > [jas@barbar jas]$ xemacs-21.1.10 -no-init-file
> > > >
> > > > Fatal error (6).
> > > > Your files have been auto-saved.
> > > > Use `M-x recover-session' to recover them.
> > > >
> > > > If you have access to the PROBLEMS file that came with your
> > > > version of XEmacs, please check to see if your crash is described
> > > > there, as there may be a workaround available.
> > > > Otherwise, please report this bug by running the send-pr
> > > > script included with XEmacs, or selecting `Send Bug Report'
> > > > from the help menu.
> > > > As a last resort send ordinary email to `crashes(a)xemacs.org'.
> > > > *MAKE SURE* to include the information in the command
> > > > M-x describe-installation.
> > > >
> > > > If at all possible, *please* try to obtain a C stack backtrace;
> > > > it will help us immensely in determining what went wrong.
> > > > To do this, locate the core file that was produced as a result
> > > > of this crash (it's usually called `core' and is located in
the
> > > > directory in which you started the editor, or maybe in your home
> > > > directory), and type
> > > >
> > > > gdb /usr/local/bin/xemacs-21.1.10 core
> > > >
> > > > then type `where' when the debugger prompt comes up.
> > > > (If you don't have GDB on your system, you might have DBX,
> > > > or XDB, or SDB. A similar procedure should work for all of
> > > > these. Ask your system administrator if you need more help.)
> > > >
> > > > Lisp backtrace follows:
> > > >
> > > > next-command-event(nil)
> > > > byte-code("..." [next-command-event event
misc-user-event-p event-object yes throw ynp-done t no nil abort menu-no-selection-hook
signal quit button-release-e
> > > > vent-p beep message "please answer the dialog box"] 3)
> > > > # (catch ynp-done ...)
> > > > # bind (echo-keystrokes event)
> > > > # (unwind-protect ...)
> > > > # bind (ssf79598 prompt)
> > > > yes-or-no-p-dialog-box("Buffer .emacs modified; kill anyway?
")
> > > > # bind (prompt)
> > > > yes-or-no-p("Buffer .emacs modified; kill anyway? ")
> > > > kill-buffer(#<buffer ".emacs">)
> > > > #<compiled-function nil "...(4)" [kill-buffer] 2
902850 nil>()
> > > > call-interactively(kill-this-buffer)
> > > > # (condition-case ... . error)
> > > > # (catch top-level ...)
> > > > Aborted (core dumped)
> > > > [jas@barbar jas]$ gdb /usr/local/bin/xemacs-21.1.10 core
> > > > GNU gdb 19991004
> > > > Copyright 1998 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"...
> > > > Core was generated by `xemacs-21.1.10 -no-init-file'.
> > > > Program terminated with signal 6, Aborted.
> > > > Reading symbols from /usr/X11R6/lib/libXaw.so.6...done.
> > > > Reading symbols from /usr/lib/libtiff.so.3...done.
> > > > Reading symbols from /usr/lib/libpng.so.2...done.
> > > > Reading symbols from /usr/lib/libjpeg.so.62...done.
> > > > Reading symbols from /usr/lib/libz.so.1...done.
> > > > Reading symbols from /usr/X11R6/lib/libXpm.so.4...done.
> > > > Reading symbols from /usr/X11R6/lib/libXmu.so.6...done.
> > > > Reading symbols from /usr/X11R6/lib/libXt.so.6...done.
> > > > Reading symbols from /usr/X11R6/lib/libXext.so.6...done.
> > > > Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
> > > > Reading symbols from /usr/X11R6/lib/libSM.so.6...done.
> > > > Reading symbols from /usr/X11R6/lib/libICE.so.6...done.
> > > > Reading symbols from /lib/libdl.so.2...done.
> > > > Reading symbols from /lib/libdb.so.3...done.
> > > > ---Type <return> to continue, or q <return> to quit---
> > > > Reading symbols from /usr/lib/libgpm.so.1...done.
> > > > Reading symbols from /usr/lib/libncurses.so.4...done.
> > > > Reading symbols from /usr/lib/libldap.so.1...done.
> > > > Reading symbols from /usr/lib/liblber.so.1...done.
> > > > Reading symbols from /lib/libm.so.6...done.
> > > > Reading symbols from /lib/libc.so.6...done.
> > > > Reading symbols from /lib/ld-linux.so.2...done.
> > > > Reading symbols from /lib/libnss_files.so.2...done.
> > > > #0 0x4030ad41 in __kill () from /lib/libc.so.6
> > > > (gdb) bt
> > > > #0 0x4030ad41 in __kill () from /lib/libc.so.6
> > > > #1 0x809e2d1 in fatal_error_signal (sig=6) at emacs.c:263
> > > > #2 0x4030ac68 in __restore ()
> > > > at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127
> > > > #3 0x4030c0d8 in abort () at ../sysdeps/generic/abort.c:88
> > > > #4 0x8157bb8 in wm_delete_window (shell=0x845b010,
closure=0xbfffeb7c,
> > > > call_data=0x0) at lwlib-Xaw.c:503
> > > > #5 0x4014ddd4 in HandleActions () from /usr/X11R6/lib/libXt.so.6
> > > > #6 0x4014e2b6 in HandleSimpleState () from
/usr/X11R6/lib/libXt.so.6
> > > > #7 0x4014e7f1 in _XtTranslateEvent () from
/usr/X11R6/lib/libXt.so.6
> > > > #8 0x4012b1ac in XtDispatchEventToWidget () from
/usr/X11R6/lib/libXt.so.6
> > > > #9 0x4012b9d5 in _XtDefaultDispatcher () from
/usr/X11R6/lib/libXt.so.6
> > > > #10 0x4012bd2d in XtDispatchEvent () from /usr/X11R6/lib/libXt.so.6
> > > > #11 0x40136517 in XtAppProcessEvent () from
/usr/X11R6/lib/libXt.so.6
> > > > #12 0x813a3b9 in emacs_Xt_next_event (emacs_event=0x84c4b00) at
event-Xt.c:2381
> > > > #13 0x80bee01 in event_stream_next_event (event=0x84c4b00)
> > > > at event-stream.c:568
> > > > #14 0x80bfd79 in next_event_internal (target_event=139217664,
allow_queued=1)
> > > > at event-stream.c:2022
> > > > #15 0x80c00d6 in Fnext_event (event=139217664, prompt=136851700)
> > > > at event-stream.c:2239
> > > > #16 0x80c05bb in Fnext_command_event (event=139217664,
prompt=136851700)
> > > > at event-stream.c:2395
> > > > ---Type <return> to continue, or q <return> to quit---
> > > > #17 0x80a15e8 in funcall_recording_as (recorded_as=136936128,
nargs=1,
> > > > args=0xbfffef88) at eval.c:3193
> > > > #18 0x80a55dd in Ffuncall (nargs=2, args=0xbfffef88) at eval.c:3238
> > > > #19 0x80852f6 in Fbyte_code (bytestr=136479216, vector=136479328,
maxdepth=7)
> > > > at bytecode.c:416
> > > > #20 0x80a10bd in Feval (form=136479192) at eval.c:3063
> > > > #21 0x80a519f in internal_catch (tag=137647084, func=0x80a08a8
<Feval>,
> > > > arg=136479192, threw=0x0) at eval.c:1328
> > > > #22 0x8085756 in Fbyte_code (bytestr=136478856, vector=136478896,
maxdepth=7)
> > > > at bytecode.c:566
> > > > #23 0x80a2331 in funcall_lambda (fun=136479476, nargs=1,
arg_vector=0xbffff3b8)
> > > > at eval.c:3597
> > > > #24 0x80a181e in funcall_recording_as (recorded_as=137647000,
nargs=1,
> > > > args=0xbffff3b4) at eval.c:3214
> > > > #25 0x80a55dd in Ffuncall (nargs=2, args=0xbffff3b4) at eval.c:3238
> > > > #26 0x80852f6 in Fbyte_code (bytestr=136479564, vector=136479596,
maxdepth=5)
> > > > at bytecode.c:416
> > > > #27 0x80a2331 in funcall_lambda (fun=136479628, nargs=1,
arg_vector=0xbffff4e4)
> > > > at eval.c:3597
> > > > #28 0x80a181e in funcall_recording_as (recorded_as=136944004,
nargs=1,
> > > > args=0xbffff4e0) at eval.c:3214
> > > > #29 0x80a47cb in call1 (fn=136944004, arg0=139111252) at eval.c:3238
> > > > #30 0x80824cb in Fkill_buffer (bufname=139103120) at buffer.c:1218
> > > > ---Type <return> to continue, or q <return> to quit---
> > > > #31 0x80a16c5 in funcall_recording_as (recorded_as=136924128,
nargs=1,
> > > > args=0xbffff5f0) at eval.c:3197
> > > > #32 0x80a55dd in Ffuncall (nargs=2, args=0xbffff5f0) at eval.c:3238
> > > > #33 0x80852f6 in Fbyte_code (bytestr=136470680, vector=136470704,
maxdepth=5)
> > > > at bytecode.c:416
> > > > #34 0x80a2331 in funcall_lambda (fun=136470724, nargs=0,
arg_vector=0xbffff73c)
> > > > at eval.c:3597
> > > > #35 0x80a181e in funcall_recording_as (recorded_as=136470724,
nargs=0,
> > > > args=0xbffff738) at eval.c:3214
> > > > #36 0x80a473c in apply1 (fn=136470724, arg=136851700) at eval.c:3238
> > > > #37 0x80867f2 in Fcall_interactively (function=137645824,
> > > > record_flag=136851700, keys=136851700) at callint.c:397
> > > > #38 0x80a15fb in funcall_recording_as (recorded_as=136924436,
nargs=1,
> > > > args=0xbffff914) at eval.c:3193
> > > > #39 0x80a47cb in call1 (fn=136924436, arg0=137645824) at eval.c:3238
> > > > #40 0x80c2c39 in execute_command_event (command_builder=0x83f46f0,
> > > > event=138963492) at event-stream.c:4341
> > > > #41 0x80c3315 in Fdispatch_event (event=138963492) at
event-stream.c:4685
> > > > #42 0x808b30a in Fcommand_loop_1 () at cmdloop.c:579
> > > > #43 0x808b4ca in command_loop_1 (dummy=136851700) at cmdloop.c:494
> > > > #44 0x80a52bb in condition_case_1 (handlers=136851812,
> > > > bfun=0x808b4b4 <command_loop_1>, barg=136851700,
> > > > hfun=0x808ae10 <cmd_error>, harg=136851700) at eval.c:1653
> > > > ---Type <return> to continue, or q <return> to quit---
> > > > #45 0x808b59e in command_loop_2 (dummy=136851700) at cmdloop.c:256
> > > > #46 0x80a519f in internal_catch (tag=136926072,
> > > > func=0x808b56c <command_loop_2>, arg=136851700, threw=0x0)
at eval.c:1328
> > > > #47 0x808b04c in initial_command_loop (load_me=136851700) at
cmdloop.c:305
> > > > #48 0x809d112 in xemacs_21_1_10_i686_pc_linux () at emacs.c:1720
> > > > #49 0x809e5cd in main (argc=2, argv=0xbffffc84, envp=0xbffffc90)
> > > > at emacs.c:2137
> > > > (gdb)
> > >
> > > --
> > > Ben
> > >
> > > In order to save my hands, I am cutting back on my mail. I also write
> > > as succinctly as possible -- please don't be offended. If you send
me
> > > mail, you _will_ get a response, but please be patient, especially for
> > > XEmacs-related mail. If you need an immediate response and it is not
> > > apparent in your message, please say so. Thanks for your understanding.
> > >
> > > See also
http://www.666.com/ben/chronic-pain/
> >
> > --
> > Ben
> >
> > In order to save my hands, I am cutting back on my mail. I also write
> > as succinctly as possible -- please don't be offended. If you send me
> > mail, you _will_ get a response, but please be patient, especially for
> > XEmacs-related mail. If you need an immediate response and it is not
> > apparent in your message, please say so. Thanks for your understanding.
> >
> > See also
http://www.666.com/ben/chronic-pain/
--
Ben
In order to save my hands, I am cutting back on my mail. I also write
as succinctly as possible -- please don't be offended. If you send me
mail, you _will_ get a response, but please be patient, especially for
XEmacs-related mail. If you need an immediate response and it is not
apparent in your message, please say so. Thanks for your understanding.
See also
http://www.666.com/ben/chronic-pain/