GNU bug report logs -
#52479
27.2; EDebugging stops when breakpoint condition can not be printed
Previous Next
To reply to this bug, email your comments to 52479 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#52479
; Package
emacs
.
(Tue, 14 Dec 2021 13:05:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Петров Андрей <an.petrov <at> pay-lab.ru>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 14 Dec 2021 13:05:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello, team!
The following code can reproduce the bug:
(require 'cl-lib)
(require 'eieio)
(defclass my-field ()
((from-types :initform nil)
(type :initform nil)))
(defun test ()
"Demonstrates edebug condition printing bug.
1. evaluate the buffer
2. instrument `test' function for debugging
3. add conditional breakpoint inside lambda below (see comment)
M-x edebug-set-conditional-breakpoint [RET] root [RET]
4. Start the function for debugging
M-x (test)
5. Continue to the breakpoint
c
Now error: \"Apparently circular structure being printed\" is
printed and no further debugging is possible.
"
(let* ((root (my-field))
(tmp root))
(dotimes (i 100)
(let ((a (my-field)))
(push a (oref tmp type))
(push tmp (oref a from-types))
(setf tmp a)))
(push root (oref tmp type))
(cl-remove root '(1 2 3 4) :test (lambda (a b) ;; <-- put cursor here and set
;; conditional breakpoint with condition: root
(= (length (oref a from-types))) b))
(cl-remove root '(1 2 3 4) :test (lambda (a b) (= (length (oref a from-types))) b))
(cl-remove root '(1 2 3 4) :test (lambda (a b) (= (length (oref a from-types))) b))
"Finished"
))
It hard for me to get backtraces on the example but on other
(complicated) code I got the following using recursive edit:
Debugger entered--Lisp error: (error "Apparently circular structure being printed")
apply(debug error (error "Apparently circular structure being printed"))
edebug(error (error "Apparently circular structure being printed"))
signal(error ("Apparently circular structure being printed"))
edebug-signal(error ("Apparently circular structure being printed"))
message("Break: %s => %s" filtered (#<field field-157aa078be4c>))
edebug--display-1(nil 0 before)
edebug--display(nil 0 before)
edebug-debugger(0 before nil)
edebug-before(0)
(edebug-after (edebug-before 0) 11 (find-inpas-paths (edebug-after 0 1 parent) (edebug-after 0 2 stop-id) (edebug-after (edebug-before 3) 10 (if (edebug-after 0 4 filtered) (edebug-after (edebug-before 5) 8 (cl-remove (edebug-after 0 6 parent) (edebug-after 0 7 context) :count 1 :test (lambda (a b) (edebug-enter ... ... ...)))) (edebug-after 0 9 context)))))
(lambda nil (edebug-after (edebug-before 0) 11 (find-inpas-paths (edebug-after 0 1 parent) (edebug-after 0 2 stop-id) (edebug-after (edebug-before 3) 10 (if (edebug-after 0 4 filtered) (edebug-after (edebug-before 5) 8 (cl-remove (edebug-after 0 6 parent) (edebug-after 0 7 context) :count 1 :test (lambda ... ...))) (edebug-after 0 9 context))))))()
edebug-default-enter(edebug-anon17 (#<field field-157aa078be4c>) (lambda nil (edebug-after (edebug-before 0) 11 (find-inpas-paths (edebug-after 0 1 parent) (edebug-after 0 2 stop-id) (edebug-after (edebug-before 3) 10 (if (edebug-after 0 4 filtered) (edebug-after (edebug-before 5) 8 (cl-remove ... ... :count 1 :test ...)) (edebug-after 0 9 context)))))))
edebug-enter(edebug-anon17 (#<field field-157aa078be4c>) (lambda nil (edebug-after (edebug-before 0) 11 (find-inpas-paths (edebug-after 0 1 parent) (edebug-after 0 2 stop-id) (edebug-after (edebug-before 3) 10 (if (edebug-after 0 4 filtered) (edebug-after (edebug-before 5) 8 (cl-remove ... ... :count 1 :test ...)) (edebug-after 0 9 context)))))))
(lambda (parent) (edebug-enter 'edebug-anon17 (list parent) #'(lambda nil (edebug-after (edebug-before 0) 11 (find-inpas-paths (edebug-after 0 1 parent) (edebug-after 0 2 stop-id) (edebug-after ... 10 ...))))))(#<field field-157aa078be4c>)
mapcan((lambda (parent) (edebug-enter 'edebug-anon17 (list parent) #'(lambda nil (edebug-after (edebug-before 0) 11 (find-inpas-paths (edebug-after 0 1 parent) (edebug-after 0 2 stop-id) (edebug-after ... 10 ...)))))) (#<field field-157aa078be4c>))
P.S. I could not copy the text from emacs with C-c M-i according to hint:
While in the mail buffer:
Type C-c C-c to send the bug report.
Type C-x k RET to cancel (don’t send it).
Type C-c M-i to copy text to your preferred mail program. <----
Andrey Petrov.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#52479
; Package
emacs
.
(Wed, 15 Dec 2021 05:27:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 52479 <at> debbugs.gnu.org (full text, mbox):
Петров Андрей <an.petrov <at> pay-lab.ru> writes:
> Hello, team!
Hello - thanks for your (very well done and pleasant to read!) report.
> Debugger entered--Lisp error: (error "Apparently circular structure being printed")
> apply(debug error (error "Apparently circular structure being printed"))
> edebug(error (error "Apparently circular structure being printed"))
> signal(error ("Apparently circular structure being printed"))
> edebug-signal(error ("Apparently circular structure being printed"))
> message("Break: %s => %s" filtered (#<field field-157aa078be4c>))
Another symptom of printing the wrong way, similar to bug#52222.
Printing with `edebug-safe-prin1-to-string' should fix it and be the
right thing, right?
> P.S. I could not copy the text from emacs with C-c M-i according to hint:
> While in the mail buffer:
> Type C-c C-c to send the bug report.
> Type C-x k RET to cancel (don’t send it).
> Type C-c M-i to copy text to your preferred mail program. <----
Hmm, that calls `report-emacs-bug-insert-to-mailer'. You have set up a
mailer on your system and it works all fine? If you think Emacs is not
behaving here, can you please create a separate report? - that this
works is very important. Maybe you can already give debugging a try?
Thanks,
Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#52479
; Package
emacs
.
(Wed, 15 Dec 2021 07:03:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 52479 <at> debbugs.gnu.org (full text, mbox):
Michael,
> Hmm, that calls `report-emacs-bug-insert-to-mailer'. You have set up a
> mailer on your system and it works all fine? If you think Emacs is not
> behaving here, can you please create a separate report? - that this
> works is very important. Maybe you can already give debugging a try?
I did not. I think this is the reason why it did not work for me. Thank you!
I think the following changes (or similar) would help to avoid such misunderstandings:
--- /usr/share/emacs/27.2/lisp/mail/emacsbug.el.gz
+++ #<buffer emacsbug.el.gz>
@@ -114,7 +114,8 @@
(start-process "xdg-email" nil "xdg-email"
"--subject" subject
"--body" body
- (concat "mailto:" to)))
+ (concat "mailto:" to))
+ (display-buffer-below-selected (get-buffer "xdg-email") nil))
(error "Subject, To or body not found")))))
(defvar report-emacs-bug--os-description nil
Diff finished. Wed Dec 15 11:58:39 2021
Andrey.
________________________________________
От: Michael Heerdegen <michael_heerdegen <at> web.de>
Отправлено: 15 декабря 2021 г. 10:26:38
Кому: Петров Андрей
Копия: 52479 <at> debbugs.gnu.org
Тема: Re: bug#52479: 27.2; EDebugging stops when breakpoint condition can not be printed
Петров Андрей <an.petrov <at> pay-lab.ru> writes:
> Hello, team!
Hello - thanks for your (very well done and pleasant to read!) report.
> Debugger entered--Lisp error: (error "Apparently circular structure being printed")
> apply(debug error (error "Apparently circular structure being printed"))
> edebug(error (error "Apparently circular structure being printed"))
> signal(error ("Apparently circular structure being printed"))
> edebug-signal(error ("Apparently circular structure being printed"))
> message("Break: %s => %s" filtered (#<field field-157aa078be4c>))
Another symptom of printing the wrong way, similar to bug#52222.
Printing with `edebug-safe-prin1-to-string' should fix it and be the
right thing, right?
> P.S. I could not copy the text from emacs with C-c M-i according to hint:
> While in the mail buffer:
> Type C-c C-c to send the bug report.
> Type C-x k RET to cancel (don’t send it).
> Type C-c M-i to copy text to your preferred mail program. <----
Hmm, that calls `report-emacs-bug-insert-to-mailer'. You have set up a
mailer on your system and it works all fine? If you think Emacs is not
behaving here, can you please create a separate report? - that this
works is very important. Maybe you can already give debugging a try?
Thanks,
Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#52479
; Package
emacs
.
(Sun, 19 Dec 2021 13:06:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 52479 <at> debbugs.gnu.org (full text, mbox):
Michael Heerdegen <michael_heerdegen <at> web.de> writes:
> Another symptom of printing the wrong way, similar to bug#52222.
> Printing with `edebug-safe-prin1-to-string' should fix it and be the
> right thing, right?
Sounds like the right solution to me. Michael, you've investigated this
issue in the bug#52222 context -- can you do the fixes here?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#52479
; Package
emacs
.
(Sun, 19 Dec 2021 15:51:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 52479 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Michael Heerdegen <michael_heerdegen <at> web.de> writes:
>
> > Another symptom of printing the wrong way, similar to bug#52222.
> > Printing with `edebug-safe-prin1-to-string' should fix it and be the
> > right thing, right?
>
> Sounds like the right solution to me. Michael, you've investigated
> this issue in the bug#52222 context -- can you do the fixes here?
Yes, don't care, I have a fix, I'm just a bit slow. There are lots of
places in Edebug where printing is done, so I want to be careful to not
change wrong places.
Michael.
This bug report was last modified 3 years and 180 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.