[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Crash in foreach_window_1 (delete-frame)
From: |
YAMAMOTO Mitsuharu |
Subject: |
Re: Crash in foreach_window_1 (delete-frame) |
Date: |
Mon, 15 May 2006 10:36:39 +0900 |
User-agent: |
Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/22.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) |
>>>>> On Sun, 14 May 2006 13:18:36 +0100, David Reitter <address@hidden> said:
> I had this crash the other day. I had a frame with a Completions
> buffer (lower window in 2-window config.) open, and wanted to delete
> the frame. Can't reproduce, but maybe someone can tell from looking
> at the stack trace below.
> Exception: EXC_BAD_ACCESS (0x0001)
> Codes: KERN_INVALID_ADDRESS (0x0001) at 0x110bc0d0
> 0 org.gnu.AquamacsEmacs 0x0004f5d8 foreach_window_1 + 52
> (window.c:6818)
> 1 org.gnu.AquamacsEmacs 0x0004f60c foreach_window_1 + 104
> (window.c:6821)
> 2 org.gnu.AquamacsEmacs 0x0004f60c foreach_window_1 + 104
> (window.c:6821)
> 3 org.gnu.AquamacsEmacs 0x0004566c window_from_coordinates +
> 120 (window.c:949)
> 4 org.gnu.AquamacsEmacs 0x0001e3b0 remember_mouse_glyph + 60
> (xdisp.c:2061)
> 5 org.gnu.AquamacsEmacs 0x0013f83c note_mouse_movement + 332
> (macterm.c:4321)
> 6 org.gnu.AquamacsEmacs 0x0014780c XTread_socket + 2228
> (macterm.c:10366)
> 7 org.gnu.AquamacsEmacs 0x00085dc4 read_avail_input + 140
> (keyboard.c:6751)
> 8 org.gnu.AquamacsEmacs 0x00085fbc handle_async_input + 48
> (keyboard.c:6898)
> 9 org.gnu.AquamacsEmacs 0x000f175c Fdelq + 280 (fns.c:1724)
> 10 org.gnu.AquamacsEmacs 0x00015ab0 Fdelete_frame + 884
> (frame.c:1284)
Looks interesting.
frame.c:
1274 /* Mark all the windows that used to be on FRAME as deleted, and then
1275 remove the reference to them. */
1276 delete_all_subwindows (XWINDOW (f->root_window));
1277 f->root_window = Qnil;
1278
1279 Vframe_list = Fdelq (frame, Vframe_list);
Fdelete_frame sets f->root_window to Qnil at line 1277. If it is
interrupted (or read_socket_hook is called by QUIT if SYNC_INPUT is
defined) inside Fdelq, foreach_window might be called through the path
shown in the above backtrace.
window.c:
6793 void
6794 foreach_window (f, fn, user_data)
6795 struct frame *f;
6796 int (* fn) P_ ((struct window *, void *));
6797 void *user_data;
6798 {
6799 foreach_window_1 (XWINDOW (FRAME_ROOT_WINDOW (f)), fn, user_data);
6800 }
In such a case, FRAME_ROOT_WINDOW (f) is Qnil and XWINDOW (...) does not
return a valid pointer.
I think this scenario can also happen on X11. Maybe test WINDOWP
(FRAME_ROOT_WINDOW (f)) before line 6799?
YAMAMOTO Mitsuharu
address@hidden