From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#911: 23.0.60; custom-set-faces causes "New Frame" to fail (max-specpdl-size) Date: Sun, 21 Sep 2008 20:30:36 +0200 Message-ID: <48D692CC.8020103@gmx.at> References: <20080916121149.GA19679@baso.home> <48CFABAF.5010707@gmx.at> <20080916141738.GA3025@baso.home> <48CFCA45.8050201@gmx.at> <20080917104117.GA4393@baso.home> <48D11231.3050707@gmx.at> <20080917153343.GA3925@baso.home> <48D12A4A.2010003@gmx.at> <20080919180120.GA22672@baso.home> <48D3F7B6.1050001@gmx.at> <20080919195533.GA27756@baso.home> Reply-To: martin rudalics , 911@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1222022873 23471 80.91.229.12 (21 Sep 2008 18:47:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Sep 2008 18:47:53 +0000 (UTC) Cc: Ian Miller To: 911@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 21 20:48:49 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KhTzE-0005QD-8t for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Sep 2008 20:48:48 +0200 Original-Received: from localhost ([127.0.0.1]:38988 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KhTyC-00067k-Sy for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Sep 2008 14:47:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KhTy9-00067V-6E for bug-gnu-emacs@gnu.org; Sun, 21 Sep 2008 14:47:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KhTy7-00066x-Gl for bug-gnu-emacs@gnu.org; Sun, 21 Sep 2008 14:47:40 -0400 Original-Received: from [199.232.76.173] (port=37409 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KhTy7-00066o-6n for bug-gnu-emacs@gnu.org; Sun, 21 Sep 2008 14:47:39 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:39136) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KhTy6-00078g-KL for bug-gnu-emacs@gnu.org; Sun, 21 Sep 2008 14:47:39 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8LIla7N015640; Sun, 21 Sep 2008 11:47:36 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m8LIj4HC014307; Sun, 21 Sep 2008 11:45:04 -0700 X-Loop: don@donarmstrong.com Resent-From: martin rudalics Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 21 Sep 2008 18:45:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 911 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: unreproducible Original-Received: via spool by 911-submit@emacsbugs.donarmstrong.com id=B911.122202228812123 (code B ref 911); Sun, 21 Sep 2008 18:45:04 +0000 Original-Received: (at 911) by emacsbugs.donarmstrong.com; 21 Sep 2008 18:38:08 +0000 Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m8LIc39j012117 for <911@emacsbugs.donarmstrong.com>; Sun, 21 Sep 2008 11:38:05 -0700 Original-Received: (qmail invoked by alias); 21 Sep 2008 18:37:57 -0000 Original-Received: from 62-47-42-119.adsl.highway.telekom.at (EHLO [62.47.42.119]) [62.47.42.119] by mail.gmx.net (mp063) with SMTP; 21 Sep 2008 20:37:57 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+9hL0H6NW9wOHZvpLZsx9LYwVequS4E9lsFv4gIv HVKb7Jz7U5tIcj User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: <20080919195533.GA27756@baso.home> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.61 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sun, 21 Sep 2008 14:47:40 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:20687 Archived-At: Ian Miller has patiently continued to debug this and we finally came to the conclusion that the following sequence of events leads to the error. Ian uses (custom-set-faces '(default ((t (... :background "DarkSlateGray" ...))))) When creating a new frame `frame-set-background-mode' gets called which eventually calls `face-spec-recalc'. The latter has this loop (dolist (spec theme-faces) (face-spec-set-2 face frame (cadr spec)))) 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. Now (>= (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. In fact, Ian told me > Incidently, whilst testing I have found that the same bug does indeed > manifest itself elsewhere. Normally I have the toolbar disabled in my > .emacs, but after stripping everything out of .emacs for testing > purposes, I noticed that I get the following errors whenever I hover > over an icon in the toolbar: > > Error while displaying tooltip: (error Variable binding depth exceeds > max-specpdl-size) > Read a directory, to operate on its files > Error while displaying tooltip: (error Variable binding depth exceeds > max-specpdl-size) > Read an existing file into an Emacs buffer which seems due to the fact that x_create_tip_frame calls `modify-frame-parameters' ... Anyone out there with good ideas for a fix? martin