GNU bug report logs -
#60580
29.0.60; crash in xdisp.c with modus theme and display-fill-column-indicator
Previous Next
Reported by: chad <yandros <at> gmail.com>
Date: Thu, 5 Jan 2023 19:21:02 UTC
Severity: normal
Found in version 29.0.60
Done: Eli Zaretskii <eliz <at> gnu.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 60580 in the body.
You can then email your comments to 60580 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#60580
; Package
emacs
.
(Thu, 05 Jan 2023 19:21:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
chad <yandros <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 05 Jan 2023 19:21:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
From emacs -q, evaluate:
(custom-set-variables '(custom-enabled-themes '(modus-vivendi)))
(global-display-fill-column-indicator-mode 1)
Emacs will fail the eassert in append_stretch_glyph at
xdisp.c:30993. Looking at it in gdb, append_stretch_glyph is passed an
it with both ascent=descent=1 and height=11. It doesn't happen with the
default theme, nor with adwaita or leuven-dark (picked randomly), but I
haven't been able to figure out which part of the modus themes lead to
the weird ascent/descent values. This is repeatable for me, and I'm
happy to poke at it more if someone can tell me where to poke.
xbacktrace says: "redisplay_internal (C function)" (0x0)
I've attached a file that contains the full trace (apologies if gmail makes
it hard to read; let me know and I'll follow up with it inline).
In GNU Emacs 29.0.60 (build 2, x86_64-pc-linux-gnu, GTK+ Version
3.24.24, cairo version 1.16.0) of 2023-01-04 built on penguin
Repository revision: 8d530ca6542b169cb8f0cd3862cc5d24f68935c8
Repository branch: emacs-29
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Debian GNU/Linux 11 (bullseye)
Configured using:
'configure -C --with-native-compilation --with-json --without-xwidgets
--without-pop --with-small-ja-dic --without-imagemagick
--enable-checking=yes,glyphs --enable-check-lisp-object-type=yes
'CFLAGS=-g3 -O0''
Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBOTF LIBSELINUX LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY
PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB
Important settings:
value of $LC_COLLATE: C
value of $LC_CTYPE: en_US.UTF-8
value of $LC_MESSAGES: en_US.UTF-8
value of $LC_NUMERIC: en_US.UTF-8
value of $LC_TIME: en_US.UTF-8
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: ELisp/d
Minor modes in effect:
global-display-fill-column-indicator-mode: t
display-fill-column-indicator-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-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
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny rfc822
mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util
text-property-search time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils dired-aux dired dired-loaddefs
easy-mmode comp comp-cstr warnings icons subr-x rx cl-seq cl-macs gv
cl-extra help-mode cl-loaddefs cl-lib bytecomp byte-compile
display-fill-column-indicator rmc iso-transl tooltip cconv eldoc paren
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 nadvice seq simple cl-generic
indonesian philippine 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 emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process
native-compile emacs)
Memory information:
((conses 16 100278 8108)
(symbols 48 7547 0)
(strings 32 28488 2543)
(string-bytes 1 881744)
(vectors 16 20890)
(vector-slots 8 378240 12529)
(floats 8 36 30)
(intervals 56 384 5)
(buffers 984 14))
[Message part 2 (text/html, inline)]
[emacs-crash.txt (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#60580
; Package
emacs
.
(Thu, 05 Jan 2023 19:58:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 60580 <at> debbugs.gnu.org (full text, mbox):
> From: chad <yandros <at> gmail.com>
> Date: Thu, 5 Jan 2023 14:19:48 -0500
>
> From emacs -q, evaluate:
>
> (custom-set-variables '(custom-enabled-themes '(modus-vivendi)))
> (global-display-fill-column-indicator-mode 1)
>
> Emacs will fail the eassert in append_stretch_glyph at
> xdisp.c:30993.
Doesn't happen here. What is your default face's font with that theme?
> Looking at it in gdb, append_stretch_glyph is passed an
> it with both ascent=descent=1 and height=11.
I don't understand: if ascent=descent=1 and height=11, then how come
the condition
eassert (ascent >= 0 && ascent <= height);
fails to be true?
The backtrace tells a different story:
> #1 0x0000555555823630 in die
> (msg=0x555555991b70 "ascent >= 0 && ascent <= height", file=0x55555598b48f "xdisp.c", line=30993) at alloc.c:7706
> #2 0x00005555556388a2 in append_stretch_glyph
> (it=0x7fffffff8430, object=XIL(0), width=639, height=2, ascent=11)
> at xdisp.c:30993
It says here that height = 2 and ascent = 11. Which is very strange.
Can you tell what happens here (line 23325):
const int stretch_ascent = (((it->ascent + it->descent)
* FONT_BASE (font)) / FONT_HEIGHT (font));
What are the values of the following at that line:
FONT_BASE (font)
FONT_HEIGHT (font)
it->ascent
it->descent
stretch_ascent
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#60580
; Package
emacs
.
(Thu, 05 Jan 2023 20:04:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 60580 <at> debbugs.gnu.org (full text, mbox):
> Cc: 60580 <at> debbugs.gnu.org
> Date: Thu, 05 Jan 2023 21:57:39 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
>
> > From: chad <yandros <at> gmail.com>
> > Date: Thu, 5 Jan 2023 14:19:48 -0500
> >
> > From emacs -q, evaluate:
> >
> > (custom-set-variables '(custom-enabled-themes '(modus-vivendi)))
> > (global-display-fill-column-indicator-mode 1)
> >
> > Emacs will fail the eassert in append_stretch_glyph at
> > xdisp.c:30993.
>
> Doesn't happen here. What is your default face's font with that theme?
I guess the culprit is this bit:
;;;;; display-fill-column-indicator-mode
`(fill-column-indicator ((,class :height 1 :background ,bg-region :foreground ,bg-region)))
I have no idea what is ":height 1" about, but I think it's wrong and
should be replaced with some reasonable value.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#60580
; Package
emacs
.
(Thu, 05 Jan 2023 20:36:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 60580 <at> debbugs.gnu.org (full text, mbox):
> Cc: 60580 <at> debbugs.gnu.org
> Date: Thu, 05 Jan 2023 22:03:48 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
>
> > Cc: 60580 <at> debbugs.gnu.org
> > Date: Thu, 05 Jan 2023 21:57:39 +0200
> > From: Eli Zaretskii <eliz <at> gnu.org>
> >
> > > From: chad <yandros <at> gmail.com>
> > > Date: Thu, 5 Jan 2023 14:19:48 -0500
> > >
> > > From emacs -q, evaluate:
> > >
> > > (custom-set-variables '(custom-enabled-themes '(modus-vivendi)))
> > > (global-display-fill-column-indicator-mode 1)
> > >
> > > Emacs will fail the eassert in append_stretch_glyph at
> > > xdisp.c:30993.
> >
> > Doesn't happen here. What is your default face's font with that theme?
>
> I guess the culprit is this bit:
>
> ;;;;; display-fill-column-indicator-mode
> `(fill-column-indicator ((,class :height 1 :background ,bg-region :foreground ,bg-region)))
>
> I have no idea what is ":height 1" about, but I think it's wrong and
> should be replaced with some reasonable value.
Regardless, please try the latest emacs-29 branch, I hope I fixed the
assertion violation now.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#60580
; Package
emacs
.
(Fri, 06 Jan 2023 04:02:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 60580 <at> debbugs.gnu.org (full text, mbox):
> From: Eli Zaretskii <eliz <at> gnu.org>
> Date: Thu, 5 Jan 2023 22:03:48 +0200
>
>> Cc: 60580 <at> debbugs.gnu.org
>> Date: Thu, 05 Jan 2023 21:57:39 +0200
>> From: Eli Zaretskii <eliz <at> gnu.org>
>>
>> > From: chad <yandros <at> gmail.com>
>> > Date: Thu, 5 Jan 2023 14:19:48 -0500
>> >
>> > From emacs -q, evaluate:
>> >
>> > (custom-set-variables '(custom-enabled-themes '(modus-vivendi)))
>> > (global-display-fill-column-indicator-mode 1)
>> >
>> > Emacs will fail the eassert in append_stretch_glyph at
>> > xdisp.c:30993.
>>
>> Doesn't happen here. What is your default face's font with that theme?
>
> I guess the culprit is this bit:
>
> ;;;;; display-fill-column-indicator-mode
> `(fill-column-indicator ((,class :height 1 :background ,bg-region :foreground ,bg-region)))
>
> I have no idea what is ":height 1" about, but I think it's wrong and
> should be replaced with some reasonable value.
The ":height 1" has been there for many versions and never caused a
problem of this sort. If this is the cause, I will change it right
away. The reason it is like this is to make the indicator a contiguous
line that is not affected by variations in font heights and/or a high
'line-spacing' value. Otherwise the indicator can appear as a dashed
line.
--
Protesilaos Stavrou
https://protesilaos.com
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#60580
; Package
emacs
.
(Fri, 06 Jan 2023 07:13:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 60580 <at> debbugs.gnu.org (full text, mbox):
> From: Protesilaos Stavrou <info <at> protesilaos.com>
> Cc: 60580 <at> debbugs.gnu.org
> Date: Fri, 06 Jan 2023 06:01:05 +0200
>
> > ;;;;; display-fill-column-indicator-mode
> > `(fill-column-indicator ((,class :height 1 :background ,bg-region :foreground ,bg-region)))
> >
> > I have no idea what is ":height 1" about, but I think it's wrong and
> > should be replaced with some reasonable value.
>
> The ":height 1" has been there for many versions and never caused a
> problem of this sort.
I'm guessing that this is because almost no one builds Emacs with the
assertions enabled (--enable-testing=yes at configure time). I do,
but the problem doesn't happen on my system, so I haven't seen it,
either.
> The reason it is like this is to make the indicator a contiguous
> line that is not affected by variations in font heights and/or a high
> 'line-spacing' value. Otherwise the indicator can appear as a dashed
> line.
Why do you assume that ":height 1" will avoid this problem? I think
you are just using some undocumented side effect of the
implementation, as there's no reason to believe using such small
height of the face can solve the problem with occasional 1-pixel gaps
in the fill-column indicator.
But let's first see if my latest changes prevent the assertion
violations even without changing the themed faces.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#60580
; Package
emacs
.
(Mon, 09 Jan 2023 21:42:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 60580 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Apologies; I was away for a while. The problem is fixed in the current
emacs-29 branch, indeed.
The ascent/height numbers were an error introduced by me when I was
transcribing things from the emacs I was debugging, the emacs I was using
to create the bug report, and the email program that I needed to use for
annoying reasons. Please accept my heartfelt apologies for the misleading
mistake.
Thanks,
~Chad
On Fri, Jan 6, 2023 at 2:12 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Protesilaos Stavrou <info <at> protesilaos.com>
> > Cc: 60580 <at> debbugs.gnu.org
> > Date: Fri, 06 Jan 2023 06:01:05 +0200
> >
> > > ;;;;; display-fill-column-indicator-mode
> > > `(fill-column-indicator ((,class :height 1 :background
> ,bg-region :foreground ,bg-region)))
> > >
> > > I have no idea what is ":height 1" about, but I think it's wrong and
> > > should be replaced with some reasonable value.
> >
> > The ":height 1" has been there for many versions and never caused a
> > problem of this sort.
>
> I'm guessing that this is because almost no one builds Emacs with the
> assertions enabled (--enable-testing=yes at configure time). I do,
> but the problem doesn't happen on my system, so I haven't seen it,
> either.
>
> > The reason it is like this is to make the indicator a contiguous
> > line that is not affected by variations in font heights and/or a high
> > 'line-spacing' value. Otherwise the indicator can appear as a dashed
> > line.
>
> Why do you assume that ":height 1" will avoid this problem? I think
> you are just using some undocumented side effect of the
> implementation, as there's no reason to believe using such small
> height of the face can solve the problem with occasional 1-pixel gaps
> in the fill-column indicator.
>
> But let's first see if my latest changes prevent the assertion
> violations even without changing the themed faces.
>
[Message part 2 (text/html, inline)]
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Tue, 10 Jan 2023 03:27:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
chad <yandros <at> gmail.com>
:
bug acknowledged by developer.
(Tue, 10 Jan 2023 03:27:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 60580-done <at> debbugs.gnu.org (full text, mbox):
> From: chad <yandros <at> gmail.com>
> Date: Mon, 9 Jan 2023 16:41:11 -0500
> Cc: Protesilaos Stavrou <info <at> protesilaos.com>, 60580 <at> debbugs.gnu.org
>
> Apologies; I was away for a while. The problem is fixed in the current emacs-29 branch, indeed.
Thanks. So I'm closing this bug.
> The ascent/height numbers were an error introduced by me when I was transcribing things from the emacs
> I was debugging, the emacs I was using to create the bug report, and the email program that I needed to use
> for annoying reasons. Please accept my heartfelt apologies for the misleading mistake.
No sweat.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 07 Feb 2023 12:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 129 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.