From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>, Mark Oteiza <mvoteiza@udel.edu>
Cc: 18136@debbugs.gnu.org
Subject: bug#18136: 24.4.50; crash in redisplay when calling load-theme
Date: Tue, 29 Jul 2014 12:44:22 +0200 [thread overview]
Message-ID: <53D77B06.8040907@gmx.at> (raw)
In-Reply-To: <8338dkh6wo.fsf@gnu.org>
>> (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
next prev parent reply other threads:[~2014-07-29 10:44 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-29 0:36 bug#18136: 24.4.50; crash in redisplay when calling load-theme Mark Oteiza
2014-07-29 9:05 ` Eli Zaretskii
2014-07-29 10:44 ` martin rudalics [this message]
2014-07-29 12:12 ` Eli Zaretskii
2014-07-29 14:02 ` martin rudalics
2014-07-29 14:47 ` Eli Zaretskii
2014-07-29 15:41 ` martin rudalics
2014-07-29 16:31 ` Eli Zaretskii
2014-07-29 18:23 ` martin rudalics
2014-07-29 18:29 ` Eli Zaretskii
2014-07-30 16:45 ` martin rudalics
2014-07-30 17:18 ` Eli Zaretskii
2014-07-30 17:36 ` martin rudalics
2014-07-30 17:52 ` Eli Zaretskii
2014-07-31 8:49 ` martin rudalics
2014-07-31 10:52 ` Eli Zaretskii
2014-07-31 16:53 ` martin rudalics
2014-07-31 17:55 ` Eli Zaretskii
2014-08-01 8:57 ` martin rudalics
2014-08-01 12:55 ` Eli Zaretskii
2014-08-04 17:23 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53D77B06.8040907@gmx.at \
--to=rudalics@gmx.at \
--cc=18136@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=mvoteiza@udel.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).