GNU bug report logs - #50699
28.0.50; Assertation failed when built with checking and mouse face is set to :box 0

Previous Next

Package: emacs;

Reported by: Po Lu <luangruo <at> yahoo.com>

Date: Mon, 20 Sep 2021 11:30:02 UTC

Severity: normal

Tags: fixed

Found in version 28.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50699 in the body.
You can then email your comments to 50699 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#50699; Package emacs. (Mon, 20 Sep 2021 11:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Po Lu <luangruo <at> yahoo.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 20 Sep 2021 11:30:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; Assertation failed when built with checking and mouse face
 is set to :box 0
Date: Mon, 20 Sep 2021 19:29:43 +0800
When I set the box of the mouse face on a section of text to 0, such as
with (insert (propertize "abc" foo 'mouse-face '(:box 0))), and move the
mouse over that, and I build with enable-checking, Emacs crashes with:

xfaces.c:5976: Emacs fatal error: assertion failed: XFIXNUM (box) != 0
Fatal error 6: Aborted

In GNU Emacs 28.0.50 (build 57, i386-pc-solaris2.11, X toolkit, Xaw scroll bars)
 of 2021-09-19 built on beached-whale
Repository revision: bc59c98f096f7d01cbccf98d4fdd9c3f0385e896 (please
 ignore this, I reproduced the bug on latest master)
Repository branch: HEAD
Windowing system distributor 'The X.Org Foundation', version 11.0.12101002
Configured using:
 'configure --with-gnutls=ifavailable --disable-acl'

Configured features:
GIF JPEG MODULES PDUMPER PNG THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE
XIM XPM LUCID ZLIB

Important settings:
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Shell

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Features:
(shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa
derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
mule-util rect cus-start cus-load pixel-scroll smerge-mode diff
whitespace term disp-table ehelp pulse color vc-mtn vc-hg vc-bzr vc-src
vc-sccs vc-svn vc-cvs vc-rcs thingatpt etags fileloop generator xref
project noutline outline dired-aux dired dired-loaddefs cl-extra
help-mode tabify imenu man time-date shell pcomplete compile
text-property-search gdb-mi gud comint ansi-color ring misearch
multi-isearch vc-git diff-mode easy-mmode vc vc-dispatcher bug-reference
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs edmacro kmacro sly-autoloads info package browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib
iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads
dynamic-setting x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 8 319550 36788)
 (symbols 24 15660 1)
 (strings 16 56375 3223)
 (string-bytes 1 2028150)
 (vectors 8 30879)
 (vector-slots 4 461927 37450)
 (floats 8 160 205)
 (intervals 28 45544 746)
 (buffers 564 43))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50699; Package emacs. (Mon, 20 Sep 2021 12:24:02 GMT) Full text and rfc822 format available.

Message #8 received at 50699 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 50699 <at> debbugs.gnu.org
Subject: Re: bug#50699: 28.0.50;
 Assertation failed when built with checking and mouse face is set to
 :box 0
Date: Mon, 20 Sep 2021 15:23:08 +0300
> Date: Mon, 20 Sep 2021 19:29:43 +0800
> From:  Po Lu via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> 
> When I set the box of the mouse face on a section of text to 0, such as
> with (insert (propertize "abc" foo 'mouse-face '(:box 0))), and move the
> mouse over that, and I build with enable-checking, Emacs crashes with:
> 
> xfaces.c:5976: Emacs fatal error: assertion failed: XFIXNUM (box) != 0
> Fatal error 6: Aborted

Thanks, should be fixed now.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50699; Package emacs. (Mon, 20 Sep 2021 12:55:02 GMT) Full text and rfc822 format available.

Message #11 received at 50699 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: luangruo <at> yahoo.com
Cc: 50699 <at> debbugs.gnu.org
Subject: Re: bug#50699: 28.0.50;
 Assertation failed when built with checking and mouse face is set to
 :box 0
Date: Mon, 20 Sep 2021 15:54:11 +0300
> Date: Mon, 20 Sep 2021 15:23:08 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 50699 <at> debbugs.gnu.org
> 
> > When I set the box of the mouse face on a section of text to 0, such as
> > with (insert (propertize "abc" foo 'mouse-face '(:box 0))), and move the
> > mouse over that, and I build with enable-checking, Emacs crashes with:
> > 
> > xfaces.c:5976: Emacs fatal error: assertion failed: XFIXNUM (box) != 0
> > Fatal error 6: Aborted
> 
> Thanks, should be fixed now.

Btw, there's a lot of strange stuff going on with this.

First, we accept (:box N) and (:box (N . M)) forms, but they are not
documented.  The form (:box (:line-width (N . M))) is also
undocumented.

Second, we disallow zero in (:box 0), but allow it in (:box (0 . 0))
and also in (:box (:line-width 0)) (and handle them as if 1 was
specified instead of zero).

It looks like this didn't change since Emacs 21, so it isn't bitrot of
any kind.

Does anyone know why we have these strange inconsistencies?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50699; Package emacs. (Tue, 21 Sep 2021 00:37:02 GMT) Full text and rfc822 format available.

Message #14 received at 50699 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 50699 <at> debbugs.gnu.org
Subject: Re: bug#50699: 28.0.50; Assertation failed when built with checking
 and mouse face is set to :box 0
Date: Tue, 21 Sep 2021 08:35:48 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

> Thanks, should be fixed now.

Works as advertised, thanks :)




Added tag(s) fixed. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Tue, 21 Sep 2021 15:30:05 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50699; Package emacs. (Fri, 26 Aug 2022 12:31:02 GMT) Full text and rfc822 format available.

Message #19 received at 50699 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, 50699 <at> debbugs.gnu.org
Subject: Re: bug#50699: 28.0.50; Assertation failed when built with checking
 and mouse face is set to :box 0
Date: Fri, 26 Aug 2022 14:30:15 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> Btw, there's a lot of strange stuff going on with this.
>
> First, we accept (:box N) and (:box (N . M)) forms, but they are not
> documented.  The form (:box (:line-width (N . M))) is also
> undocumented.

The latter is mentioned:

 @item @code{(:line-width (@var{vwidth} . @var{hwidth}) :color @var{color} :style @var{style})}

But I've now clarified that the elements are optional.

I don't think we need to document the alternate forms -- I think they
just confuse the issue.

> Second, we disallow zero in (:box 0), but allow it in (:box (0 . 0))
> and also in (:box (:line-width 0)) (and handle them as if 1 was
> specified instead of zero).

And I don't think we need to mention this, either.  0 is a degenerate
value for something that's supposed to be about a box's line widths, so
either erroring out or defaulting to 1 makes as much sense (which is
probably why one form does the one thing and the other does the other).

Po Lu <luangruo <at> yahoo.com> writes:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>> Thanks, should be fixed now.
>
> Works as advertised, thanks :)

So I'm closing this bug report.




bug marked as fixed in version 29.1, send any further explanations to 50699 <at> debbugs.gnu.org and Po Lu <luangruo <at> yahoo.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 26 Aug 2022 12:31:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 24 Sep 2022 11:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 215 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.