From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#18136: 24.4.50; crash in redisplay when calling load-theme Date: Tue, 29 Jul 2014 12:44:22 +0200 Message-ID: <53D77B06.8040907@gmx.at> References: <87d2cpxaq1.fsf@holos.localdomain> <8338dkh6wo.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1406630770 26292 80.91.229.3 (29 Jul 2014 10:46:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Jul 2014 10:46:10 +0000 (UTC) Cc: 18136@debbugs.gnu.org To: Eli Zaretskii , Mark Oteiza Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 29 12:46:01 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 1XC4uv-0002Fx-1N for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Jul 2014 12:46:01 +0200 Original-Received: from localhost ([::1]:44634 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC4uu-0007Kr-ML for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Jul 2014 06:46:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45169) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC4u6-0006PU-Lp for bug-gnu-emacs@gnu.org; Tue, 29 Jul 2014 06:45:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XC4tz-0008AU-1E for bug-gnu-emacs@gnu.org; Tue, 29 Jul 2014 06:45:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46390) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC4ty-0008A8-V5 for bug-gnu-emacs@gnu.org; Tue, 29 Jul 2014 06:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XC4ty-00036L-Bb for bug-gnu-emacs@gnu.org; Tue, 29 Jul 2014 06:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Jul 2014 10:45: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.140663068211879 (code B ref 18136); Tue, 29 Jul 2014 10:45:02 +0000 Original-Received: (at 18136) by debbugs.gnu.org; 29 Jul 2014 10:44:42 +0000 Original-Received: from localhost ([127.0.0.1]:41656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XC4td-00035V-Sy for submit@debbugs.gnu.org; Tue, 29 Jul 2014 06:44:42 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:60347) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XC4tZ-00035C-0L for 18136@debbugs.gnu.org; Tue, 29 Jul 2014 06:44:38 -0400 Original-Received: from [93.82.14.115] ([93.82.14.115]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MZkic-1WuxDG2HCo-00LXtJ; Tue, 29 Jul 2014 12:44:28 +0200 In-Reply-To: <8338dkh6wo.fsf@gnu.org> X-Provags-ID: V03:K0:i1uVKkp8ne22F6IzEdjfQWq64lx9Hy9B7Rudr5J40uuvPN9DMC8 1+FyYsm6vxbnKnFCwbTwX9D3DvyPFJcqsU9RYygRWcwxgZ2uDauxha60H3M3TGusjS/4VJD NZ+orLbAZTMvGqFukymkJWSpsj376cLI+OKuhgkhPCslbX3UO3lNEPfJnul8qi/2A6rl5MD pirwP7LGNNiHRwijc7UTw== 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:91927 Archived-At: >> (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.) All functions like change_frame_size or adjust_frame_size now expect the frame's text height as argument and menu and tool bars should not be part of it. I was expecting some breakage of this approach for TTY frames because I didn't fully understand the logic of how frames get assigned sizes. Probably this assignment if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f)) FrameCols (FRAME_TTY (f)) = new_cols; is completely misplaced and should be either removed or inhibited when called from change_frame_size_1, that is when INHIBIT equals 5. Can you tell me what this assignment is for? martin