GNU bug report logs - #70436
30.0.50; Fail to enter the debugger when using prin1 (instead of cl-prin1)

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Bruno Barbier <brubar.cs@HIDDEN>; merged with #70437; dated Wed, 17 Apr 2024 13:31:05 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Merged 70436 70437. Request was from Eli Zaretskii <eliz@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 17 Apr 2024 13:30:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 17 09:30:04 2024
Received: from localhost ([127.0.0.1]:46084 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rx5MP-0002Ap-Cu
	for submit <at> debbugs.gnu.org; Wed, 17 Apr 2024 09:30:04 -0400
Received: from lists.gnu.org ([2001:470:142::17]:44782)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <brubar.cs@HIDDEN>) id 1rx5MI-00029o-PA
 for submit <at> debbugs.gnu.org; Wed, 17 Apr 2024 09:29:58 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <brubar.cs@HIDDEN>)
 id 1rx5Lr-0008DZ-OI
 for bug-gnu-emacs@HIDDEN; Wed, 17 Apr 2024 09:29:29 -0400
Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <brubar.cs@HIDDEN>)
 id 1rx5Lm-00057O-P3
 for bug-gnu-emacs@HIDDEN; Wed, 17 Apr 2024 09:29:27 -0400
Received: by mail-wm1-x335.google.com with SMTP id
 5b1f17b1804b1-41868bb71cfso20407395e9.0
 for <bug-gnu-emacs@HIDDEN>; Wed, 17 Apr 2024 06:29:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1713360557; x=1713965357; darn=gnu.org;
 h=mime-version:date:references:in-reply-to:subject:to:from:message-id
 :from:to:cc:subject:date:message-id:reply-to;
 bh=poNGr5I/v7NUypYwUX2gpkwB1dcC2jVwUKbPl1RkHqE=;
 b=eA41GbrBEuYq9ctloFhrHRIUacwmi8uI/oTg6zpOO3eA9hqNXXiGkmAjXvWehy1d/9
 BxAh+HCcUPCEPraiFIZx+b5TvNY4fO/hGxgGWXEWkD2ebtls1vDqESUflknIApwpPcYD
 cdYEZbr3g8IhXoKjE8IG7jiI/WxpbAznvwlwfNNObX3NcOV7DO5/AfGiFyOA3bnadPX7
 o4KExqYM2uGXO1znpv+HYRQfcdh0zqlLsE/v+7s6ODDakBZ1lJ1vio9FrJrKrRWpNAZf
 t+FD04q8rCg8wR+e75QIfj077Y/rcs8p8dtYLQQSHe2r4D+7IiOfy2zivRIctgQyfFsL
 Zreg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1713360557; x=1713965357;
 h=mime-version:date:references:in-reply-to:subject:to:from:message-id
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=poNGr5I/v7NUypYwUX2gpkwB1dcC2jVwUKbPl1RkHqE=;
 b=s0MpLx+IrLONJHAmyWFQ4HshG5LdJjc0KCDJTi7LYdNQhTeMDC4K1rVPsD2XSdCpN0
 1zDQKBCUQPQ7cs4R9blz73dIPVAjkGT+AdRYy/Q4GrBa40Sep3hVthZlboyv9OhEVR8q
 h/x6Ure8UaJlmvbYBs5HWqIg9fKLBfjTLR5pV/f4elFZz9qWuO/QXnrKLCNiiFk2KGZW
 g6dTOLz0ya/bFYxKLnLb6XOrMfOO0+S9BhQwkghd1WcR1TFJJLEviQkkuTUT10pmAilz
 gh+GGs+n++lzvW75jh0LJT/Ns2vfBKM4LnvGUX0SnI6XHGh6n40qYs4B5G0g6GZVtJv+
 JSyQ==
X-Gm-Message-State: AOJu0YzwVTQMT0TywPH7mbwtOwyzwud5HxOZdMTAXlfARqxlik41+eAJ
 xGhvsj+lSg3Dqbygg4Uy/Ch9UfAcUrhJVXXfRYAoocpyf2YxB/SyK/BOug==
X-Google-Smtp-Source: AGHT+IESn+bvHm5SR0P4t/3zNQK98bcf4olmeZbtLBzUzYmXXZ5uI99tn7c6izvAUGEezhd1/2t89g==
X-Received: by 2002:a05:600c:358a:b0:418:3719:61e6 with SMTP id
 p10-20020a05600c358a00b00418371961e6mr8245847wmq.0.1713360557006; 
 Wed, 17 Apr 2024 06:29:17 -0700 (PDT)
Received: from keynux ([2a01:cb11:8073:b084:f1eb:67b3:c241:aa4c])
 by smtp.gmail.com with ESMTPSA id
 m16-20020a05600c3b1000b0041496734318sm2878608wms.24.2024.04.17.06.29.15
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 17 Apr 2024 06:29:16 -0700 (PDT)
Message-ID: <661fceac.050a0220.5950a.8357@HIDDEN>
Received: by keynux (sSMTP sendmail emulation); Wed, 17 Apr 2024 15:29:14 +0200
From: Bruno Barbier <brubar.cs@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.0.50; Fail to enter the debugger when using prin1 (instead of
 cl-prin1)
In-Reply-To: <86mspsgmzt.fsf@HIDDEN>
References: <87zfuc48d5.fsf@HIDDEN> <86msqc9dsa.fsf@HIDDEN>
 <874jcjeuac.fsf@HIDDEN> <86edbnajfp.fsf@HIDDEN>
 <87mspwcn0f.fsf_-_@HIDDEN> <86v84kmeh0.fsf@HIDDEN>
 <874jc2y2ky.fsf@HIDDEN> <86sezmjxbc.fsf@HIDDEN>
 <jwvh6g10yst.fsf-monnier+emacs@HIDDEN> <86a5lsiuo8.fsf@HIDDEN>
 <jwvttk0zoyb.fsf-monnier+emacs@HIDDEN> <87r0f49yq9.fsf@HIDDEN>
 <86mspsgmzt.fsf@HIDDEN>
X-Debbugs-Cc: 
Date: Wed, 17 Apr 2024 15:29:14 +0200
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2a00:1450:4864:20::335;
 envelope-from=brubar.cs@HIDDEN; helo=mail-wm1-x335.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

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))




Acknowledgement sent to Bruno Barbier <brubar.cs@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#70436; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 17 Apr 2024 16:30:03 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.