From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: rjs@cs.hut.fi (Riku Saikkonen) Newsgroups: gmane.emacs.bugs Subject: Frame resizing causes a crash Date: Fri, 26 Sep 2003 16:53:44 +0300 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87llsbirkn.fsf@lambda.cs.hut.fi> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1064584578 15719 80.91.224.253 (26 Sep 2003 13:56:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 26 Sep 2003 13:56:18 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 26 15:56:14 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A2t4w-0002Nz-01 for ; Fri, 26 Sep 2003 15:56:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 1A2t34-00049A-HW for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Sep 2003 09:54:18 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 1A2t2z-00048F-LG for bug-gnu-emacs@gnu.org; Fri, 26 Sep 2003 09:54:13 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 1A2t2x-00047Y-Q2 for bug-gnu-emacs@gnu.org; Fri, 26 Sep 2003 09:54:12 -0400 Original-Received: from [130.233.192.7] (helo=hutcs.cs.hut.fi) by monty-python.gnu.org with esmtp (Exim 4.22) id 1A2t2x-00047A-Dv for bug-gnu-emacs@gnu.org; Fri, 26 Sep 2003 09:54:11 -0400 Original-Received: from lambda.cs.hut.fi ([130.233.192.205]) by hutcs.cs.hut.fi with esmtp (Exim 4.10) id 1A2t2u-0004cO-00 for bug-gnu-emacs@gnu.org; Fri, 26 Sep 2003 16:54:08 +0300 Original-Received: from rjs by lambda.cs.hut.fi with local (Exim 3.35 #1 (Debian)) id 1A2t2W-0008A1-00 for ; Fri, 26 Sep 2003 16:53:44 +0300 Original-To: bug-gnu-emacs@gnu.org User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (gnu/linux) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:5863 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5863 I found an odd bug related to resizing an Emacs frame when there are several windows inside it. Resizing a particular window configuration to a smaller height causes a crash in text mode, and strange behaviour in an X window. I use GNU Emacs 21, and this seems to happen both in GNU/Linux and in Solaris. I tried these three Emacsen, and they all have the bug: - GNU Emacs 21.1.1 (sparc-sun-solaris2.8, X toolkit) of 2002-01-31 on vernal - GNU Emacs 21.2.1 (i386-redhat-linux-gnu, X toolkit, Xaw3d scroll bars) of 2002-04-09 on porky.devel.redhat.com - GNU Emacs 21.2.1 (i386-debian-linux-gnu, X toolkit, Xaw3d scroll bars) of 2002-03-22 on raven, modified by Debian To reproduce the bug: 1. Start a copy of Emacs, and resize it to 80x58 characters. 2. Execute the following Lisp code, and use M-x my-set-windows. (This produces three windows, one of which is only 4 lines high.) (defun my-set-windows () (interactive) (delete-other-windows) (split-window-vertically) (set-window-text-height nil 4) (other-window 1) (split-window-vertically)) 3. Resize the Emacs frame to 80x24 characters. When I do this in a text-mode Emacs (inside an xterm), it immediately crashes with the message: Fatal error (6).Aborted When running Emacs in an X window, the bug doesn't crash Emacs, but causes some very strange behaviour on the display: Emacs shows the text as if there were several windows, but there is only one mode line. Moving around and using C-l reveals that there are several windows, but they seem to overrlap. C-x o jumps between two windows, and from moving around in them, it appears that the upper one occupies lines 1-12 in the 24-line display and the lower one uses lines 8-19 (so both are 12 lines high - the text area is 19 lines long in a window with geometry 80x24 using the default menu and tool bars). Thus, the mode line of the upper window is displayed on the 13th line, but often gets overwritten by redrawing of the lower window. The same kind of bug appears to happen on other window sizes, and also if I resize the windows manually (using C-x ^ or the mouse on the mode lines) to a similar configuration. But not all configurations of three windows produce the bug; it appears that the problem is related to sizing a very small window to an even smaller size when the frame is made much smaller. A backtrace from a core dump generated by the Emacs 21.2.1 on the Debian GNU/Linux system does not appear helpful: (gdb) bt #0 0x40305781 in kill () from /lib/libc.so.6 #1 0x080ce1db in XMapRaised () #2 0x403056b8 in sigaction () from /lib/libc.so.6 #3 0x080926d3 in XMapRaised () #4 0x080942e1 in XMapRaised () #5 0x08055620 in XMapRaised () #6 0x08054ebb in XMapRaised () #7 0x08052c80 in XMapRaised () #8 0x0806670c in XMapRaised () #9 0x08066b0a in XMapRaised () #10 0x0814dc97 in error () #11 0x08056b43 in XMapRaised () #12 0x080d2523 in abort () #13 0x080d8a33 in abort () #14 0x080d0bf4 in abort () #15 0x08121dc9 in re_compile_pattern () #16 0x080d07d8 in abort () #17 0x0812195d in re_compile_pattern () #18 0x080d0787 in abort () #19 0x080d0301 in abort () #20 0x080d0430 in abort () #21 0x080cf39f in abort () #22 0x402f514f in __libc_start_main () from /lib/libc.so.6 (gdb) q -- -=- Rjs -=- rjs@cs.hut.fi, Riku.Saikkonen@hut.fi "Or there maybe 'tis cloudless night / and swaying beeches bear the Elven-stars as jewels white / amid their branching hair." -- J.R.R. Tolkien