From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David PONCE Newsgroups: gmane.emacs.devel Subject: Re: [Stephen.Berman@gmx.net: Emacs hangs while edebugging recentf.el] Date: Mon, 21 Nov 2005 10:34:24 +0100 (CET) Message-ID: <20123679.1132565664852.JavaMail.www@wwinf1507> Reply-To: david.ponce@wanadoo.fr NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1132586414 29696 80.91.229.2 (21 Nov 2005 15:20:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 21 Nov 2005 15:20:14 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 21 16:20:10 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EeDPn-0001P3-EH for ged-emacs-devel@m.gmane.org; Mon, 21 Nov 2005 16:17:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EeDFl-0001Hx-6Y for ged-emacs-devel@m.gmane.org; Mon, 21 Nov 2005 10:06:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ee8Uc-0002xY-6d for emacs-devel@gnu.org; Mon, 21 Nov 2005 05:01:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ee8R0-0002iG-0x for emacs-devel@gnu.org; Mon, 21 Nov 2005 04:59:13 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ee84A-0000uB-VB for emacs-devel@gnu.org; Mon, 21 Nov 2005 04:34:28 -0500 Original-Received: from [193.252.23.84] (helo=smtp15.wanadoo.fr) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Ee84B-00083t-1T for emacs-devel@gnu.org; Mon, 21 Nov 2005 04:34:27 -0500 Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1504.wanadoo.fr (SMTP Server) with ESMTP id D589270000BE for ; Mon, 21 Nov 2005 10:34:24 +0100 (CET) Original-Received: from wwinf1507 (wwinf1507 [172.22.146.50]) by mwinf1504.wanadoo.fr (SMTP Server) with ESMTP id D1A1E70000AA; Mon, 21 Nov 2005 10:34:24 +0100 (CET) X-ME-UUID: 20051121093424858.D1A1E70000AA@mwinf1504.wanadoo.fr Original-To: rms@gnu.org X-Originating-IP: [205.167.7.18] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~| X-WUM-CC: |~| X-WUM-REPLYTO: |~| X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:46401 Archived-At: > Would you please DTRT and then ack? Sorry for the delay to reply. [...] > I'm not sure if this is a real bug or some limitation in the way > edebug works. I did the following: > 1. emacs -q > 2. M-x load-library RET recentf RET > 3. M-x recentf-mode > 4. M-: (setq recentf-list [...] > 5. Click on File->Open Recent->Options and set Recentf Menu Filter to > recentf-arrange-by-mode for current session. > 6. In the lisp source recentf.el instrument recentf-open-files for > edebug (C-u M-C-x). > 7. M-x recentf-open-files > 8. Step through the function until this sexp: > (apply 'widget-create > `(group > :indent 2 > :format "\n%v\n" > ,@(recentf-open-files-items (or files recentf-list)))) > > When ededug hits the end of this sexp, Emacs hangs and starts > consuming all available CPU cycles. If I quickly press C-g the > hanging stops. [...] I reproduced the error and also found that Emacs hangs in the built-in function `prin1-to-string' when it tries to print the value the function `widget-create' returns, which contains a lot of circular references in a deeply nested list. If I don't interrupt the hang, after some time, the function fails with a "Memory exhausted" message. Notice that the widgets are correctly created in the "*Open Recent*" buffer. This is only the edebug prin1 function that hangs. When I set the value of `edebug-print-level' to 10 instead of the default value of 50, Emacs no more hangs. Maybe there is a bug in the prin1-to-string function? Unfortunately I don't know how to fix it. Or perhaps the default values of `edebug-print-level' and `edebug-print-length' are too big? Hope it helps. David