all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 37415@debbugs.gnu.org
Subject: bug#37415: Asserting failure setting frame parameters to non-fixnum values in early-init.el
Date: Sat, 21 Sep 2019 12:02:51 +0200	[thread overview]
Message-ID: <CAAeL0SQv9C=fzgacL=KRe+pT4PaSVjmRa+dRW-fbPHcxYJWmxA@mail.gmail.com> (raw)
In-Reply-To: <83r24aqadz.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1510 bytes --]

On Sat, Sep 21, 2019 at 11:14 AM Eli Zaretskii <eliz@gnu.org> wrote:

>   . the FIXNUMP assertion is probably there for a reason; what is that
>     reason?

Before 572fe798cd0a00ad4a9050a7962cf8e8fbcc209b (from 2014-09-30), the
computation of left and top was done in w32_createwindow:

      /* When called with RES_TYPE_NUMBER, w32_get_arg will return zero
        for anything that is not a number and is not Qunbound.  */
      left = x_get_arg (dpyinfo, Qnil, Qleft, "left", "Left",
RES_TYPE_NUMBER);
      top = x_get_arg (dpyinfo, Qnil, Qtop, "top", "Top", RES_TYPE_NUMBER);

and anything not a number was turned to 0.

In that commit you moved the code to my_create_window and used XINT:

 +  /* When called with RES_TYPE_NUMBER, x_get_arg will return zero for
 +     anything that is not a number and is not Qunbound.  */
 +  left = x_get_arg (dpyinfo, Qnil, Qleft, "left", "Left",
RES_TYPE_NUMBER);
 +  top = x_get_arg (dpyinfo, Qnil, Qtop, "top", "Top", RES_TYPE_NUMBER);
 +  if (EQ (left, Qunbound))
 +    coords[0] = CW_USEDEFAULT;
 +  else
 +    coords[0] = XINT (left);
 +  if (EQ (top, Qunbound))
 +    coords[1] = CW_USEDEFAULT;
 +  else
 +    coords[1] = XINT (top);
 +

and these XINTs were transformed into XFIXNUM (which easserts) as part of a
big XFIXNUM/XFIXNAT change  (by Tom Tromey, in
commit d1ec3a0a8e4d7d56ebc1e4fa743130b9974ac6a8 from 2018-08-07).

So, from my ignorance, it seems like the idea was always to set non-nums to
zero, and the assertion came by accident.

    Juanma

[-- Attachment #2: Type: text/html, Size: 2435 bytes --]

  reply	other threads:[~2019-09-21 10:02 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-15 22:34 bug#37415: Asserting failure setting frame parameters to non-fixnum values in early-init.el Juanma Barranquero
2019-09-17 16:01 ` Eli Zaretskii
2019-09-17 17:04   ` Juanma Barranquero
2019-09-18  7:45   ` martin rudalics
2019-09-18 12:31     ` Eli Zaretskii
2019-09-19  8:17       ` martin rudalics
2019-09-19 14:13         ` Eli Zaretskii
2019-09-20  8:13           ` martin rudalics
2019-09-20 19:08             ` Eli Zaretskii
2019-09-21  8:51               ` martin rudalics
2019-09-21  9:14                 ` Eli Zaretskii
2019-09-21 10:02                   ` Juanma Barranquero [this message]
2019-09-21 12:27                     ` Eli Zaretskii
2019-09-22  5:54                       ` Juanma Barranquero
2019-09-22  8:09                         ` martin rudalics
2019-09-22 16:26                         ` Eli Zaretskii
2019-09-22  8:08                       ` martin rudalics
2019-09-22 16:43                         ` Eli Zaretskii
2019-09-22 17:54                           ` martin rudalics
2019-09-22 18:19                             ` Eli Zaretskii
2019-09-23  7:32                               ` martin rudalics
2019-09-23 16:35                                 ` Eli Zaretskii
2019-09-24  6:45                                   ` martin rudalics
2019-09-24  7:41                                     ` Eli Zaretskii
2019-09-22  8:08                   ` martin rudalics
2019-09-22 16:27                     ` Eli Zaretskii
2019-09-22 17:53                       ` martin rudalics
2019-09-22 18:16                         ` Eli Zaretskii
2019-09-23  7:32                           ` martin rudalics
2019-09-23 16:08                             ` Eli Zaretskii
2019-09-21  4:25             ` Juanma Barranquero
2019-09-18  2:30 ` Paul Eggert

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='CAAeL0SQv9C=fzgacL=KRe+pT4PaSVjmRa+dRW-fbPHcxYJWmxA@mail.gmail.com' \
    --to=lekktu@gmail.com \
    --cc=37415@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.