GNU bug report logs - #7728
24.0.50; GDB backtrace from abort

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Fri, 24 Dec 2010 16:51:02 UTC

Severity: normal

Found in version 24.0.50

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 7728 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 7728 <at> debbugs.gnu.org
Subject: Re: bug#7728: 24.0.50; GDB backtrace from abort
Date: Sat, 25 Dec 2010 11:38:05 +0200
> From: "Drew Adams" <drew.adams <at> oracle.com>
> Date: Fri, 24 Dec 2010 08:55:20 -0800
> Cc: 
> 
> Program received signal SIGTRAP, Trace/breakpoint trap.
> [Switching to Thread 3684.0x1210]
> 0x7c90120f in ntdll!DbgUiConnectToDbg () from C:\WINDOWS\system32\ntdll.dll
> (gdb) bt
> #0  0x7c90120f in ntdll!DbgUiConnectToDbg () from C:\WINDOWS\system32\ntdll.dll
> #1  0x01309b9f in w32_abort () at w32fns.c:7312
> #2  0x0104a0af in die (msg=0x159401c "assertion failed:
> WINDOWP(selected_window)",
>     file=0x1593ee0 "xdisp.c", line=1156) at alloc.c:6129
> #3  0x0116327a in window_text_bottom_y (w=0x58b2c00) at xdisp.c:1156

The abort happens in this source line in window_text_bottom_y:

    height -= CURRENT_MODE_LINE_HEIGHT (w);

The macro CURRENT_MODE_LINE_HEIGHT accesses selected_window:

  #define CURRENT_MODE_LINE_HEIGHT(W)				\
       (current_mode_line_height >= 0				\
	? current_mode_line_height				\
	: (MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix)	\
	   ? MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix)	\
	   : estimate_mode_line_height (XFRAME ((W)->frame),	\
					CURRENT_MODE_LINE_FACE_ID (W))))

  #define CURRENT_MODE_LINE_FACE_ID(W)		\
	  (CURRENT_MODE_LINE_FACE_ID_3((W), XWINDOW (selected_window), (W)))

and XWINDOW tries to assert (under ENABLE_CHECKING) that its argument
is indeed a window.

So it looks like somehow we get into selected_window a value that is
not a window.  I'm guessing it was nil in this case.

If having selected_window that is not a window is legitimate, then one
possible solution would be to extend CURRENT_MODE_LINE_FACE_ID to
handle that case gracefully.  After all, all it does is choose between
MODE_LINE_FACE_ID and MODE_LINE_INACTIVE_FACE_ID.




This bug report was last modified 12 years and 357 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.