GNU bug report logs - #911
23.0.60; custom-set-faces causes "New Frame" to fail (max-specpdl-size)

Previous Next

Package: emacs;

Reported by: Ian Miller <emacs <at> soroban.fastmail.fm>

Date: Sun, 7 Sep 2008 11:45:04 UTC

Severity: normal

Tags: unreproducible

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (Emacs bug Tracking System)
To: Ian Miller <emacs <at> soroban.fastmail.fm>
Subject: bug#911 closed by Chong Yidong <cyd <at> stupidchicken.com> (Re: 
 bug#911: 23.0.60; custom-set-faces causes "New Frame" to fail)
[Message part 1 (text/plain, inline)]
This is an automatic notification regarding your bug report
which was filed against the emacs package:

#911: 23.0.60; custom-set-faces causes "New Frame" to fail (max-specpdl-size)

It has been closed by Chong Yidong <cyd <at> stupidchicken.com>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Chong Yidong <cyd <at> stupidchicken.com> by
replying to this email.


-- 
911: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=911
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Chong Yidong <cyd <at> stupidchicken.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 911-done <at> debbugs.gnu.org, Ian Miller <ian <at> soroban.fastmail.fm>
Subject: Re: bug#911: 23.0.60; custom-set-faces causes "New Frame" to fail
Date: Wed, 24 Sep 2008 16:25:39 -0400
> When creating a new frame `frame-set-background-mode' gets called
> which eventually calls `face-spec-recalc'...  which calls
> `face-spec-set-2' two times for the default face background, one time
> for #ffffff and one time for DarkSlateGray.  `face-spec-set-2' calls
> `set-face-attribute', which calls `internal-set-lisp-face-attribute'
> which calls Fmodify_frame_parameters which calls
> `frame-set-background-mode' again.

The Emacs face code strikes again, huh.

> (>= (apply '+ (color-values "DarkSlateGrey"))
>     (* (apply '+ (color-values "white")) .6))
>
> evaluates to nil while
>
> (>= (apply '+ (color-values "#ffffff"))
>     (* (apply '+ (color-values "white")) .6))
>
> evaluates to t.  This means that `bg-mode' never equals `old-bg-mode'
> but continuously alternates between 'light and 'dark, so
> `frame-set-background-mode' will call `face-spec-recalc' thus sending
> Emacs into a nasty loop.
>
> Note that the looping behavior is due to the second call in the dolist
> (that for DarkSlateGrey).  The first call (for #ffffff) terminates.
>
> I'm not sure how to fix this because that looping has no specific entry
> point.

How about defining a variable `frame-set-background-mode-bg-mode'?  If
it's nil, frame-set-background-mode uses the existing calculation to
determine whether it's light or dark; if it's non-nil, it uses that
existing value.  This should prevent the oscillation.

[Message part 3 (message/rfc822, inline)]
From: Ian Miller <emacs <at> soroban.fastmail.fm>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.60; custom-set-faces causes "New Frame" to fail
	(max-specpdl-size)
Date: Sun, 7 Sep 2008 12:36:42 +0100

Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the emacs-pretest-bug <at> gnu.org
mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

Whenever I select "File->New Frame" (C-x 5 2) a new frame does not
appear and I receive the message "Variable binding depth exceeds
max-specpdl-size". 

This seems to be caused by any use of custom-set-faces in the
.emacs file. When I remove the custom-set-faces code from .emacs, the
bug does not occur. 

Example custom-set-faces in .emacs that causes the bug:

     (custom-set-faces
      ;; custom-set-faces was added by Custom.
      ;; If you edit it by hand, you could mess it up, so be careful.
      ;; Your init file should contain only one such instance.
      ;; If there is more than one, they won't work right.
      '(default ((t (:stipple nil :background "DarkSlateGray"
     :foreground "wheat" :inverse-video nil :box nil :strike-through
     nil :overline nil :underline nil :slant normal :weight normal
     :height 121 :width normal :foundry "unknown" :family "DejaVu Sans Mono")))))

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/23.0.60/etc/DEBUG for instructions.


In GNU Emacs 23.0.60.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.12.11)
 of 2008-08-01 on x86-1
Windowing system distributor `The X.Org Foundation', version
 11.0.10499905
configured using `configure  '--build=x86_64-redhat-linux-gnu'
 '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu'
 '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr'
 '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
 '--datadir=/usr/share' '--includedir=/usr/include'
 '--libdir=/usr/lib64' '--libexecdir=/usr/libexec'
 '--localstatedir=/var' '--sharedstatedir=/usr/com'
 '--mandir=/usr/share/man' '--infodir=/usr/share/info'
 'build_alias=x86_64-redhat-linux-gnu'
 'host_alias=x86_64-redhat-linux-gnu'
 'target_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2
 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
 --param=ssp-buffer-size=4 -m64 -mtune=generic''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_GB.utf8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  show-paren-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <menu-bar> <file> 
<make-frame> M-x r e p o <tab> r <tab> <return>

Recent messages:
Loading /usr/share/emacs/site-lisp/site-start.d/igrep-init.el
(source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/muse-init.el
(source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/php-mode-init.el
(source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/po-mode-init.el
(source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/rpm-spec-mode-init.el
(source)...done
Loading gnus...done
Loading paren...done
For information about GNU Emacs and the GNU system, type C-h C-a.
display-color-cells: Variable binding depth exceeds max-specpdl-size
Making completion list...



This bug report was last modified 16 years and 234 days ago.

Previous Next


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