GNU bug report logs -
#70436
30.0.50; Fail to enter the debugger when using prin1 (instead of cl-prin1)
Previous Next
Reported by: Bruno Barbier <brubar.cs <at> gmail.com>
Date: Wed, 17 Apr 2024 13:31:05 UTC
Severity: normal
Merged with 70437
Found in version 30.0.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 70436 in the body.
You can then email your comments to 70436 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#70436
; Package
emacs
.
(Wed, 17 Apr 2024 13:31:06 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Bruno Barbier <brubar.cs <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 17 Apr 2024 13:31:07 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
When setting debugger-print-function to prin1, Emacs 30.0.50 may fail
to enter the debugger.
Emacs displays something like:
Entering debugger...
make-text-button: Args out of range: 67, 3000
The correct behavior is to enter the debugger, with something like this:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
#f(compiled-function (&rest args) "Start a program in a subprocess. ...
...
make-process(:name "mandatory" :command "ls" :stderr err-buf)
The problem doesn't occur with Emacs 29.3.
To manually reproduce, execute the following code block in a new Emacs
(started with '-Q'):
#+begin_src elisp
(progn
(setq debugger-print-function 'prin1)
(defun my-useless-advice (fun &rest args)
(apply fun args))
(advice-add 'make-process :around #'my-useless-advice)
(make-process :name "mandatory"
:command "ls"
:stderr 'err-buf))
#+end_src
It seems that backtrace.el prints using prin1, but infers where the
button should be using cl-prin1.
My personal workaround is to stop setting debugger-print-function to
prin1 (I customized it a few years ago because I found that cl-prin1 was
really slow at the time, I guess it shouldn't be the case anymore).
Best,
Bruno
In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.18.0) of 2024-04-17 built on keynux
Windowing system distributor 'The X.Org Foundation', version 11.0.12101011
System Description: Gentoo Linux
Configured using:
'configure --prefix=/home/bruno/local --with-x-toolkit=lucid
--without-toolkit-scroll-bars --without-tree-sitter
--without-native-compilation --without-modules --without-xwidgets
--without-threads --without-pop --without-mailutils
--without-compress-install --without-hesiod --without-gameuser
--without-lcms2 --without-wide-int --without-kerberos
--without-kerberos5 --with-sound=no --without-ns --without-gsettings
--without-gconf --without-libotf --without-m17n-flt
--with-gif=ifavailable --with-harfbuzz'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM HARFBUZZ JPEG LIBXML2
NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SQLITE3 TIFF WEBP X11 XDBE XIM
XINPUT2 XPM LUCID ZLIB
Important settings:
value of $LC_CTYPE: en_US.UTF-8
value of $LANG: C.UTF8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
minibuffer-regexp-mode: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date subr-x mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
warnings icons cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc
paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode
mwheel term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote dbusbind inotify dynamic-setting
font-render-setting cairo x-toolkit xinput2 x multi-tty move-toolbar
make-network-process emacs)
Memory information:
((conses 16 40047 17385) (symbols 48 5270 0) (strings 32 13441 1036)
(string-bytes 1 323186) (vectors 16 9362)
(vector-slots 8 111771 9938) (floats 8 23 28) (intervals 56 305 0)
(buffers 984 11))
Merged 70436 70437.
Request was from
Eli Zaretskii <eliz <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Wed, 17 Apr 2024 16:24:04 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#70436
; Package
emacs
.
(Sat, 20 Apr 2024 08:25:03 GMT)
Full text and
rfc822 format available.
Message #10 received at 70436 <at> debbugs.gnu.org (full text, mbox):
> From: Bruno Barbier <brubar.cs <at> gmail.com>
> Date: Wed, 17 Apr 2024 15:29:14 +0200
>
> When setting debugger-print-function to prin1, Emacs 30.0.50 may fail
> to enter the debugger.
>
> Emacs displays something like:
>
> Entering debugger...
> make-text-button: Args out of range: 67, 3000
>
>
> The correct behavior is to enter the debugger, with something like this:
>
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
> #f(compiled-function (&rest args) "Start a program in a subprocess. ...
> ...
> make-process(:name "mandatory" :command "ls" :stderr err-buf)
>
> The problem doesn't occur with Emacs 29.3.
>
> To manually reproduce, execute the following code block in a new Emacs
> (started with '-Q'):
>
> #+begin_src elisp
> (progn
> (setq debugger-print-function 'prin1)
>
> (defun my-useless-advice (fun &rest args)
> (apply fun args))
>
> (advice-add 'make-process :around #'my-useless-advice)
>
> (make-process :name "mandatory"
> :command "ls"
> :stderr 'err-buf))
> #+end_src
>
> It seems that backtrace.el prints using prin1, but infers where the
> button should be using cl-prin1.
>
> My personal workaround is to stop setting debugger-print-function to
> prin1 (I customized it a few years ago because I found that cl-prin1 was
> really slow at the time, I guess it shouldn't be the case anymore).
Stefan, is this supposed to be supported?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#70436
; Package
emacs
.
(Sat, 20 Apr 2024 08:29:03 GMT)
Full text and
rfc822 format available.
Message #13 received at 70436 <at> debbugs.gnu.org (full text, mbox):
> Cc: 70436 <at> debbugs.gnu.org
> Date: Sat, 20 Apr 2024 11:24:11 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
>
> > From: Bruno Barbier <brubar.cs <at> gmail.com>
> > Date: Wed, 17 Apr 2024 15:29:14 +0200
> >
> > When setting debugger-print-function to prin1, Emacs 30.0.50 may fail
> > to enter the debugger.
> >
> > Emacs displays something like:
> >
> > Entering debugger...
> > make-text-button: Args out of range: 67, 3000
> >
> >
> > The correct behavior is to enter the debugger, with something like this:
> >
> > Debugger entered--Lisp error: (wrong-type-argument stringp nil)
> > #f(compiled-function (&rest args) "Start a program in a subprocess. ...
> > ...
> > make-process(:name "mandatory" :command "ls" :stderr err-buf)
> >
> > The problem doesn't occur with Emacs 29.3.
> >
> > To manually reproduce, execute the following code block in a new Emacs
> > (started with '-Q'):
> >
> > #+begin_src elisp
> > (progn
> > (setq debugger-print-function 'prin1)
> >
> > (defun my-useless-advice (fun &rest args)
> > (apply fun args))
> >
> > (advice-add 'make-process :around #'my-useless-advice)
> >
> > (make-process :name "mandatory"
> > :command "ls"
> > :stderr 'err-buf))
> > #+end_src
> >
> > It seems that backtrace.el prints using prin1, but infers where the
> > button should be using cl-prin1.
> >
> > My personal workaround is to stop setting debugger-print-function to
> > prin1 (I customized it a few years ago because I found that cl-prin1 was
> > really slow at the time, I guess it shouldn't be the case anymore).
>
> Stefan, is this supposed to be supported?
Btw, if I also set backtrace-print-function to prin1, the above recipe
works as expected. So maybe we should document that changing
debugger-print-function should also change backtrace-print-function?
Or even use the value of debugger-print-function as the default value
of backtrace-print-function?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#70436
; Package
emacs
.
(Sat, 20 Apr 2024 13:59:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 70436 <at> debbugs.gnu.org (full text, mbox):
> Stefan, is this supposed to be supported?
Yes.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#70436
; Package
emacs
.
(Sat, 20 Apr 2024 15:26:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 70436 <at> debbugs.gnu.org (full text, mbox):
I pushed a quick fix to `master`.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#70436
; Package
emacs
.
(Thu, 25 Apr 2024 16:39:04 GMT)
Full text and
rfc822 format available.
Message #22 received at 70436 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: brubar.cs <at> gmail.com, 70436 <at> debbugs.gnu.org
> Date: Sat, 20 Apr 2024 11:24:56 -0400
>
> I pushed a quick fix to `master`.
Thanks, I guess we should now close this bug?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#70436
; Package
emacs
.
(Sat, 27 Apr 2024 10:31:04 GMT)
Full text and
rfc822 format available.
Message #25 received at 70436 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
>> Cc: brubar.cs <at> gmail.com, 70436 <at> debbugs.gnu.org
>> Date: Sat, 20 Apr 2024 11:24:56 -0400
>>
>> I pushed a quick fix to `master`.
>
> Thanks, I guess we should now close this bug?
After installing Stefan fix, the bug is gone. Thanks.
I've personally switched back using the default value cl-prin1, and
didn't notice any issue since.
Thanks Eli, Stefan.
Bruno
Reply sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
You have taken responsibility.
(Sat, 27 Apr 2024 14:47:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Bruno Barbier <brubar.cs <at> gmail.com>
:
bug acknowledged by developer.
(Sat, 27 Apr 2024 14:47:02 GMT)
Full text and
rfc822 format available.
Message #30 received at 70436-done <at> debbugs.gnu.org (full text, mbox):
>> Thanks, I guess we should now close this bug?
> After installing Stefan fix, the bug is gone. Thanks.
> I've personally switched back using the default value cl-prin1, and
> didn't notice any issue since.
Thanks Bruno, I'm happy both work well for you now.
Closing,
Stefan
Reply sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
You have taken responsibility.
(Sat, 27 Apr 2024 14:47:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Bruno Barbier <brubar.cs <at> gmail.com>
:
bug acknowledged by developer.
(Sat, 27 Apr 2024 14:47:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 26 May 2024 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 20 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.