all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 18422@debbugs.gnu.org
Subject: bug#18422: 24.3.93; Assertion violation when resizing mini-window on a TTY
Date: Wed, 10 Sep 2014 10:03:27 +0200	[thread overview]
Message-ID: <541005CF.1050504@gmx.at> (raw)
In-Reply-To: <83oaupaqfe.fsf@gnu.org>

 > I already tried this before reporting the bug.  It doesn't work,
 > because we then hit these assertions in fake_current_matrices:
 >
 > 	  eassert (m->matrix_h == WINDOW_TOTAL_LINES (w));
 > 	  eassert (m->matrix_w == WINDOW_TOTAL_COLS (w));

We would have to use pixel sizes there too and maybe elsewhere.

 > In general, I think it's a bad idea to have bogus values in
 > WINDOW_TOTAL_LINES and WINDOW_TOTAL_COLS, they are not documented to
 > be invalid under any circumstances, so the code relies on them.

Agreed.  The "total" values are bogus from the moment a function like
`resize-mini-window-internal' is executed until `window--pixel-to-total'
is executed.  Unfortunately, I currently adjust the frame glyphs right
in between.  I should either move the adjust_frame_glyphs call to
Fwindow_resize_apply_total or set the new total sizes before calling
window_resize_apply and have the latter call window_resize_apply_total.

 > What exactly frightens you in your first proposal?  Perhaps we should
 > install my patch on the emacs-24 branch and your window.el patch on
 > the trunk?

I'm afraid that the current bug is only the tip of an iceberg.  We
should close the window of vulnerability sketched above.  On the
emacs-24 branch.  Neither of the two schemes from the previous paragraph
is entirely trivial so using pixel values instead of character values
would put us more on the safe side.

Eventually, I intend to remove the total_lines/total_cols fields from
the frame structure and have FRAME_TOTAL_COLS and FRAME_TOTAL_LINES
calculate the values directly from the pixel sizes.  I refrained from
doing this already because I'm never sure how these values should get
rounded.

martin





  reply	other threads:[~2014-09-10  8:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-07 19:23 bug#18422: 24.3.93; Assertion violation when resizing mini-window on a TTY Eli Zaretskii
2014-09-08  9:31 ` martin rudalics
2014-09-09 13:12   ` Eli Zaretskii
2014-09-10  8:03     ` martin rudalics [this message]
2014-09-10 17:33       ` Eli Zaretskii
2014-09-11  9:25         ` martin rudalics
2014-09-11 15:11           ` Eli Zaretskii
2014-09-11 16:40             ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=541005CF.1050504@gmx.at \
    --to=rudalics@gmx.at \
    --cc=18422@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.