From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#18136: 24.4.50; crash in redisplay when calling load-theme Date: Tue, 29 Jul 2014 12:05:11 +0300 Message-ID: <8338dkh6wo.fsf@gnu.org> References: <87d2cpxaq1.fsf@holos.localdomain> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1406624787 17062 80.91.229.3 (29 Jul 2014 09:06:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Jul 2014 09:06:27 +0000 (UTC) Cc: 18136@debbugs.gnu.org To: Mark Oteiza , Martin Rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 29 11:06:18 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XC3MP-0001hS-PK for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Jul 2014 11:06:17 +0200 Original-Received: from localhost ([::1]:44268 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC3MP-0004LW-27 for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Jul 2014 05:06:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC3MG-0004Je-Ls for bug-gnu-emacs@gnu.org; Tue, 29 Jul 2014 05:06:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XC3MA-0002w2-Tk for bug-gnu-emacs@gnu.org; Tue, 29 Jul 2014 05:06:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46349) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC3MA-0002vy-Q3 for bug-gnu-emacs@gnu.org; Tue, 29 Jul 2014 05:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XC3MA-0000aJ-Fp for bug-gnu-emacs@gnu.org; Tue, 29 Jul 2014 05:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Jul 2014 09:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18136 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18136-submit@debbugs.gnu.org id=B18136.14066247062170 (code B ref 18136); Tue, 29 Jul 2014 09:06:02 +0000 Original-Received: (at 18136) by debbugs.gnu.org; 29 Jul 2014 09:05:06 +0000 Original-Received: from localhost ([127.0.0.1]:41615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XC3LF-0000Yw-G3 for submit@debbugs.gnu.org; Tue, 29 Jul 2014 05:05:05 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:59600) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XC3LA-0000Y0-TQ for 18136@debbugs.gnu.org; Tue, 29 Jul 2014 05:05:02 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0N9G00F00UITXM00@a-mtaout20.012.net.il> for 18136@debbugs.gnu.org; Tue, 29 Jul 2014 12:04:54 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N9G00FGYUK5RK50@a-mtaout20.012.net.il>; Tue, 29 Jul 2014 12:04:53 +0300 (IDT) In-reply-to: <87d2cpxaq1.fsf@holos.localdomain> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org 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 Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:91923 Archived-At: > From: Mark Oteiza > Date: Mon, 28 Jul 2014 20:36:06 -0400 > > > gdb emacs > run -nw -Q > > M-x load-theme RET some-default-theme RET > > (gdb) xbacktrace al (C function)" (0xbbeea0) > "redisplay_internal (C function)" (0xbbeea0) > (gdb) bt > #0 terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=40) at emacs.c:359 > #1 0x00000000004fe2e3 in emacs_abort () at sysdep.c:2198 > #2 0x00000000004a81c1 in cmcheckmagic (tty=0x13d82a0) at cm.c:120 > #3 0x0000000000418225 in update_frame_line (f=f@entry=0xc0ab08, vpos=50) at dispnew.c:4839 Martin, this is because of this change in the call to change_frame_size by init_display: @@ -6171,7 +6069,8 @@ init_display (void) t->display_info.tty->top_frame = selected_frame; change_frame_size (XFRAME (selected_frame), FrameCols (t->display_info.tty), - FrameRows (t->display_info.tty), 0, 0, 1, 0); + FrameRows (t->display_info.tty) + - FRAME_MENU_BAR_LINES (f), 0, 0, 1, 0); change_frame_size_1 then calls adjust_frame_size with the value one less than the terminal height, and adjust_frame_size plugs that value into FrameRows: if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f)) FrameRows (FRAME_TTY (f)) = new_lines; This lies to Emacs about the terminal height, and cmcheckmagic catches that. I don't understand why you subtract FRAME_MENU_BAR_LINES, that sounds wrong at least for TTY frames. (We could add that back inside adjust_frame_size, but it's IMO a bad idea to spread this non-trivial logic between 2 functions.)