Subject: bug#69431: 30.0.50; Strange fontificaion behavior

From: Björn Bidar <[email-masked]>
Date: Sun, 07 Apr 2024 21:02:08 +0300

Eli Zaretskii <[email-masked]> writes:

>> From: Björn Bidar <[email-masked]>
>> Cc: [email-masked],  [email-masked],  [email-masked],
>>   [email-masked],  [email-masked]
>> Date: Sun, 07 Apr 2024 18:00:26 +0300
>>
>> >> Is there already a bug for this issue or should I open a new one?
>>
>> > It depends, I think.  What is the recipe for what you see?
>>
>> I can only trigger the bug when I load enough packages to trigger the bug
>> First I thought the bug is triggered when I modus themes but it also
>> happens without, I just have to load enough packages.
>>
>>
>> I attach my init.el (with private information removed) and
>> the logs I had from  earlier and now.
>
> It is some kind of recursive call:
>
>   face-attribute->face-attribute-merged-with->face_attribute->...
>
> Looks like a separate problem to me.  It is important to understand
> what face causes this, and what is that face's spec.
>
> Also, please make a point of loading the src/.gdbinit file from the
> Emacs source tree before running Emacs under GDB, so that the
> backtrace includes also the Lisp backtrace, and shows Lisp objects in
> human-readable format, for easier reading.

The backtrace was with src/.gdbinit loaded however the lisp wasn't
included the backtace I suspect it is because:
Cannot access memory at address 0x7fffff66ff7f

>> I tried to find which package exactly triggers the bug but I did not
>> manage to do that. I only know that it is triggered through the use of
>> faces.
>
> Both backtraces are almost identical, and in both the problem seems to
> be triggered by loading and enabling a theme.  So I don't think I
> understand what you say here about "enough packages" -- I don't
> suppose all of the packages you load are themes, are they?  IOW, can
> you show a backtrace from a crash that is not caused by loading a
> theme?  E.g., what happens if you remove all theme loading and related
> stuff from your init files?

What do you mean by related?
If I don't load a theme Emacs doesn't crash but if I start Emacs with -Q
and load the theme it's not enough to crash Emacs that's why I mean by
enough packages essentially.

Eventually I isolated the exact problem what caused the bug:
1. (setq max-lisp-eval-depth 32768)
2. load-theme modus-vivendi (any modus theme works as a trigger)

With the Emacs ref c59c8db98a1d031a20ec7850978653657e394baa  
this Emacs doesn't crash with the same settings.