* Re: [Stephen.Berman@bogus.example.com: Emacs hangs while edebugging recentf.el]
@ 2005-12-15 18:39 martin rudalics
2005-12-16 0:12 ` Chong Yidong
0 siblings, 1 reply; 5+ messages in thread
From: martin rudalics @ 2005-12-15 18:39 UTC (permalink / raw)
Cc: rms, emacs-devel
> 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.
I built today with the
if (print_depth >= 3 * PRINT_CIRCLE)
fix and it still fails for me.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Stephen.Berman@bogus.example.com: Emacs hangs while edebugging recentf.el]
2005-12-15 18:39 [Stephen.Berman@bogus.example.com: Emacs hangs while edebugging recentf.el] martin rudalics
@ 2005-12-16 0:12 ` Chong Yidong
2005-12-16 7:23 ` martin rudalics
0 siblings, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2005-12-16 0:12 UTC (permalink / raw)
Cc: rms, emacs-devel
martin rudalics <rudalics@gmx.at> writes:
> > 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.
>
> I built today with the
>
> if (print_depth >= 3 * PRINT_CIRCLE)
>
> fix and it still fails for me.
It works for me, at least using the recipe given in the original
email. What steps are you using?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Stephen.Berman@bogus.example.com: Emacs hangs while edebugging recentf.el]
2005-12-16 0:12 ` Chong Yidong
@ 2005-12-16 7:23 ` martin rudalics
2005-12-16 15:35 ` Chong Yidong
0 siblings, 1 reply; 5+ messages in thread
From: martin rudalics @ 2005-12-16 7:23 UTC (permalink / raw)
Cc: rms, emacs-devel
> It works for me, at least using the recipe given in the original
> email. What steps are you using?
>
`edebug-defun' on `widget-field-find' and customizing some arbitrary
editable field. And `edebug-print-level' equalling 50. My (Windows ME)
swap area quickly grew from its usual 70MB to nearly 500MB before I was
able to kill Emacs.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Stephen.Berman@bogus.example.com: Emacs hangs while edebugging recentf.el]
2005-12-16 7:23 ` martin rudalics
@ 2005-12-16 15:35 ` Chong Yidong
2005-12-17 11:39 ` martin rudalics
0 siblings, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2005-12-16 15:35 UTC (permalink / raw)
Cc: rms, emacs-devel
martin rudalics <rudalics@gmx.at> writes:
> > It works for me, at least using the recipe given in the original
> > email. What steps are you using?
>
> `edebug-defun' on `widget-field-find' and customizing some arbitrary
> editable field. And `edebug-print-level' equalling 50. My (Windows ME)
> swap area quickly grew from its usual 70MB to nearly 500MB before I was
> able to kill Emacs.
OK, I guess that hack was not good enough to cover all situations.
Try this one; it should be pretty much bulletproof.
*** emacs/src/print.c.~1.215.~ 2005-12-15 19:09:36.000000000 -0500
--- emacs/src/print.c 2005-12-16 10:20:17.000000000 -0500
***************
*** 1313,1326 ****
/* Give up if we go so deep that print_object will get an error. */
/* See similar code in print_object. */
! /* Because print_preprocess "follows" nested lists in a slightly
! different order from print_object, there is a risk of giving up
! too soon. In that case, a deeply nested circular list may cause
! print_object to loop. Using 3 * PRINT_CIRCLE should make this
! possibility negligible, but at some point someone will have to
! sit down and do a more careful analysis. -- cyd */
! if (print_depth >= 3 * PRINT_CIRCLE)
! return;
/* Avoid infinite recursion for circular nested structure
in the case where Vprint_circle is nil. */
--- 1313,1320 ----
/* Give up if we go so deep that print_object will get an error. */
/* See similar code in print_object. */
! if (print_depth >= PRINT_CIRCLE)
! error ("Apparently circular structure being printed");
/* Avoid infinite recursion for circular nested structure
in the case where Vprint_circle is nil. */
*** emacs/lisp/emacs-lisp/edebug.el.~3.84.~ 2005-12-13 21:38:03.000000000 -0500
--- emacs/lisp/emacs-lisp/edebug.el 2005-12-16 10:29:59.000000000 -0500
***************
*** 3711,3717 ****
(print-level (or edebug-print-level print-level))
(print-circle (or edebug-print-circle print-circle))
(print-readably nil)) ;; lemacs uses this.
! (edebug-prin1-to-string value)))
(defun edebug-compute-previous-result (edebug-previous-value)
(if edebug-unwrap-results
--- 3711,3719 ----
(print-level (or edebug-print-level print-level))
(print-circle (or edebug-print-circle print-circle))
(print-readably nil)) ;; lemacs uses this.
! (condition-case nil
! (edebug-prin1-to-string value)
! (error "# Circular or too deeply-nested structure #"))))
(defun edebug-compute-previous-result (edebug-previous-value)
(if edebug-unwrap-results
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Stephen.Berman@bogus.example.com: Emacs hangs while edebugging recentf.el]
2005-12-16 15:35 ` Chong Yidong
@ 2005-12-17 11:39 ` martin rudalics
0 siblings, 0 replies; 5+ messages in thread
From: martin rudalics @ 2005-12-17 11:39 UTC (permalink / raw)
Cc: rms, emacs-devel
> OK, I guess that hack was not good enough to cover all situations.
> Try this one; it should be pretty much bulletproof.
This does it, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-12-17 11:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-15 18:39 [Stephen.Berman@bogus.example.com: Emacs hangs while edebugging recentf.el] martin rudalics
2005-12-16 0:12 ` Chong Yidong
2005-12-16 7:23 ` martin rudalics
2005-12-16 15:35 ` Chong Yidong
2005-12-17 11:39 ` martin rudalics
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.